library(tidyverse)

dat <- read_csv("data/data-to-explore.csv")

dat <- dat %>% mutate(motivation = (int+val+percomp)/3) %>% mutate(motivation_group=ntile(motivation,4)) %>% 
  select(subject,
         motivation_group,
         time_spent_hours,
         proportion_earned) %>% 
  mutate(subject = recode(subject,
                          "AnPhA" = "Anatomy",
                          "BioA" = "Biology", 
                          "FrScA" = "Forensics",
                          "OcnA" =  "Oceanography", 
                          "PhysA" = "Physics")) %>%
  mutate(motivation_group = recode(motivation_group, "1" = "Lowest", "2"= "Low", "3"= "High", "4" = "Highest")) %>% 
  mutate(final_grade = proportion_earned *100)

new_dat_complete_m <- na.omit(dat)

new_dat_complete_m$motivation_group <- factor(new_dat_complete_m$motivation_group,levels=c ("Highest","High","Low","Lowest"))

pm <- ggplot(new_dat_complete_m) +
  geom_point(mapping = aes(x=time_spent_hours, y= final_grade, color = motivation_group)) +
  xlim(1,100) +
  facet_wrap(~subject)

pm + labs(title = "Does higher motivation in learning science result in better learning outcome?")+
  xlab("Total_Spent_Time_Hour")+
  ylab("Course_Final_Group_%") +
  theme_classic()

As shown in the plots above, each subject subgroup contains points expressing the relationships between a student’ course final grade and the study hours. The color of each doc indicates the motivation level that an individual held prior to taking the course. The motivation construct is the average score of students’ responses to three sub-construct: interest in science, utility value and perceived competence. The motivation group variable represents the quantile rank of an individual’s motivation construct. According to these (sub)plots, students’ motivation in learning science does not consonantly result in better learning outcomes. Especially, no direction evidence from the plots show that students with higher motivation tends to either have better final grades or have efficient learning hours. Moreover, when looking at the “Biology” subgroup, students with lowest/low motivation in learning science can also achieve higher grades in the course. However, the above plots show trends that students who had lowest motivation tended to fail the class more (comparing the purple dots with the other ones).