streaks vs statistical streaks
- 1 minutes read - 187 wordsHacker News et al are obsessed with streaks, but I think they have some problems:
-
A single regression resets to zero.
-
There’s not an easy way to gradually ramp up your streak-commitment over time.
I prefer a different approach: statistical streaks.
Suppose I made a commitment to do something differently on 2016-08-26, and did it for the next 5 days; then my 30-day statistical streak avg = 0.166, but my 5-day statistical streak avg = 1.0.
If I then have one off-day (5 consecutive days then one failure day) the 30-day statistical streak avg is still 0.166, but the 5-day statistical streak avg drops to 0.80.
If I pick it back up the next day, it goes to 0.2 and 0.80 for the 30- and 5-day statistical streak averages (respectively), while if I fail again, it drops to 0.1667 and 0.6 for the 30- and 5- variants, respectively.
Here’s a tiny bit of python to demonstrate these scenarios:
assumed_history = 0
explicit_recent_history = [1,1,1,1,1,0,0]
for window_days in [30, 5]:
# lazy...
history = [assumed_history]*(window_days)+explicit_recent_history
recent_history = history[-window_days:]
success_days = sum(recent_history)
print window_days, float(success_days) / window_days , recent_history