What is the relationship between student’s time spent and final grade?
Is the relationship different by students’ gender?
Author
Siyu Long
Students’ Time Spent v.s. Final Grade
The plots in Figure 1 show the relationship between students’ final grade and time spent by hours. Every score of the observations is distinguished by gender (F in red, m in blue).
Code
scatterplot <-ggplot(course_data2, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point() +geom_smooth(method ="lm", se =FALSE) +labs(title ="Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade",color ="Gender") +scale_color_brewer(palette ="Set1")scatterplot
`geom_smooth()` using formula = 'y ~ x'
Figure 1: the relationship between student’ time spent and final grade.
The Figure 1 plot shows that in the time spent range of 0-100 hours, students’ final grades show a primarily positive correlation with time, especially as the majority of students achieve high grades within the 0-50 hours timeframe.
Time Spent v.s. Final Grade by Gender
The two plots, Figure 2 (a) and Figure 2 (b), separtely show the relationship between final grades of students in different gender groups and time spent by hours.
Code
female_data <- course_data2 %>%filter(Gender =="F")male_data <- course_data2 %>%filter(Gender =="M")scatterplot_female <-ggplot(female_data, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point(color ="red") +labs(title ="Female Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade") +scale_color_manual(values ="red")scatterplot_femalescatterplot_male <-ggplot(male_data, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point(color ="blue") +labs(title ="Male Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade") +scale_color_manual(values ="blue")scatterplot_male
(a) Color by female students’ final grades
(b) Color by male students’ final grades
Figure 2: the relationship between student’ time spent and final grade by gender.
The Figure 2 plots show similar results to what Figure 1 displays. Within the time spent range of 0-100 hours, both female and male students show a positive correlation between their final grades and time spent. In particular, a significant proportion of students achieve high grades within the 0-50 hours timeframe. The scatterplot distributions for female and male students appear to be quite similar.
Source Code
---title: "Week 9 Data product"subtitle: | <p style="font-weight: bold; font-size: 18px;">What is the relationship between student’s time spent and final grade?</p> <p style="font-weight: bold; font-size: 18px;">Is the relationship different by students’ gender?</p>author: "Siyu Long"format: html: code-fold: true code-tools: trueeditor: visual---```{r}#| label: load-packages#| include: falselibrary(tidyverse)course_data <-read_csv("course-data.csv")course_data2 <- course_data %>%drop_na(final_grade, time_spent)library (ggplot2)```## Students' Time Spent v.s. Final GradeThe plots in @fig-scatterplot show the relationship between students' final grade and time spent by hours. Every score of the observations is distinguished by gender (F in red, m in blue).```{r}#| label: fig-scatterplot#| fig-cap: "the relationship between student’ time spent and final grade."#| fig-width: 6#| fig-height: 3.5scatterplot <-ggplot(course_data2, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point() +geom_smooth(method ="lm", se =FALSE) +labs(title ="Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade",color ="Gender") +scale_color_brewer(palette ="Set1")scatterplot```The @fig-scatterplot plot shows that in the time spent range of 0-100 hours, students' final grades show a primarily positive correlation with time, especially as the majority of students achieve high grades within the 0-50 hours timeframe.## Time Spent v.s. Final Grade by GenderThe two plots, @fig-bygender-1 and @fig-bygender-2, separtely show the relationship between final grades of students in different gender groups and time spent by hours.```{r}#| label: fig-bygender#| fig-cap: "the relationship between student’ time spent and final grade by gender."#| fig-subcap:#| - "Color by female students' final grades"#| - "Color by male students' final grades "#| layout-ncol: 2#| column: pagefemale_data <- course_data2 %>%filter(Gender =="F")male_data <- course_data2 %>%filter(Gender =="M")scatterplot_female <-ggplot(female_data, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point(color ="red") +labs(title ="Female Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade") +scale_color_manual(values ="red")scatterplot_femalescatterplot_male <-ggplot(male_data, aes(x = TimeSpent_hours, y = final_grade, color = Gender)) +geom_point(color ="blue") +labs(title ="Male Students' Time Spent vs. Final Grade",x ="Students' Time Spent by Hours",y ="Students' Final Grade") +scale_color_manual(values ="blue")scatterplot_male```The @fig-bygender plots show similar results to what @fig-scatterplot displays. Within the time spent range of 0-100 hours, both female and male students show a positive correlation between their final grades and time spent. In particular, a significant proportion of students achieve high grades within the 0-50 hours timeframe. The scatterplot distributions for female and male students appear to be quite similar.