Separate observed history from forecasts and keep coverage claims attached to their method.
Forecast fan charts: label interval meaning and forecast horizon
A band needs a named quantity
A shaded region around a forecast could show uncertainty in an estimated mean, uncertainty for a future individual outcome, or a range of scenarios. These are different claims. A future-observation prediction interval is usually wider than an interval for the mean under the same model assumptions. Label the target, coverage level and calibration period. Uncertainty displays should also expose sample size and unstable estimates. Color alone must not carry the difference between observed and projected values.
Mark the boundary
Draw the last observed time as a visible boundary and use a different line style for forecasts. A continuous line through that boundary can make modeled values look measured. Do not fill missing observed dates with predictions and call the whole line history. Time-series gap rules still govern the observed segment. State whether the first future period is a complete day, week or fiscal interval, especially when a dashboard refreshes mid-period.
Nested bands need checks
A fan chart may show 50, 80 and 95 percent intervals. At each horizon, narrower bands must sit inside wider ones. The lower bound may fall and the upper bound may rise as coverage increases. Check containment in the data before rendering. Wider horizons often have wider uncertainty, but that shape is not guaranteed for every conditioned model or bounded target. Never widen bands by hand for appearance. The export should retain interval definition, model version and generation time.
Backtest the claim
If an interval claims 80 percent coverage, compare past issued intervals with realized values at a fixed forecast horizon and documented window. Count misses alongside nominal coverage. A recent shock or measurement change can break earlier calibration. An 80 percent band is not a promise that exactly eight of every ten future points must land inside it; coverage is assessed across repeated forecasts under stated conditions. Event annotations can mark changed processes without proving their cause.
Worked contract
def validate_fan_rows(rows: list[dict]) -> None:
previous_horizon = -1
for row in rows:
horizon = row["horizon"]
if not isinstance(horizon, int) or horizon <= previous_horizon:
raise ValueError("horizons must increase")
previous_horizon = horizon
center = row["forecast"]
inner = row["interval_50"]
outer = row["interval_80"]
if not (outer[0] <= inner[0] <= center <= inner[1] <= outer[1]):
raise ValueError("intervals must nest around forecast")
issued_forecast = [
{"horizon": 1, "forecast": 81,
"interval_50": (75, 87), "interval_80": (68, 94)},
{"horizon": 2, "forecast": 83,
"interval_50": (74, 92), "interval_80": (62, 104)},
]
validate_fan_rows(issued_forecast)
assert issued_forecast[1]["interval_80"][1] == 104Performance and operating cost
Validation scans H horizons in O(H) time and O(1) additional space. Rendering nested bands scales with horizons times interval levels. The check verifies ordering and containment only; it cannot establish empirical coverage, calibration or model quality. Finite numeric values and exact time-zone handling also need validation at the source boundary before a production forecast is issued.
Common Mistakes
- Calling a mean-confidence band a future-observation prediction interval.
- Drawing forecast points with the same style as measurements.
- Allowing an 80 percent band to cross inside its 50 percent band.
- Claiming nominal coverage without checking past issued forecasts against outcomes.
Validation drill
Issue 47 weekly forecasts with saved 50 and 80 percent bounds. Mark the observed-to-forecast boundary, validate every nested interval, and report realized coverage at horizons one and four separately.
Read next
- Uncertainty on charts: show denominators and intervals beside estimates
- Time-series charts: distinguish missing days, zeros and provisional periods
- Chart exports: carry the data, filters and render contract together
- Chart annotations: align events to the right clock without claiming causality
Continue this visualization path
- Asymmetric error bars: tell readers what each endpoint means
- Tornado charts: keep scenario ranges attached to their assumptions
- Autocorrelation plots: align equal-spaced periods before reading lag peaks
- Historical percentile ribbons: show the spread of observations over time
- Seasonal subseries plots: compare the same cycle position across years
