Introduction

This report analyzes the data from a study of college students’ sleep patterns. The data comes from the “SleepStudy” dataset, sourced from Lock5Stat. (https://www.lock5stat.com/datapage3e.html) This dataset consists of 253 observations across 27 variables.

Questions

The following questions that will be analyzed in this report are given to us in the directions for project #2:

  1. Is there a significant difference in the average GPA between male and female college students?

  2. Is there a significant difference in the average number of early classes between the first two class years and other class years?

  3. Do students who identify as “larks” have significantly better cognitive skills (cognition z-score) compared to “owls”?

  4. Is there a significant difference in the average number of classes missed in a semester between students who had at least one early class (EarlyClass=1) and those who didn’t (EarlyClass=0)?

  5. Is there a significant difference in the average happiness level between students with at least moderate depression and normal depression status?

  6. Is there a significant difference in average sleep quality scores between students who reported having at least one all-nighter (AllNighter=1) and those who didn’t (AllNighter=0)?

  7. Do students who abstain from alcohol use have significantly better stress scores than those who report heavy alcohol use?

  8. Is there a significant difference in the average number of drinks per week between students of different genders?

  9. Is there a significant difference in the average weekday bedtime between students with high and low stress (Stress=High vs. Stress=Normal)?

  10. Is there a significant difference in the average hours of sleep on weekends between first two year students and other students?

By sequentially analyzing these questions, this report aims to find distinctions between college students when they are grouped by various characteristics. Through this analysis, this report focuses on finding significant and non-significant data, making insights on possible cause and effect relationships.

Data

Lock5’s Dataset Documentation for the third edition of “Statistics: Unlocking the Power of Data, 3rd Edition” gives the following information for the dataset:

“A dataset with 253 observations on the following 27 variables.

Gender - 1=male, 0=female

ClassYear - Year in school, 1=first year, …, 4=senior

LarkOwl - Early riser or night owl? Lark, Neither, or Owl

NumEarlyClass - Number of classes per week before 9 am

EarlyClass - Indicator for any early classes

GPA - Grade point average (0-4 scale)

ClassesMissed - Number of classes missed in a semester

CognitionZscore - Z-score on a test of cognitive skills

PoorSleepQuality - Measure of sleep quality (higher values are poorer sleep)

DepressionScore - Measure of degree of depression

AnxietyScore - Measure of amount of anxiety

StressScore - Measure of amount of stress

DepressionStatus - Coded depression score: normal, moderate, or severe

AnxietyStatus - Coded anxiety score: normal, moderate, or severe

Stress - Coded stress score: normal or high

DASScore - Combined score for depression, anxiety and stress

Happiness - Measure of degree of happiness

AlcoholUse - Self-reported: Abstain, Light, Moderate, or Heavy

Drinks - Number of alcoholic drinks per week

WeekdayBed - Average weekday bedtime (24.0=midnight)

WeekdayRise - Average weekday rise time (8.0=8 am)

WeekdaySleep - Average hours of sleep on weekdays

WeekendBed - Average weekend bedtime (24.0=midnight)

WeekendRise - Average weekend rise time (8.0=8 am)

WeekendSleep - Average weekend bedtime (24.0=midnight)

AverageSleep - Average hours of sleep for all days

AllNighter - Had an all-nighter this semester? 1=yes, 0=no”

The variables in bold were those that were used for the analyses.

We are also given this information: “The data were obtained from a sample of students who did skills tests to measure cognitive function, completed a survey that asked many questions about attitudes and habits, and kept a sleep diary to record time and quality of sleep over a two week period.”

Analysis

#1: Is there a significant difference in the average GPA between male and female college students?

## 
##  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

The t-test reveals a statistically significant difference in GPA between male and female students (t = 3.9139, p = 0.0001243). Female students report a higher GPA on average (3.32) compared to male students (3.12). The 95% confidence interval for the difference in means ranges from 0.1 to 0.3.

#2: 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 FirstTwoYears and group LaterYears is not equal to 0
## 95 percent confidence interval:
##  0.4042016 1.1240309
## sample estimates:
## mean in group FirstTwoYears    mean in group LaterYears 
##                    2.070423                    1.306306

The t-test reveals a statistically significant difference in the number of early classes between students in their first two years and students past their first two years (t = 4.1813, p = 4.009e-05). Students in their first two years have more early classes on average (2.07) compared to students past their first two years (1.31). The 95% confidence interval for the difference in means ranges from 0.40 to 1.12.

#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 t-test reveals no statistically significant difference in cognitive scores between students identifying as larks and those identifying as owls (t = 0.8057, p = 0.4229). Larks report a slightly higher average cognition score (0.09) compared to owls (-0.04). The 95% confidence interval for the difference in means ranges from -0.19 to 0.45.

#4. Is there a significant difference in the average number of classes missed in a semester between students who had at least one early class (EarlyClass=1) and those who didn’t (EarlyClass=0)?

## 
##  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

The t-test reveals no statistically significant difference in the number of classes missed between students with and without early classes (t = 1.4755, p = 0.1421). Students without early classes miss slightly more classes on average (2.65) compared to those with early classes (1.99). The 95% confidence interval for the difference in means ranges from -0.22 to 1.54.

#5. Is there a significant difference in the average happiness level between students with at least moderate depression and normal depression status?

## 
##  Welch Two Sample t-test
## 
## data:  Happiness by DepressionStatus
## t = -4.3253, df = 43.992, p-value = 8.616e-05
## alternative hypothesis: true difference in means between group moderate and group normal is not equal to 0
## 95 percent confidence interval:
##  -5.818614 -2.119748
## sample estimates:
## mean in group moderate   mean in group normal 
##               23.08824               27.05742

The t-test reveals a statistically significant difference in happiness levels between students with moderate depression status and those with normal depression status (t = -4.3253, p = 8.616e-05). Students with moderate depression status have lower happiness levels on average (23.09) compared to those with normal depression (27.06). The 95% confidence interval for the difference in means ranges from -5.82 to -2.12.

#6. Is there a significant difference in average sleep quality scores between students who reported having at least one all-nighter (AllNighter=1) and those who didn’t (AllNighter=0)?

## 
##  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

The t-test reveals no statistically significant difference in poor sleep quality scores between students who reported having an all-nighter and those who didn’t (t = -1.7068, p = 0.09479). Students who didn’t have an all-nighter report slightly better sleep quality scores on average (6.14) compared to those who did (7.03). The 95% confidence interval for the difference in means ranges from -1.95 to 0.16.

#7. Do students who abstain from alcohol use have significantly better stress scores than those who report heavy alcohol use?

## 
##  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

The t-test reveals no statistically significant difference in stress scores between students who abstain from alcohol and those who report heavy alcohol use (t = -0.6260, p = 0.5362). Students who abstain report slightly lower stress scores on average (8.97) compared to heavy drinkers (10.44). The 95% confidence interval for the difference in means ranges from -6.26 to 3.33.

#8. Is there a significant difference in the average number of drinks per week between students of different genders?

## 
##  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

The t-test reveals a statistically significant difference in the average number of drinks per week between male and female students (t = -6.1601, p = 7.002e-09). Male students report consuming more drinks per week on average (7.54) compared to female students (4.24). The 95% confidence interval for the difference in means ranges from -4.36 to -2.24.

#9. Is there a significant difference in the average weekday bedtime between students with high and low stress (Stress=High vs. Stress=Normal)?

## 
##  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

The t-test reveals no statistically significant difference in weekday bedtime between students with high stress and those with normal stress (t = -1.0746, p = 0.2855). Students with high stress report a slightly earlier average bedtime (24.72) compared to those with normal stress (24.89). The 95% confidence interval for the difference in means ranges from -0.49 to 0.14. It is important to note, said on the graph, that 24 = midnight. This means that 25 = 1:00 am, so college students of both groups go to bed a bit before 1:00 am on average.

#10. Is there a significant difference in the average hours of sleep on weekends between first two year students and other students?

## 
##  Welch Two Sample t-test
## 
## data:  WeekendSleep by ClassGroup
## t = -0.047888, df = 237.36, p-value = 0.9618
## alternative hypothesis: true difference in means between group FirstTwoYears and group LaterYears is not equal to 0
## 95 percent confidence interval:
##  -0.3497614  0.3331607
## sample estimates:
## mean in group FirstTwoYears    mean in group LaterYears 
##                    8.213592                    8.221892

The t-test reveals no statistically significant difference in average weekend sleep hours between students in their first two years and students past their first two years (t = -0.0479, p = 0.9618). Students in their first two years report an average of 8.21 hours of sleep, which is nearly identical (within 0.01 hours) to students past their first two years (8.22). The 95% confidence interval for the difference in means ranges from -0.35 to 0.33.

Summary

From the analyses done above, there are varying results. 40% of the analyses yield a significant difference between the two samples being compared when using the t-test.

The analyses which yield significant difference are as follows:

The other 60% of the analyses yield no significant difference between the two samples being compared when using the t-test.

The analyses which yield no significant difference are as follows:

The significant results show differences in GPA and alcohol use between genders, the scheduling of early classes for younger students, and how moderate depression affects happiness. An interesting statistic from the significant results are that two of the analyses (#1 and #8) share the same parameter, gender. This means that there is possibly a significant gap between gender for other statistics.

The non-significant results suggest that things such as cognitive skills, class attendance, sleep quality, stress scores, and sleep habits do not vary significantly between the groups that are tested. There might be changes from non-significant to significant results if the sample groups were changed. These factors could be influenced by other things that were not measured.

References

The data used for this project comes from Lock5’s Statistics: Unlocking the Power of Data, 3rd Edition. The spreadsheet can be found on https://www.lock5stat.com/datapage3e.html under the Dataname “SleepStudy.” The information about this spreadsheet can be found on Pg. 82-83 of Lock5’s Dataset Documentation for the third edition of “Statistics: Unlocking the Power of Data, 3rd Edition”. (https://www.lock5stat.com/datasets3e/Lock5DataGuide3e.pdf)

The Dataset Documentation PDF sources the following for the “SleepStudy” dataset: “Onyper, S., Thacher, P., Gilbert, J., Gradess, S.,”Class Start Times, Sleep, and Academic Performance in College: A Path Analysis,” April 2012; 29(3): 318-335.”