STAT 353 Project #2 Relevancy of sleep patterns and academic performance 04.013.2025
Mike Jensen Introduction this report will explore the relation between sleep and academic performance. studies have in general shown that optimal sleep cycles happen between 10:00pm and 2:00am, studies have also shown that rapid eye moment sleep (REM) occurs in 45 minute intervals and sleep should be portioned accordingly.So investigating student sleep behaviors should yeild valuable insights in to a students academic success.
the following ten questions will be used to help determine factors and causality s between sleep and academic success. questions
1 1 Is there a significant difference in the average number of early classes between the first two class years and other class years?
2 a follow up to question 1 demonstrates there is little to no difference amongst genders in attending early classes
3 Do students who identify as “larks” have significantly better cognitive skills (cognition z-score) compared to “owls”?
4 & 5 is there a correlation between the tested Z cognition scores and GPA
how does bed time affect GPA 6 & 7 base line average sleep for both weekend and week day.
8 & 9 Average of hours of sleep related to GPA from 0 to 4 rounded to nearest integer and graphicaly displayed.
10 & 11 How do students prone to all nighters affect there academic outcome
Data
the following data set was compiled from 253 observations on 27 different data variables. The following study used a sample skill test, questioner, and sleep journal to asses the participants.
Analysis
1 Is there a significant difference in the average number of early classes between the first two class years and other class years?
##
## Welch Two Sample t-test
##
## data: NumEarlyClass by ClassGroup
## t = 4.1813, df = 250.69, p-value = 4.009e-05
## alternative hypothesis: true difference in means between group Lower and group Upper is not equal to 0
## 95 percent confidence interval:
## 0.4042016 1.1240309
## sample estimates:
## mean in group Lower mean in group Upper
## 2.070423 1.306306
The t test demonstrates there is a difference (due to the high confidence level of 0.4 to 1.1) between the lower class (years 1-2) and the upper class(years 3-4) as the lower class attends and mean average of ~2.1 classes before 9:00am and the upper class only attends ~1.3 before 9:00am.
##
## Welch Two Sample t-test
##
## data: NumEarlyClass by GenderFactor
## t = 1.6058, df = 224.95, p-value = 0.1097
## alternative hypothesis: true difference in means between group Female and group Male is not equal to 0
## 95 percent confidence interval:
## -0.07084732 0.69466241
## sample estimates:
## mean in group Female mean in group Male
## 1.860927 1.549020
2 a follow up to question 1 demonstrates there is little to no difference amongst genders in attending early classes
3 Do students who identify as “larks” have significantly better cognitive skills (cognition z-score) compared to “owls”?
##
## Welch Two Sample t-test
##
## data: CognitionZscore by LarkOwl
## t = 0.80571, df = 75.331, p-value = 0.4229
## alternative hypothesis: true difference in means between group Lark and group Owl is not equal to 0
## 95 percent confidence interval:
## -0.1893561 0.4465786
## sample estimates:
## mean in group Lark mean in group Owl
## 0.09024390 -0.03836735
the above results illustrate that the groups identifying as larks and owls have little to no difference in there GPAs
4 & 5 is there a correlation between the tested cognition scores and GPA
## [1] 0.2668221
and related p value
##
## Pearson's product-moment correlation
##
## data: Sleep$CognitionZscore and Sleep$GPA
## t = 4.3863, df = 251, p-value = 1.698e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
## 0.1483767 0.3777206
## sample estimates:
## cor
## 0.2668221
the above shows there is little correlation between GPA and Z scores as the correlation number is 0.27 the follow up also shows very low confidence from 0.15 to 0.38. this low correlation between cognition scores and GPA may indicate other factors in the way the GPA was achieved. the cognition tests may not reflect true “real world” academic environments or situations such as studied for exams, home work, group projects, and lab based performance.
form the previous information class time does not tend to have affects on student out come with regurds to accademic year, gender, or Z function.
next will be a look into type of sleep and the affects on academics
how does bed time affect GPA
6 & 7 base line average sleep for both weekend and week day.
##
## One Sample t-test
##
## data: Sleep$WeekdaySleep
## t = -1.8251, df = 252, p-value = 0.06918
## alternative hypothesis: true mean is not equal to 8
## 95 percent confidence interval:
## 7.721416 8.010599
## sample estimates:
## mean of x
## 7.866008
##
## One Sample t-test
##
## data: Sleep$AverageSleep
## t = 15.924, df = 252, p-value < 2.2e-16
## alternative hypothesis: true mean is not equal to 7
## 95 percent confidence interval:
## 7.846466 8.085392
## sample estimates:
## mean of x
## 7.965929
results show average sleeping time of 7.9 hrs for the weekday and 8 hrs for the week end. this may indicate a fairly balance work/academic life schedule.
8 & 9 Average of hours of sleep related to GPA from 0 to 4 rounded to nearest integer and graphicaly displayed.
## GPAint WeekdaySleep
## 1 2 7.759474
## 2 3 8.022839
## 3 4 7.583924
as can be seen form the above two questions there are no GPAs below 2.0
represented.however all other GPAs show nearly identical average sleep
times constant with questions 6 and 7.
10 & 11 How do students prone to all nighters affect there academic outcome
##
## One Sample t-test
##
## data: Sleep$GPA
## t = -0.24415, df = 252, p-value = 0.8073
## alternative hypothesis: true mean is not equal to 3.25
## 95 percent confidence interval:
## 3.193737 3.293852
## sample estimates:
## mean of x
## 3.243794
avg_gpa_allnighter <- aggregate(GPA ~ AllNighter, data = Sleep, FUN = mean, na.rm = TRUE)
avg_gpa_allnighter
## AllNighter GPA
## 1 0 3.252968
## 2 1 3.184706
the results tend to show that students who pull allnighters tend to have a lower GPA that hose who do not pull all nighters and lower than the average student GOPA. this may be due in part to poor planing which is often the case of compressed time frames due to poor work life balances in regards to academics.
Summery
a few additional metrics that would be valuable to have are the student class load (credit hours), associated studies time required for the class, commuting time, and work time. other studies have shown very strong correlations between the total time spent on these activities and grade average. however no mention is given about sleep but should be. from the findings above it the greatest factor to high/low GPA outcomes were from the use of “allnighters” as stated previously this may indicate poor planing skills, over commitment to poor work/academics balance, and possibly a unstable life/living situation. all these issues can be mitigated with diligent efforts in planing and time management however it requires honesty and knowing ones limits.
References
1 Is there a significant difference in the average number of early classes between the first two class years and other class years?
`{r Q1, echo=FALSE} Sleep\(ClassGroup <- ifelse(Sleep\)ClassYear
%in% c(1, 2), “Lower”, “Upper”) Sleep\(ClassGroup <- factor(Sleep\)ClassGroup,
levels = c(“Lower”, “Upper”))
t.test(NumEarlyClass ~ ClassGroup, data = Sleep, alternative = “two.sided”)
`
2 a follow up to question 1 demonstrates there is little to no
difference amongst genders in attending early classes
`{r,echo=FALSE} Sleep\(GenderFactor <-
factor(Sleep\)Gender, labels = c(“Female”, “Male”))
t.test(NumEarlyClass ~ GenderFactor, data = Sleep, alternative =
“two.sided”) `
3 Do students who identify as “larks” have significantly better
cognitive skills (cognition z-score) compared to “owls”?
`{r,echo=FALSE} lark_owl_data <- subset(Sleep, LarkOwl %in% c(“Lark”,
“Owl”)) lark_owl_data\(LarkOwl <-
factor(lark_owl_data\)LarkOwl, levels = c(“Lark”, “Owl”))
t.test(CognitionZscore ~ LarkOwl, data = lark_owl_data, alternative =
“two.sided”) `
4 & 5 is there a correlation between the tested cognition scores
and GPA
{r,echo=FALSE} cor(Sleep$CognitionZscore, Sleep$GPA, use = "complete.obs", method = "pearson")
and related p value
{r,echo=FALSE} cor.test(Sleep$CognitionZscore, Sleep$GPA, use = "complete.obs")
6 & 7 base line average sleep for both weekend and week day.
{r,echo=FALSE} t.test(Sleep$WeekdaySleep, mu = 8, alternative = "two.sided")
{r,echo=FALSE} t.test(Sleep$AverageSleep, mu = 7, alternative = "two.sided")
8 & 9 Average of hours of sleep related to GPA from 0 to 4
rounded to nearest integer and graphicaly displayed.
`{r,echo=FALSE} Sleep\(GPAint <-
round(Sleep\)GPA) Sleep\(GPAint <-
factor(Sleep\)GPAint, levels = 0:4) avg_Sleep <-
aggregate(WeekdaySleep ~ GPAint, data = Sleep, FUN = mean, na.rm =
TRUE)
avg_Sleep `
`{r,echo=FALSE}
boxplot(WeekdaySleep ~ GPA, data = Sleep, main = “Weekday Sleep by
GPA”, xlab = “GPA”, ylab = “Weekday Sleep (hours)”, col = “lightblue”)
`
10 & 11 How do students prone to all nighters affect there
academic outcome
{r,echo=FALSE} t.test(Sleep$GPA, mu = 3.25,alternative = "two.sided", na.rm = TRUE)
{r} avg_gpa_allnighter <- aggregate(GPA ~ AllNighter, data = Sleep, FUN = mean, na.rm = TRUE) avg_gpa_allnighter