UNFAIR
Download
Glossary · Tracking & Analysis

Moving Average Window

Last updatedApr 21, 2026

A moving average window is the rolling-lookback period over which Unfair averages a daily metric — typically 3, 7, 14, or 28 days — to smooth day-to-day variance and expose trend. Every outcome chart in the app and every statistic in correlation metadata reads from one of these smoothed series, not from raw daily points. Picking the wrong window is one of the most common ways users either miss a real effect or declare a false one.

The noise-versus-lag trade-off

Longer windows lower noise but raise lag. The trade is not optional; it is mechanical. As an example, a user's raw daily HRV series on a ring wearable commonly shows a standard deviation around 8–10 ms night to night. A moving average compresses that variance by roughly the square root of the window length:

WindowApproximate SD of smoothed seriesLag to detect a sustained 5 ms liftBest fit for
3-day5.2 ms2 daysFast stimulants, acute sleep supports, trouble-shooting a same-week change
7-day3.4 ms4 daysDaily nootropics, caffeine-theanine, most sleep compounds
14-day2.4 ms8 daysAdaptogens, B-complex, moderate-lag compounds
28-day1.7 ms16 daysFat-soluble vitamins, omega-3, creatine maintenance, VO2-related outcomes

The numbers illustrate the problem. On a 3-day window, a 5 ms lift has to clear a 5.2 ms noise floor, which takes a large sustained effect to detect. On a 28-day window, the same 5 ms lift clears the 1.7 ms floor easily but shows up more than two weeks after the dose change. Pick the window for the speed of the compound, not for the speed of the user's patience.

Matching window to outcome

Different outcome classes have different natural smoothing needs, independent of the compound:

  • HRV, resting heart rate — 14-day as the reference line, 7-day for detection. Day-to-day variance is high; short windows overreact.
  • [Sleep efficiency](/glossary/sleep-efficiency) — 7-day typically works; 14-day for long trials.
  • Subjective scores (energy, focus, mood) — 7-day for review; 3-day only for "did yesterday's dose shift this morning" style questions.
  • Training performance — lookback tied to session cadence, not days; a three-session rolling average is usually more honest than a seven-day one.
  • VO2 max estimate, body composition — 28-day minimum; the biology changes slower than the sensor noise, so shorter windows report mostly artifact.

How Unfair picks defaults

Every chart defaults to the 7-day window with the 28-day line overlaid as a reference, so short-term movement and longer-term drift are visible together. The feedback loop reads from the smoothed series, not raw days, which is why stack confidence shifts after a pattern stabilizes rather than on the same night a single reading moves. For goals with a known slow-acting compound (omega-3, creatine, vitamin D), the default review window extends to 28-day so early noise does not push users into a premature verdict.

Interpreting shifts

A useful shorthand for how much a move on a smoothed series matters:

  • A single raw-day move of 10% is almost always noise.
  • A 7-day average move of 5% sustained across three days is usually a real short-term effect.
  • A 28-day average move of 3% is a large shift and almost always worth investigating, even if the daily chart looks unchanged.

The smoothed series is the one to discuss with a clinician or to use in a n-of-1 experiment writeup; the raw series is the one to reach for when a single bad night needs an explanation.

Known limits

  • Every moving average lags by roughly half the window length. A compound started today shows its full effect on a 14-day window about a week after the effect stabilizes.
  • Missing days distort smoothed values unless data gap handling is explicit. Unfair surfaces gaps rather than filling them quietly.
  • Averages compress rare events. A single very bad night loses most of its weight, which is appropriate for trend reading and inappropriate for acute-event review.
  • Short series under 2× the window length produce unstable edges; the first few days of a 28-day chart are always thinner evidence than the middle.

How this appears in Unfair

The moving-average window is labeled on every outcome chart and printed in the chart caption, so the reader never has to guess which line they are looking at. The ranked output reads from the window that matches each compound's action timescale, and the review screen offers a toggle between the default 7-day view and a longer 28-day view for users who want to see trend rather than day-to-day motion. This is part of the advanced capabilities that separates Unfair's analysis from apps that chart raw daily values only.

Clinical safety note

Smoothing hides acute events. A worrying single night — palpitations, severe sleep disruption, chest discomfort — should be reviewed on the raw chart alongside symptom logs, not on the smoothed one. Clinicians typically want raw values for the days in question, not the trend line.