What are we working with?
The Sleep Efficiency Dataset evaluates 452 individuals are their sleep patterns. It contains unique information about the study participants such as an ID and age, but also features categories such as “wake-up time” and “bedtime.” There are also external factors recorded as well; nightly awakenings, caffeine consumption, alchol consumption, and if the smoking status of the subject.
Source?
This data was sourced from www.kaggle.com, a large repository for any kind of data you would want. The account, Equilibriumm, published this data. I did have to chop down on some of the data, so my version can be found with the following link: https://myxavier-my.sharepoint.com/:x:/g/personal/langleyt_xavier_edu/EaMo0ZYhKP5DoaiElMeXSZYBV3CgeCjte4_BlIVozNei4w?download=1
Variables:
Variable | Description |
---|---|
ID | unique ID for each participant. |
Age | age of the participant. |
Gender | male or female. |
Bedtime | date and time of sleep. |
Sleep Duration | the total amount of time the test subject slept (in hours). |
Sleep efficiency | a measure of the proportion of time in bed spent asleep. |
REM sleep percentage | the percentage of total sleep time spent in REM sleep. |
Wakeup time | the time the test subject wakes up each morning. |
Sleep efficiency | a measure of the proportion of time in bed spent asleep. |
REM sleep percentage | the percentage of total sleep time spent in REM sleep |
Deep sleep percentage | the percentage of total sleep time spent in deep sleep. |
Light sleep percentage | the percentage of total sleep time spent in light sleep. |
Awakenings | the number of times the test subject wakes up during the night. |
Caffeine consumption | the amount of caffeine consumed in the 24 hours prior to bedtime (in mg). |
Alcohol consumption | the amount of alcohol consumed in the 24 hours prior to bedtime (in oz). |
REM sleep percentage | the percentage of total sleep time spent in REM sleep. |
Smoking status | whether or not the test subject smokes. |
Exercise frequency | the number of times the test subject exercises each week. |
How does sleep efficiency change across genders? At that, how does alcohol consumption affect sleep and it does it change with gender as well?
Even though there seems to be more men than women in the dataset, sleep
efficiency seems evenly distributed among both. Between 7 and 8.5 hours
seem to be the best times to sleep for the best sleep, and those who
consume less alcohol score higher in sleep efficiency. Even with more
sleep, drinking dampens sleep efficiency.
How does caffeine affect nightly awakenings?
## Warning: Removed 25 rows containing non-finite values (`stat_boxplot()`).
It may be due to American’s excessive intake of caffeine, but for most,
caffeince did not hurt their sleep cycle. The dataset did not specify
when the caffeine was taken, so morning users would have little effect
on their sleep schedule. However, those who consumed around 25mg
sturggled to stay asleep more. The visual shows that around that mark,
you either sleep without issue or you wake up twice in the night. The
last category, NA, may represent 4+ awakenings or the study participants
did not specify.
Does exercise correlate with a higher percentage of REM sleep?
## Warning: Continuous x aesthetic
## ℹ did you forget `aes(group = ...)`?
## Warning: Removed 6 rows containing missing values (`stat_boxplot()`).
The median exercise frequency is right at 2.5 times a week. According to
the visualization, about 22% of your sleep should be in REM if you
exercise 2.5 times a week. The Cleveland Health Clinic states that about
25% of your sleep should be in REM. There are also other external
factors such as sugar intake that could heavily influence your REM
sleep.
Do elderly people report lighter sleep? If so, do they wake up more in the night?
The amount of elderly people in this data set is pretty low, so the
confidence rate is terribly high for their stats. With that said, those
who awake more thoughout the night report a higher median Light sleep
percentage than those who do not wake up in the night. For 0 nightly
Awakenings, they get around 16% light sleep. Those with 2+ awakenings
get about the same median light sleep at 20%.
How does gender and age affect your overall sleep?
(For
reference, until my R skills get sharper: Female FALSE means women under
60 years old, Female TRUE means women over 60+ years old, Male FALSE
means men under 60 years old, Male TRUE means men 60+ years old.)
Interestingly, elderly women report less REM sleep than younger women.
However, this does not carry across genders. Elderly men report the
highest median REM sleep at 25% than any other category. Younger men
also report lower REM sleep percentages (around 22%).