SleepCoacher: how to complete your 2019 resolution to sleep better, one self-experiment at a time
We are already at the end of January, so perhaps you already started (and maybe even dropped?) some new year’s resolutions. We are here to help with at least one of those with a one of a kind sleep-tracking mobile application — SleepCoacher. The best part? It’s completely free and developed by us, a group of researchers at Brown University.
According to a study by the National Sleep Foundation, despite that fact that most Americans sleep within the recommended number of 7 hours a night, 35% of them report their sleep quality as “poor” or “only fair.” Some people need more sleep than others, some are night owls while others are early birds, and some are more sensitive to noise. To know how to sleep better, you need to know more about yourself.
With that in mind, we in the Brown University’s Human-Computer Interaction research group partnered with professional sleep clinicians to develop SleepCoacher: an Android smartphone app that takes you beyond the usual sleep-tracking to actually running experiments on your sleep in order to understand what helps you sleep better and what doesn’t.
Traditional sleep studies, such as polysomnography, require people to spend the night in a clinic with multiple electrodes attached to their scalp and eyelids. Those studies are the ideal method to diagnose severe sleep disorders. However, there is no go-to method for working on transient sleep problems.
Alternatively, you can use other sleep-tracking apps or wrist-worn devices, but they rarely provide recommendations for actually improving your sleep. We actually conducted a study, in which we compared some of the most popular sleep trackers (including one research-standard actigraph as a control) across 10 nights and then graphed the data against each other. Our findings tell that these consumer-level sleep reports should be taken with a grain of salt.
SleepCoacher was designed to be your own personal sleep coach: it shows you a list of sleep expert-approved suggestions that you can incorporate into your life and see if they help you sleep better.
How the app works
Step 1: Choose something to experiment with.
The app has a list of about 30 experiments you can choose from, such as “Sleeping with Earplugs” or “Drinking Chamomile tea.”
Step 2: Track your sleep for a few nights.
You need to keep your phone on your bed while you sleep because SleepCoacher uses the accelerometer in the phone to track how much you move during the night, and the microphone to collect sound amplitude (without actually recording any sound ever!).
When you tap the “Track Sleep” button, a pop up asks you how tired you are feeling, and if you did anything out of the ordinary today that might affect your sleep, such as drinking alcohol or coffee before bed.
When you wake up, you tap the “Wake Up” button and the system reviews your sleep and learns how your behaviors and sleep quality are related.
SleepCoacher will tell you what the “condition” for each day is: for example, tonight wear earplugs, but tomorrow do not.
Step 3: Get a result.
After a few nights of tracking your sleep and following the instructions of what to do, SleepCoacher lets you know which condition is more likely to help you sleep better (e.g. there is an 83% likelihood that wearing roomier PJs is helping you fall asleep faster).
This result is based on a technique called Thompson Sampling The technique evaluates if the experiment is helping you or not, and how likely that is. The likelihood changes with time, as you continue tracking your sleep for more nights.
You can also change to a new experiment whenever you want.
SleepCoacher also has a history tab that displays information about your recent nights of tracked sleep. It shows how many times you woke up during the night, how long it took you to fall asleep, and how long you were asleep for, and it uses all this data to calculate your overall “sleeping score”.
We hope that information is useful for you to understand yourself: what helps you sleep better, what affects your night of sleep, how long you usually take to fall asleep, and if any behavior changes that in a positive or negative way.
Cost: Free! (it is a part of a research project, so there is no cost to download or use the app)
How is it different from other sleep tracking apps: it lets you experiment with a behavior change and actually calculates the result for you.
The science behind SleepCoacher
First, the list of possible experiments was developed with the help of clinicians with expertise in sleep, behavior change, and individual differences in health outcomes. While there are many other experiments possible, the list was pared to the ones most likely to be beneficial to a general user.
Second, SleepCoacher uses a technique from artificial intelligence, called Thompson Sampling, to identify which condition (doing nothing or trying the experiment) is more likely to be improving your sleep. Thompson Sampling is a randomized algorithm based on Bayesian statistics: it looks at the sleep data so far for each condition and builds a probability distribution for each one.
For example, if your experiment is about wearing earplugs, and you fall asleep in 10 mins and 15 mins on the nights you wear earplugs, but in 20 mins and 25 mins on the nights that you don’t, then the two distributions will look different.
Then it samples from those distributions and returns the one that yields a better sleep. The condition that yields a better sleep more often (in this example, wearing earplugs), is the one that’s more likely to be improving sleep overall, so it recommends it to the user for that night (“Tonight, wear earplugs”). It also shows the actual likelihood that it will lead to improvement (for example, 78% likely that earplugs will improve your sleep). Then, based on the actual sleep data that was collected that night, it updates the posterior and the shape of the probability distributions.
This process repeats every time the user goes to sleep, so when you wake up in the morning, you get an updated prediction of how likely it is that the experiment is helping you sleep better.
We hope that SleepCoacher can be a useful tool for anyone who wants to improve their sleep through an innovative self-experimentation technique. The app’s iOS version is currently under development and will be released in early 2019 and you can sign up for updates here. We currently have an Android App on the Play Store. Please feel free to check it out and if you want to know more information about SleepCoacher, access its website here. Let us know if you have any new ideas or suggestions for the app, or simply how the experience of using it was at firstname.lastname@example.org!