6  Sleep

Fitbit1 allows users to export their biometric data. The exported data is quite messy and lots of work needed to be done to get it in a neat usable table. We’ll use this rich source of data to investigate questions such as:

  1. How much sleep do I get?

  2. How is the quality of my sleep?

  3. What are the factors that predict a good night of sleep?

  4. What are the effects of a good night of sleep?

6.1 Getting To Know the Data

I wore the Fitbit Blaze tracker (discontinued) from 2017-06-03 to 2019-08-13 for a total of 734 days. I wore the Inspire 2 from 2022-04-10 to 2023-04-26 for a total of 381 days.

6.2 Sleep Quantity?

6.2.1 How much sleep do I get?

Figure 6.1: Distribution of total sleep times

Fitbit tracks both the time in bed and the time spent actually sleeping. As seen in Figure 6.1, I tend to sleep just under 7 hours on average. It’s important to note that I sleep a median of 6.85 hours per night. This is due to the fact that it’s much more probable to get a short night of sleep than an excessively long one. As a result, the distribution is slightly skewed to the left.

Figure 6.2: Distribution of total sleep times by year

Figure 6.2 shows us that I slightly increased my time asleep over the years. The median tends to hover around 7 hours of sleep per night. Moreover, the variance does seem to decrease slightly over the years.

6.2.2 How Often do I Wake Up During the Night?

Figure 6.3: Number of awakenings per night

It’s wise to apply some degree of skepticism when it comes to the accuracy of data collected from a wrist tracker. That said, my average of 27 awakenings per night or 4.2 awakenings per hour falls within the reported normal range according to Fitbit. We tend not to remember these micro-awakenings. However, they can add up to a significant proportion of the night.

6.2.3 How Much Time do I Spend Awake?

Figure 6.4: Number of awakenings per night

In fact, I tend to spend an average of 49 minutes awake which is the equivalent of losing roughly 11% of my nights. This appears to be slightly less than the other Fitbit users in my age group. Furthermore, the sleep profile data below indicates that only about 2% of nights contain a long awakening bout. Macro-awakenings are rare.

6.3 Meta Sleep Profile

A neat feature of Fitbit Premium is that it creates sleep profiles. I happen to be a bear foe every month so far.

From Fitbit

Bears tend to keep a consistent sleep schedule, regularly falling asleep around the same time. They go to bed earlier than most and once they drift off, Bears tend to reach a sound sleep quickly. Their sleep tends to be long and restful, with a relatively high proportion of deep and REM sleep. Bears typically experience few disruptions despite some brief awakenings throughout the night. This consistent, strong sleep routine means daytime naps are rare.

6.3.1 How Long Before I’m Sound Asleep?

The average of the ten sleep profile indicates that it takes roughly 13 minutes before I’m sound asleep. This is relatively quick and confirms my partners observations.

6.3.2 How Often Do I Nap?

I don’t nap often with only 1% of days with a nap.

6.4 Sleep Quality

6.4.1 Enough of each stages

6.4.2 What constitutes the sleep score

6.5 Sleep Times

Figure 6.5: Sleep start time by year.

As seen in Figure 6.5, I started going to bed much earlier somewhere in between 2019 and 2022 when I started tracking my sleep again. I suspect it’s when I moved in with my partner in 2020. She goes to bed relatively early and has a low stimulation night routine starting around 8 or 8:30 PM.

According to Fitbit studies, “people who go to bed earlier tend to get more sleep and get higher quality sleep, with 9 to 10 pm being the time slot that yields the highest average percentage of REM sleep.” Some would say it’d be wise to desperately attempt to move the median asleep time between 9 and 10 PM. However, many important social activities happen after 9 PM and we know that social interactions is a key variable when it comes to well-being. A worthy goal would be to go to bed consistently early on most nights while being able to socialize and deviate from the schedule a couple times per week. Let’s visualize the same data by week day to investigate this habit pattern.

Figure 6.6: Sleep start time by the day of the week.

As expected, Figure 6.6 shows that the sleep times are significantly later on Fridays and Saturdays. This confirms the social hypothesis.

