Sub topic 12
Tracking Whether the Cue Works
This chapter assumes you have already chosen a cue and written it as an if-then plan. It also assumes you can read a short Python script. Here you will learn to measure two separate things: how often the cue shows up, and how often the habit follows it.
Why one "did I do it?" count is not enough
Most people track a habit with a single checkmark: done or not done. A missed day then has several possible causes, and the checkmark hides which one applied.
- The cue never happened. You were traveling, so you never sat at your usual desk.
- The cue happened, but the habit did not follow. You sat at the desk and went straight to email.
These failures need different fixes. The first points to a problem with the cue's reliability. The second points to a problem with the link between the cue and the behavior, or with the behavior itself. To tell them apart, record two facts each day instead of one.
What to record
Keep a log with one row per day and two yes/no fields:
- Cue occurred. Did the moment you named in your plan actually happen? For "If I pour my morning coffee," this is yes only if you poured coffee.
- Habit done. Did you do the behavior after the cue?
Record the entry at the end of the day, or right after the habit window closes. A paper grid or a spreadsheet works as well as code. Two columns are enough.
Two numbers to compute
From the log you can compute two numbers.
- Cue occurrence rate: days the cue occurred, divided by days tracked. This measures how reliable the cue is.
- Follow-through rate: days the habit was done, divided by days the cue occurred. This measures how well the cue triggers the habit.
The denominator of the follow-through rate is cue days only. A day with no cue is not a failure of follow-through, because the habit had no chance to start. Counting it would blame your effort for a problem that belongs to the cue.
A worked example
The script below holds one week of data and computes both numbers.
log = [
{"day": "Mon", "cue_occurred": True, "habit_done": True},
{"day": "Tue", "cue_occurred": True, "habit_done": True},
{"day": "Wed", "cue_occurred": False, "habit_done": False},
{"day": "Thu", "cue_occurred": True, "habit_done": False},
{"day": "Fri", "cue_occurred": True, "habit_done": True},
{"day": "Sat", "cue_occurred": True, "habit_done": True},
{"day": "Sun", "cue_occurred": True, "habit_done": True},
]
occurred = [d for d in log if d["cue_occurred"]]
follow_through = sum(d["habit_done"] for d in occurred) / len(occurred)
print(f"Cue occurred on {len(occurred)} of {len(log)} days")
print(f"Habit followed the cue {follow_through:.0%} of the time")Running it prints:
Cue occurred on 6 of 7 days
Habit followed the cue 83% of the timeThe list occurred keeps only the days when the cue happened. The sum counts the days in that list where habit_done is True, since Python treats True as 1. Dividing by len(occurred) gives the follow-through rate.
Now read the week. Wednesday was a cue failure: the cue did not occur, so the habit could not follow. Thursday was a follow-through failure: the cue occurred and the habit did not. A single count of habit days would show 5 of 7 and treat both misses as the same event.
Reading the numbers
| Cue occurrence | Follow-through | Likely meaning |
|---|---|---|
| High | High | The cue works. Keep it. |
| Low | High | The cue is unreliable, but the habit follows when it appears. Choose a more frequent or more dependable cue. |
| High | Low | The cue is stable, but it does not prompt the behavior. Check the plan's wording, the behavior's size, and competing habits at that moment. |
| Low | Low | Start with the cue. Without a reliable cue you have no evidence about the behavior. |
Use at least one to two weeks of data before drawing conclusions. A single bad day can come from illness or a schedule change. A pattern across several days is more informative.
Common errors in tracking
- Logging the habit only. This merges the two failure types, as described above.
- Judging the cue by memory. Recall favors your best days. Write the entry on the same day.
- Redefining the cue after the fact. If you wrote "7:30 a.m." and you started at 9:15, the cue did not occur as planned. Log it honestly, or the data cannot tell you anything.
- Reacting to one day. Change a cue only after a visible pattern.
Exercise
A 14-day log shows the cue occurred on 5 days, and the habit was done on all 5 of those days. What are the cue occurrence rate and the follow-through rate, and what should you change?
Show answer
The cue occurrence rate is 5/14, about 36%. The follow-through rate is 5/5, or 100%. The habit follows reliably whenever the cue appears, so the problem is the cue's reliability. Replace it with a cue that occurs more often, such as a daily action instead of a place you rarely visit.