The connection between sleep quality and screen time¶

(Part 1)¶

Describes and motivates a real-world problem where data science may provide helpful insights.¶

I am very interested in studying the link between phone usage and sleep quality because it is a topic that has generating ever-growing attention in recent years. With the widespread use of smartphones and other electronic devices, a considerable proportion of the population now spends a significant amount of time on their phones before going to sleep. However, there is growing concern that this behavior may be negatively impacting our sleep quality. This is particularly worrisome since poor sleep has been causally linked to a myriad of negative health outcomes, including heightened susceptibility to obesity, diabetes, heart disease, and mental health issues. By meticulously examining the relationship between phone usage and sleep quality, we can potentially develop interventions to help people improve their sleep habits and mitigate the risk of these adverse health outcomes.¶

Citations:¶

https://www.ncbi.nlm.nih.gov/pmc/articles/PMC7320888/ https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6191085/ https://journals.plos.org/plosone/article?id=10.1371/journal.pone.0228756

(Part 2)¶

Explicitly load and show your dataset (done in the cell below). Provide a data dictionary which explains the meaning of each feature present. Demonstrate that this data is sufficient to make progress on your real-world problem described above.¶

There are 11 columns in the data:¶

  • Age describe the age of the person
  • Gender shows the gender the participant identified as
  • Meals/day shows the number of meals a person is having per day (categorical variable)
  • Physicall illness column includes the detail about their illness (binary data yes/no)
  • Screen time includes the amount of time a person spends in a day in front of a phone, screen time is a categorical variable.
  • Bluelight filter tells whether a person uses blue light filter at night or not (binary data yes/no)
  • Sleep direction refers to which direction people slept in (categorical variable east, west, north, south)
  • Exercise describes roughly how much exersize someone got in a day (categorical variable yes, no, sometimes)
  • Smoke/drink describes whether or not the individual smokes or drinks (binary data yes/no)
  • Beverage states which beverages participants drank that day (categorical variable tea, coffee, both)
  • Sleep time describes how much sleep time the participant got in hours

I would use the age, gender, screen time, bluelight filter, and sleep time collumns to provide valuable insights into the correlation between screen time and sleep quality. By using statistical methods, it is possible to determine the strength and direction of the relationship between these two variables. A positive correlation would indicate that an increase in screen time is associated with a decrease in sleep quality, while a negative correlation would suggest the opposite. In addition to determining the correlation between screen time and sleep quality, the data set could also be used to investigate how other variables such as age, gender, and the use of a bluelight filter may affect this relationship. This information can be used to inform interventions aimed at reducing screen time and improving sleep quality, particularly for individuals who may be more susceptible to the negative effects of screen time (depending on age or gender if there is a notable difference in the effect of screen time in the various groups).¶

(Part 3)¶

Write one or two sentences about how the data will be used to solve the problem.¶

Machine learning algorithms can be trained on data containing sleep time, screen time, age, gender, and use of a blue light filter to predict and classify the likelihood of poor sleep quality resulting from excessive screen time, which can aid in developing effective interventions and personalized recommendations for individuals to improve their sleep hygiene.¶

Particpants could even be clustered into those who use blue light filters and those who do not to see if that has a greater affect on sleep and how the change in filter affects sleep. Not only that but it would be inetresting to explore how gender and age interact with screen time and see how much of an effect increased screen time have on various age groups and genders and who is more suceptible to poor sleep due to screen time and lack of a blue light filter.¶

In [2]:
import pandas as pd 

sleepCSV = 'Sleep_Analysis.csv'

sleepDF = pd.read_csv(sleepCSV)
sleepDF.head(15)
Out[2]:
Age Gender meals/day physical illness screen time bluelight filter sleep direction exercise smoke/drink beverage sleep time
0 22 Male two no 2hrs yes west sometimes no Tea 6.7575
1 22 Female three no 3-4 hrs no south no no Coffee 8.0000
2 23 Male three no 3-4 hrs no south no no Tea 8.0000
3 23 Female two no 1-2 hrs no east sometimes no Coffee 6.5000
4 22 Male three no more than 5 yes east sometimes yes Tea and Coffee both 6.0000
5 22 Male two no 2-3 hrs yes west sometimes no Tea 6.7575
6 22 Male four no 1-2 hrs yes south yes no none of the above 7.0000
7 24 Female three yes 4-5 hrs no east sometimes no Tea 6.5000
8 24 Male four no 2-3 hrs yes east yes no none of the above 8.0000
9 23 Female three no more than 5 yes north yes yes Tea and Coffee both 7.0000
10 28 Female three no 0-1 hrs yes north yes no Tea 6.5000
11 59 Male two no 0-1 hrs no west no no Tea 6.0000
12 23 Female three no 4-5 hrs no west sometimes no Tea 8.0000
13 25 Prefer not to say more than 5 no more than 5 yes east yes no Coffee 1.5000
14 23 Male three no 3-4 hrs no north sometimes no Coffee 8.0000