Let’s only consider the sleep data of my first year of teaching from August 30th 2022 to June 23rd 2023. This should paint a more accurate picture of my sleep habits as a high school teacher.

Figure 6.7: Sleep start time by the day of the week during my first year of teaching.

Figure 6.7 reveals that I tend to fall asleep around 10 PM on Sunday through Thursday. Again, all distributions are right-skewed indicating that it’s rare that I go to bed abnormally early while it’s common to go to bed abnormally late. This is especially true for Fridays and Saturdays where the distribution is almost flat. This is not ideal in terms of sleep schedule consistency but it’s also part of being young. I expect these habits to converge in the later stages of life when socializing late on weekends may be more rare.

Figure 6.8: Wake time by the day of the week during my first year of teaching.

In terms of waking habits, Figure 6.8 shows that I don’t sleep in much other than on Saturday and Sundays. During the week, I tend to wake up around 6 AM with relatively little variance.

Looking at Figure 6.9 below, we can see that I wake up earlier and earlier each year in the sample. This makes sense given that I also went to bed earlier each year as seen in Figure 6.5.

Figure 6.9: Wake time by year.

Looking at the entire sample, we can see that I do tend to wake up earlier Monday through Friday and sleep in on weekends. This is true for chapters of my life with no fixed schedules demanding an early start to the day.

Figure 6.10: Wake time by the day of the week.

Let’s plot the time I wake up at and go to bed at on each day of the week.

Figure 6.11: Wake time and night time for each day of the week.

Figure 6.11 is not easy to interpret. The red dots at the top represent of the plot indicate the time I wake up on each day. The red horizontal H is the 95% confidence interval of those wake up times. The blue dots at the bottom are the times I fall asleep on each day.

The rectangles are confusing because they don’t represent one night. Instead, their height is determined by the distance between the average night time and wake up time of each day. The number in the rectangle is simply its height. In other words, the number is some kind of rest factor. If I go to bed early and wake up late, the rectangle will be higher. If I go to bed late and wake up early, the rectangle will be short. The bigger the rectangle, the more restful a day is on average.

It makes sense that Friday has the smallest rest factor. On Fridays, I tend to wake up early for work and go out in the evenings. Furthermore, Sunday’s rest factor is significantly higher than the rest. This isn’t surprisingly given that I tend to sleep in on Sundays and go to bed early in preparation for the week ahead.

Let’s investigate the truth of this pattern over the years.

Figure 6.12: Wake time and night time for each day of the week.

All years in Figure 6.12 exhibit a U-shaped pattern. Sunday and Friday are indeed the days with the biggest and smallest rest factor respectively. This is in alignment with the approach of the Sabbath. I make a conscious effort to rest on Sundays and prepare for the week. This is where I sharpen the saw.

6.6 Quantifying Consistency

There are many ways to quantify the consistency of sleep times. The typical way to measure volatility is to use the standard deviation which is a measure of the distance between observations and their average. Comparing observations to their mean doesn’t make sense given that my sleep tends to be one way during the week and another during the weekend. The mean wake up time would fall somewhere in between my week wake up time and my weekend wake up time resulting in distance for all days. Consequently, a day-to-day measure of volatility may be more applicable when looking at sleep times. Standard deviation is a useful metric when looking at sleep duration. The schedule variability metric (measured in hours) found in the sleep profile “shows how much your sleep schedule varies from day to day”.

Let’s start by calculating the monthly standard deviation of day-to-day sleep duration.

Figure 6.13: Monthly standard deviations of duration.

It looks like my sleep durations are more consistent in the later years. This confirms the tighter distributions seen in Figure 6.2.

The monthly standard deviation is correlated to Fitbit’s metric of schedule variability. However, the schedule variability is measured in hours while the standard deviation is measured in minutes. This implies that Fitbit’s metric is not measured as the standard deviation of sleep duration. Instead, let’s investigate whether its measured as the total of day to day changes in bed times and wake times.


  1. Now owned by Google↩︎