Synthetic example · version 1
Compare the evidence, not an accuracy badge
One example product, weekly units and a four-week planning horizon. Every observation is invented; the forecasts and errors are computed from the downloadable data.
Three methods. The same held-out weeks.
Training history through 2026-08-31
Forecast origin 2026-09-07
- Actual
- Seasonal baseline
- Trend + seasonality
- With known promotion
| Method | Mean absolute error | Bias (forecast − actual) |
|---|---|---|
| Same week last year | 18.8 | -18.8 |
| Trend + seasonality | 5.4 | +5.3 |
| Trend + seasonality + known promotion | 4.4 | +3.2 |
Lower absolute error means a smaller average miss. Positive bias means overforecasting; negative means underforecasting. Four weeks are too few to establish a reliable winner. This invented series deliberately contains trend, seasonality and a known promotion effect; it is not evidence of likely customer improvement.
All chart values and rolling-test results
| Week | Actual | Baseline | Trend + seasonal | With context | Band |
|---|---|---|---|---|---|
| 2026-07-13 | 111 | Historical context; before forecast origin | |||
| 2026-07-20 | 122 | Historical context; before forecast origin | |||
| 2026-07-27 | 118 | Historical context; before forecast origin | |||
| 2026-08-03 | 112 | Historical context; before forecast origin | |||
| 2026-08-10 | 153 | Historical context; before forecast origin | |||
| 2026-08-17 | 129 | Historical context; before forecast origin | |||
| 2026-08-24 | 129 | Historical context; before forecast origin | |||
| 2026-08-31 | 144 | Historical context; before forecast origin | |||
| 2026-09-07 | 136 | 113.0 | 139.1 | 136.9 | 128.3–145.5 |
| 2026-09-14 | 132 | 114.0 | 142.0 | 139.8 | 131.2–148.3 |
| 2026-09-21 | 145 | 128.0 | 144.8 | 142.6 | 134.0–151.2 |
| 2026-09-28 | 139 | 122.0 | 147.5 | 145.3 | 136.8–153.9 |
Eight earlier non-overlapping four-week rolling tests, refitting at each origin using only prior records (32 predictions):
- Same week last year: mean absolute error 18.3 units; bias -18.3 units.
- Trend + seasonality: mean absolute error 7.2 units; bias -0.8 units.
- Trend + seasonality + known promotion: mean absolute error 5.1 units; bias -0.4 units.
What the example does and does not establish
Inputs and assumptions
The dataset has 104 complete weekly observations and no missing records. Actuals are generated from a deterministic trend, annual seasonal pattern, scheduled promotion indicator and oscillating noise. All future promotion flags are assumed known at each forecast origin. No sales were censored by stockouts.
Methods and evaluation
The baseline repeats the same week 52 weeks earlier. Candidate A fits a linear trend plus annual sine/cosine terms. Candidate B adds the known promotion indicator. Both use ordinary least squares, refit only on the history available at each origin. The last four weeks are held out from fitting and from band calibration; no parameters were tuned on that period.
Uncertainty, not a guarantee
The shaded band is the context forecast plus or minus 8.6 units: the empirical 80th percentile of absolute errors from the 32 earlier rolling predictions. It is a small-sample, pooled historical-error illustration, not a calibrated statistical prediction interval. 4 of the 4 final actuals fall inside it. A real project would check coverage by horizon and use a suitable uncertainty method; an 80% target is not a promise.
Context is separate from a scenario
The model uses promotions scheduled in advance, not events learned from the holdout. A hypothetical future promotion would instead be a scenario assumption. Neither approach guarantees an improvement. Different data can favour the baseline.
Inspect and reproduce
Download synthetic data (CSV) · Computed values (JSON) · Reproduction script (Node.js)
Run the downloaded script with Node.js 20 or later in a new folder. It uses only Node’s standard library and writes synthetic files under public/example. No customer files or network access are required.
Discuss your own planning question