I took my first statistics class around 2013, back when I thought I was going to apply to physical therapy school. It was boring as could be and I dreaded every minute of it.

Then I decided to go the master's-in-exercise-science route instead, and I had a great teacher. Statistics became cool again. We used real-world examples and focused on actually learning the software rather than reciting the central limit theorem (please don't fall asleep yet).

Then I started my PhD and took statistics again. Right back to boring. Like, really boring. My professor explained dichotomous outcomes, variables that boil down to a 0 or a 1, by telling us about the time (plug your ears Scout) his dog fell down the stairs and died. Dead or alive, he said. Zero or one. Incredibly strange story, and the only thing I remember from that class. Oh, and then there was the level-2 statistics class. Also really, really boring.

By the time I was writing my dissertation, I knew I needed one more class with someone who could actually explain this stuff. That class was awesome. We started looking at models that applied to behavioral psychology, and, you guessed it, I got excited about statistics all over again. I'm apparently doomed to cycle between good and bad statistical experiences forever.

Here's the easiest way I know to understand a regression, a common analysis, which is really just a prediction model:

Say I survey 100 people on Sunday and ask how motivated they are to walk 30 minutes a day. At the end of the week, I survey them again and ask how much they actually walked. I use their Sunday motivation to predict their behavior.

A multiple regression just adds more inputs. On Sunday I'd ask not only about motivation, but whether they have a walking buddy, how much free time they have, whether walking is already a habit, and how convenient the trails near them are. Then I use all of it to predict how much they walked.

The problem?

It leans entirely on projecting yourself into the future. Motivation swings day to day. So does your free time. And what happens when your walking buddy cancels on Wednesday morning? Some inputs like walking trail convenience and whether walking is already a habit are stable. They barely move. But most of the things that actually decide your day are not stable at all.

So these models are useful, but they're not personal. There are plenty of tests for whether people differ from each other. Do high-motivation people walk more than low-motivation people? Those tests are right that people are different. But they miss something just as important:

You are a different person in different contexts.

You on Sunday are not the same as you on Wednesday. That's because we all have traits like personality, identity, habit and we have states like your motivation, how you feel, how supported you are on a given day. Ignore that distinction and you can never design something that actually fits a real person on a real Tuesday.

Which brings me to the model that finally made it click: multilevel modeling. (Naturally, I took an online course for it that was awful, then hired a 1:1 tutor who was great. The cycle continues.)

The idea is that your data has levels. Imagine comparing physical activity in Boston to physical activity in rural Barre, Massachusetts. There's a city level, a person level inside each city, and a day level inside each person (comparing Boston to Barre, people within Boston to people within Boston, and comparing you to yourself), because I'm checking everyone's motivation every single day. You might learn that people in Boston are more motivated than in Barre, some people in Boston are more motivated than others in Boston, and you'd get each person's fluctuations in motivation. But the real magic is at the day level.

Say one person's motivation looked like this across a week:

  • Monday: 7/10

  • Tuesday: 4/10

  • Wednesday: 3/10

  • Thursday: 10/10

  • Friday: 6/10

  • Saturday: 10/10

  • Sunday: 2/10

Their average is a 6 out of 10. Now I can ask the question that actually matters: when this person's motivation is higher or lower than their own typical level, are they more or less likely to walk? Ignore the variation inside the individual and you can never build a precise intervention.

So say Tuesday is reliably your low-motivation day. Knowing that about yourself, what do you do? You block the time on your calendar the night before. You ask a friend to come. You join a walking group so showing up isn't all on you.

That, to me, is the most effective way to build a tailored intervention,  because it works with the fact that you're different on different days instead of pretending you're not.

Here's the thing that bugged me for years: everything I just described, finding your own pattern, spotting your low days, and doing something about them before they sink you, basically required a statistician (or a diligent coach), a spreadsheet, and weeks of surveying yourself. Nobody is actually doing that for their morning walk.

With advances in AI you can passively learn so much more about yourself with the right tool. So I built this into a text messaging coach. 

First Habit is the experiment I always wanted to run on myself. You pick one specific behavior: "resistance training, Monday / Wednesday / Friday." You answer six quick questions once, so the system knows what's stable for you: whether it's already a habit, whether it fits how you see yourself, whether you've got people in your corner. That's your baseline, the traits.

Then it just pays attention to the states. A short check-in before your window. A nudge at the right time. A quick "how'd it go?" after. Over a week or two it learns your patterns, the low-motivation Tuesday, the day your schedule breaks your good intentions and it starts meeting you there

It's an n-of-1 study where you're the only subject who matters. I’m beta testing this now so if you'd want something like that running in your corner, giving you tailored advice you can sign up at https://justinkompf.com/first-habit

Keep Reading