1. Introduction

I used the data from SleepStudy data that explores the sleep patterns in college students in the United States of America.

I propse the following 10 questions:

2. Analysis

I will explore the question in details below.

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

Q1. 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

Based on the results: Here are some key findings: Significant difference: The p-value (0.0001243) is extremely low, indicating a statistically significant difference in average GPA between male and female students. Direction of difference: The mean GPA for males (Group 1) is higher than for females (Group 0).

Based on this analysis, I can conclude that on average, male students in this dataset tend to have a higher GPA than female students, with a statistically significant difference.

Q2. What is the correlation between students who had poor sleep quality and their GPA?

## [1] -0.05223028

The correlation between students’ Poor Sleep Quality and GPA is: r = -0.0522 Interpretation: There is a weak negative correlation between Poor Sleep Quality and GPA. Key points: Negative correlation: As Poor Sleep Quality increases (higher values), GPA tends to decrease.

Q3. 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 ClassYear
## t = 4.1813, df = 250.69, p-value = 4.009e-05
## alternative hypothesis: true difference in means between group FirstTwoYears and group OtherYears is not equal to 0
## 95 percent confidence interval:
##  0.4042016 1.1240309
## sample estimates:
## mean in group FirstTwoYears    mean in group OtherYears 
##                    2.070423                    1.306306

Key findings: Significant difference: The p-value (4.009e-05) is extremely low, indicating a statistically significant difference in average number of early classes between the two groups. Direction of difference: The mean number of early classes is higher for the first two class years (2.070) compared to other class years (1.306). Practical implications: Students in the first two class years tend to take significantly more early classes than students in later class years.

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

The boxplot above shows the from the data set Sleep Study, The students who identify as “larks” tend to have better cognition Z score that the “owl” students

Q5. 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)?

The histograms will show you the distribution of the number of classes missed for each group. By visually comparing the shapes of the two histograms, you can see if the distributions of classes missed for the two groups differ in any noticeable way. Student without early morning classes seemed to have skipped more classes.

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

From the boxplot about, I observed that student with at least moderate depression tend to have higher happiness level to those with nromal depression from the data set.

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

From the data set,students who abstain from alcohol generally report significantly lower stress scores compared to those who engage in heavy alcohol use. This historgram above shows it all.

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

## 
##    Low Medium   High 
##     88     94     71
##    
##     Low Medium High
##   0  64     70   17
##   1  24     24   54

The pie charts above shows that from the dataset, that male tend to drink more than women.

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

From the datset given, there seem not to be much difference as shown in the barplot above.

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

This shows that students in the first 2 years of college sleep more than those in the last 2 years of college.

3. Summary

This project shows factors affecting students’ behavior and well-being. It includes examining gender differences in GPA, analyzing the correlation between sleep quality and GPA, and comparing early class attendance across different class years. It also investigates whether larks (early risers) perform better in cognitive skills than owls (night owls), and whether students with early classes miss more classes. The study further explores the relationship between happiness and depression levels, alcohol use and stress, as well as gender differences in alcohol consumption. Additionally, it looks at weekday bedtimes and stress levels, and compares weekend sleep between first-year students and others. These questions aim to uncover significant trends in students’ academic, behavioral, and health-related aspects.