Final Project: How Education Impacts Sleep and Anxiety

Author

Roe Breckenridge

Introduction

Mental health is an important issue for many college students and working adults. Throughout my time pursuing my bachelor’s degree, I have personally experienced periods of high anxiety and reduced sleep due to academic responsibilities, deadlines, and balancing other obligations.


This topic is interesting to me because of how I’ve felt pursuing my bachelor’s degree. I’ve had to sacrifice a lot of sleep and have had high anxiety throughout the process. I want to see if my dataset supports what I have experienced.

The purpose of this project is to explore the relationship between education level, sleep hours, and anxiety scores using a mental health dataset.

Dataset

This dataset is titled Anxiety and Depression Mental Health Factors and can be found on kagglee.com or at this link:

https://myxavier-my.sharepoint.com/:x:/g/personal/breckenridger_xavier_edu/IQAGiidXk2xHT5SxYSGmOhPUAWUOcRa1QM4kL35VRG_elns?download=1

It contains responses from individual persons regarding factors related to anxiety, depression and mental health. The definition of each row is a subject (person) who completed a mental health factors survey. The dataset contains information related to mental health and lifestyle factors including:
- Education level
- Sleep hours
- Anxiety scores
- Stress levels
- Medication use

Sleep Hours vs Anxiety Scores

When approaching the data, I expected to see that people with fewer hours of sleep would report higher anxiety scores because that has reflected my personal experience throughout college.

The boxplot supports that individuals in the low sleep category generally show high anxiety levels but not that much different than other sleep categories.

Medication Use by Education Level

I wanted to examine whether medication use changes across education levels because increasing academic pressure may affect mental health. The following table helps us do that.

# A tibble: 15 × 3
   Education_Level Medication_Use     n
   <chr>           <chr>          <int>
 1 Bachelor's      None             132
 2 Bachelor's      Occasional        37
 3 Bachelor's      Regular           45
 4 High School     None             159
 5 High School     Occasional        37
 6 High School     Regular           46
 7 Master's        None             143
 8 Master's        Occasional        41
 9 Master's        Regular           58
10 Other           None             150
11 Other           Occasional        52
12 Other           Regular           38
13 PhD             None             163
14 PhD             Occasional        48
15 PhD             Regular           51

The table suggests that medication use varies across education levels. Some education groups appear to report higher medication usage than others, which may indicate differences in stress and anxiety management.

Anxiety Scores by Education Level

I expected higher education levels to show higher anxiety scores because advanced education often comes with increased academic pressure and responsibilities.

This visualization groups individuals into low, moderate, and high anxiety categories and compares those counts across education levels. The chart helps show how anxiety distributions differ between educational groups in a way that is easier to interpret visually.

Sleep Categories Across Education Levels

I expected individuals pursuing more advanced education to report lower sleep levels because advanced education often requires balancing coursework, studying, and outside responsibilities. This visual categorizes the sleep hours of the survey respondents into three categories (low, moderate, and high), and compares those counts across education levels.

Stress Level Distribution

Stress is closely related to both sleep and anxiety, so I wanted to examine the distribution of stress levels across the dataset. Although there are some outliers, the histogram shows that stress levels are concentrated in the moderate-to-high range, which aligns with the anxiety trends shown throughout this project.

Conclusion

This project allowed me to analyze a topic that feels personally meaningful throughout my college experience. Overall, the dataset supports many of the experiences I have had while pursuing my degree.

The visualizations suggest that lower sleep levels are not necessarily associated with higher anxiety but stress, and education level may play a role in those relationships.

This project demonstrates how data analysis can help connect personal experiences to measurable trends in real-world datasets.