sleep <- read.csv("https://www.lock5stat.com/datasets3e/SleepStudy.csv")
head(sleep)
## Gender ClassYear LarkOwl NumEarlyClass EarlyClass GPA ClassesMissed
## 1 0 4 Neither 0 0 3.60 0
## 2 0 4 Neither 2 1 3.24 0
## 3 0 4 Owl 0 0 2.97 12
## 4 0 1 Lark 5 1 3.76 0
## 5 0 4 Owl 0 0 3.20 4
## 6 1 4 Neither 0 0 3.50 0
## CognitionZscore PoorSleepQuality DepressionScore AnxietyScore StressScore
## 1 -0.26 4 4 3 8
## 2 1.39 6 1 0 3
## 3 0.38 18 18 18 9
## 4 1.39 9 1 4 6
## 5 1.22 9 7 25 14
## 6 -0.04 6 14 8 28
## DepressionStatus AnxietyStatus Stress DASScore Happiness AlcoholUse Drinks
## 1 normal normal normal 15 28 Moderate 10
## 2 normal normal normal 4 25 Moderate 6
## 3 moderate severe normal 45 17 Light 3
## 4 normal normal normal 11 32 Light 2
## 5 normal severe normal 46 15 Moderate 4
## 6 moderate moderate high 50 22 Abstain 0
## WeekdayBed WeekdayRise WeekdaySleep WeekendBed WeekendRise WeekendSleep
## 1 25.75 8.70 7.70 25.75 9.50 5.88
## 2 25.70 8.20 6.80 26.00 10.00 7.25
## 3 27.44 6.55 3.00 28.00 12.59 10.09
## 4 23.50 7.17 6.77 27.00 8.00 7.25
## 5 25.90 8.67 6.09 23.75 9.50 7.00
## 6 23.80 8.95 9.05 26.00 10.75 9.00
## AverageSleep AllNighter
## 1 7.18 0
## 2 6.93 0
## 3 5.02 0
## 4 6.90 0
## 5 6.35 0
## 6 9.04 0
This report analyzes sleep patterns among college students using the sleep study dataset from the Lock5 website. The dataset includes 253 observations across 27 variables, offering detailed information about students’ sleep habits, psychological well-being, academic performance, and lifestyle behaviors.
The goal of this analysis is to answer a series of research questions designed to deepen our understanding of the factors that influence college students’ sleep. By examining relationships among sleep duration, mental health, academic outcomes, and daily habits, this report provides insights that may inform future research and guide interventions aimed at improving students’ well-being and academic success.
The following research questions will be explored in this report:
We will explore the questions in detail
## 0 1
## 3.324901 3.123725
##
## Welch Two Sample t-test
##
## data: GPA by Gender
## t = 3.9139, df = 200.9, p-value = 0.0001243
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## 0.09982254 0.30252780
## sample estimates:
## mean in group 0 mean in group 1
## 3.324901 3.123725
Gender = 0 → Female students Average GPA ≈ 3.32 Gender = 1 → Male students Average GPA ≈ 3.12
## EarlyYears LaterYears
## 2.070423 1.306306
##
## Welch Two Sample t-test
##
## data: NumEarlyClass by YearGroup
## t = 4.1813, df = 250.69, p-value = 4.009e-05
## alternative hypothesis: true difference in means between group EarlyYears and group LaterYears is not equal to 0
## 95 percent confidence interval:
## 0.4042016 1.1240309
## sample estimates:
## mean in group EarlyYears mean in group LaterYears
## 2.070423 1.306306
Students in the first two years take significantly more early classes (M = 2.07) than upper-class students (M = 1.31). The difference is statistically significant, meaning early-year students consistently have more early classes.
## Lark Owl
## 0.09024390 -0.03836735
##
## 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
Larks have a higher average cognition z-score (0.09) than Owls (–0.04). The wide confidence interval (–0.19 to 0.45) includes zero, which means the difference could be positive, negative, or not at all. Larks and Owls do not differ significantly in cognitive performance. Their cognitive abilities appear the same from the data.
## 0 1
## 2.647059 1.988095
##
## Welch Two Sample t-test
##
## data: ClassesMissed by EarlyClass
## t = 1.4755, df = 152.78, p-value = 0.1421
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -0.2233558 1.5412830
## sample estimates:
## mean in group 0 mean in group 1
## 2.647059 1.988095
Students who had no early classes miss about 2.65 classes per semester on average. Students who had at least one early class miss about 1.99 classes per semester on average. This means students with early classes actually miss fewer classes on average than those without early classes.
##
## Welch Two Sample t-test
##
## data: Happiness by depress2
## t = -5.6339, df = 55.594, p-value = 6.057e-07
## alternative hypothesis: true difference in means between group AtLeastModerate and group Normal is not equal to 0
## 95 percent confidence interval:
## -7.379724 -3.507836
## sample estimates:
## mean in group AtLeastModerate mean in group Normal
## 21.61364 27.05742
Students with at least moderate depression have lower happiness levels than students with normal depression status. On average, students with at least moderate depression score about 5.4 points lower on happiness than those without depression. This means that higher depression severity is strongly associated with lower happiness in this sample.
## 0 1
## 6.136986 7.029412
##
## Welch Two Sample t-test
##
## data: PoorSleepQuality by AllNighter
## t = -1.7068, df = 44.708, p-value = 0.09479
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -1.9456958 0.1608449
## sample estimates:
## mean in group 0 mean in group 1
## 6.136986 7.029412
Students who pulled at least one all-nighter have a higher average poor sleep quality score than students who did not (7.03 vs 6.14). This suggests that all-nighters are associated with worse sleep quality.
## Abstain Heavy
## 8.970588 10.437500
##
## Welch Two Sample t-test
##
## data: StressScore by AlcoholUse
## t = -0.62604, df = 28.733, p-value = 0.5362
## alternative hypothesis: true difference in means between group Abstain and group Heavy is not equal to 0
## 95 percent confidence interval:
## -6.261170 3.327346
## sample estimates:
## mean in group Abstain mean in group Heavy
## 8.970588 10.437500
Students who abstain from alcohol have a lower average stress score (≈8.97) compared to students who report heavy alcohol use (≈10.44). Since lower stress scores indicate better stress levels, abstainers appear to have better stress outcomes than heavy drinkers.
## 0 1
## 4.238411 7.539216
##
## Welch Two Sample t-test
##
## data: Drinks by Gender
## t = -6.1601, df = 142.75, p-value = 7.002e-09
## alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
## 95 percent confidence interval:
## -4.360009 -2.241601
## sample estimates:
## mean in group 0 mean in group 1
## 4.238411 7.539216
Male students consume more alcoholic drinks per week on average (≈7.54) than female students (≈4.24). This suggests that gender is associated with differences in drinking behavior among students.
## high normal
## 24.71500 24.88543
##
## Welch Two Sample t-test
##
## data: WeekdayBed by Stress
## t = -1.0746, df = 87.048, p-value = 0.2855
## alternative hypothesis: true difference in means between group high and group normal is not equal to 0
## 95 percent confidence interval:
## -0.4856597 0.1447968
## sample estimates:
## mean in group high mean in group normal
## 24.71500 24.88543
Students with high stress go to bed at nearly the same time as students with normal stress (24.72 vs. 24.89, about a 10-minute difference). The confidence interval (–0.49 to 0.14) includes zero, meaning the difference could be none at all.
There is no significant difference in weekday bedtime between high-stress and normal-stress students. Stress level does not appear to meaningfully affect what time students go to bed.
## EarlyYears LaterYears
## 8.213592 8.221892
##
## Welch Two Sample t-test
##
## data: WeekendSleep by YearGroup
## t = -0.047888, df = 237.36, p-value = 0.9618
## alternative hypothesis: true difference in means between group EarlyYears and group LaterYears is not equal to 0
## 95 percent confidence interval:
## -0.3497614 0.3331607
## sample estimates:
## mean in group EarlyYears mean in group LaterYears
## 8.213592 8.221892
First and second-year students (EarlyYears) sleep about 8.21 hours on weekends. Third and fourth-year students (LaterYears) sleep about 8.22 hours on weekends. The difference is very small, so descriptively the groups sleep almost the same on weekends.
Overall, the analysis showed several key patterns among college students. Female students had slightly higher GPAs, and underclassmen had more early classes than upperclassmen. Larks performed only slightly better cognitively than Owls, while students with early classes missed fewer classes. Mental health showed the strongest effect—students with moderate or severe depression reported much lower happiness than those with normal depression. Students who pulled all-nighters had worse sleep quality, and heavy drinkers reported higher stress than abstainers. Male students drank more per week than females, but stress level had only a small effect on bedtime. Weekend sleep was nearly identical across class years. Together, these results highlight meaningful links between mental health, lifestyle habits, and student well-being.
Lock5 datasets. (n.d.). https://www.lock5stat.com/datapage3e.html