Students have always been told to study for their exams in hopes of improving their scores. But how much can studying really help your grade? In order to find out, we will be comparing data from students who all took the same exam, where they reported the amount of time they studied and their final grades. You can refer to the article in the following link: https://digitalcommons.odu.edu/cgi/viewcontent.cgi?article=1292&context=ots_masters_projects
#x is the amount of time spent studying in minutes and y is the final grade
time<-c(120,180,330,0,240,0,240,360,210,85)
grade<-c(95.6,95,98.35,93.3,81.15,91.25,97.85,94,94.7,88.45)
plot(time,grade)
cor(time,grade)
## [1] 0.2018939
exams<-lm(grade~time)
summary(exams)$coef
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 91.51890202 2.98698770 30.6391961 1.398721e-09
## time 0.00819319 0.01405233 0.5830485 5.759231e-01
summary(exams)$r.squared
## [1] 0.04076113
anova(exams)
## Analysis of Variance Table
##
## Response: grade
## Df Sum Sq Mean Sq F value Pr(>F)
## time 1 9.418 9.4183 0.3399 0.5759
## Residuals 8 221.642 27.7052
plot(time,grade,main="Time Spent Studying vs Final Test Grade")
abline(exams$coef,lty=1)
The SSR is 9.418, the SSE is 27.7052, and the SST is 37.1232. This means that the R^2 is 0.2346958, making the model weak. The model is only useful 25.36% of the time.