Edit Content
Click on the Edit Content button to edit/add the content.
How Different Lifestyles Affect Sleep?

Key Words:

Sleep Efficiency, Smoking & Sleep, Caffeine Consumption, ANOVA Analysis, Statistical Analysis,

Data Visualization

 

Tools:

R, Tableau, Kaggle Dataset,

Google Sheets / Excel

Research Paper Link:

Here

Project Overview

Sleep plays a crucial role in maintaining physical health, yet many lifestyle factors are believed to impact sleep quality. This study aims to explore whether smoking and alcohol consumption significantly affect sleep duration.

Previous research suggests a potential link between smoking and sleep disturbances, as well as alcohol’s mixed effects on sleep, with low doses aiding sleep onset but high doses leading to nighttime disruptions. This study leverages a dataset containing 453 records of sleep-related data, examining the statistical relationship between lifestyle choices and sleep efficiency.

 

Data Collection & Methodology

The dataset used in this study, obtained from Kaggle, contains 15 variables, including:

  • Sleep-related variables: Sleep efficiency, REM sleep percentage, deep sleep percentage, sleep duration, number of awakenings.
  • Lifestyle factors: Alcohol consumption, smoking status, exercise frequency, caffeine intake.
  • Demographics: Age, gender.
Dataset Preview

To ensure the validity of the analysis, data was cleaned by:

  • Removing individuals who consumed caffeine within the past 24 hours (as caffeine is a confounding factor).
  • Grouping alcohol consumption into three categories: Non-drinkers, low intake (1-2 oz), and high intake (3-5 oz).
Cleaned Dataset Preview

Research Questions & Hypotheses

1. Does smoking affect sleep duration?

  • Null Hypothesis (H₀): There is no significant difference in sleep duration between smokers and non-smokers.
  • Alternative Hypothesis (H₁): Smokers have significantly different sleep durations compared to non-smokers.
  • Statistical Method: Independent samples t-test to compare the means of two groups.

2. Does alcohol consumption impact sleep duration?

  • Null Hypothesis (H₀): Alcohol consumption levels do not significantly affect sleep duration.
  • Alternative Hypothesis (H₁): Different alcohol consumption levels result in variations in sleep duration.
  • Statistical Method: ANOVA test to compare sleep duration across three alcohol consumption groups.

Analysis & Visualization

1. Smoking & Sleep Duration

Independent t-test results:

  • t(112.41) = -0.71977, p = 0.4732
  • The p-value is not significant, indicating no strong evidence that smoking status influences sleep duration.
  • Conclusion: We fail to reject the null hypothesis, meaning smoking does not significantly affect sleep duration in this dataset.
Independent t-test comparing sleep duration between smokers and non-smokers

2. Alcohol & Sleep Duration

ANOVA test results:

  • F(2, 201) = 0.127, p = 0.881
  • No significant differences were found in sleep duration between non-drinkers, low-alcohol, and high-alcohol consumers.
  • Post-hoc Tukey Test results further confirmed no significant pairwise differences among the groups.
  • Conclusion: The study fails to reject the null hypothesis, meaning alcohol consumption levels do not significantly impact sleep duration.
ANOVA test results for alcohol consumption and sleep duration

I also created a Tableau dashboard to visualize the data. Users can select different variables to explore their relationship with sleep efficiency.

Final Deliverable

Key Takeaways:

  • Neither smoking nor alcohol consumption showed a statistically significant effect on sleep duration.
  • Potential limitations include small sample sizes for certain groups and lack of long-term sleep tracking.
  • Confounding variables (e.g., stress, activity levels) were not fully accounted for, possibly impacting the results.

Future Research Directions:

  • Control additional confounding variables, such as emotional state and daily activity levels.
  • Expand the dataset to balance the number of participants in each group.
  • Analyze long-term sleep trends instead of single-day sleep data for more accurate insights.

The full research report can be accessed here.

© YU-HSIEN WU 2025 | All Rights Reserved