Probability and statistics
Read four months of real forecast errors as a distribution: centre, spread, tails and chance
- Math toolbox
- 25 min guided · about 30 min practice
- No prerequisites
- Completed
2,716 hourly forecast errors, January–April 2025
- A histogram counts hours per bin: with 1-point bins, 74% of the 2,716 hours lie from −2% up to +3%; the errors run from −8.3% to +9.8%.
- Centre: mean +0.8%, median +0.7%. Demand came in above the forecast in 61% of hours.
- Spread: standard deviation 2.45 points; mean ± 1 SD, from −1.65% to +3.25%, holds 72% of hours; the quartiles are −0.8% and +2.2%.
- Chance by counting: 134 of 2,716 hours, 4.9%, had demand more than 5% above the forecast.
- Nominal intervals from percentiles: 50% from −0.8% to +2.2%; 80% from −2.1% to +3.8% (lesson 4's band); 95% from −3.5% to +6.2%. Hours tied at the ends make them hold 51.3%, 81.1% and 95.0%.
- Samples scatter: the standard error of that share is 6.8 points for 10 random hours, 2.2 for 100 and 0.7 for 1,000.
- Independence (illustrative): gas plants A and B, each out in 5% of hours, are both out in 0.25% of hours, about 22 a year, only if their outages are independent.
- Expected value: with plants A (150 MW) and B (100 MW) each out 5% of the time, 12.5 MW are out on average.
The summaries on this page
| Summary | Value |
|---|---|
| Hours | 2,716 |
| Mean | +0.8% |
| Median | +0.7% |
| Standard deviation | 2.45 points |
| Quartiles | −0.8% and +2.2% |
| Share above +5% | 4.9% (134 hours) |
| 80% interval (nominal) | −2.1% to +3.8% |
| 95% interval (nominal) | −3.5% to +6.2% |
Text version of the histogram
| Error, from | up to | Hours |
|---|---|---|
| −9.0% | −8.0% | 4 |
| −8.0% | −7.0% | 5 |
| −7.0% | −6.0% | 4 |
| −6.0% | −5.0% | 14 |
| −5.0% | −4.0% | 18 |
| −4.0% | −3.0% | 62 |
| −3.0% | −2.0% | 169 |
| −2.0% | −1.0% | 320 |
| −1.0% | 0.0% | 406 |
| 0.0% | +1.0% | 471 |
| +1.0% | +2.0% | 465 |
| +2.0% | +3.0% | 339 |
| +3.0% | +4.0% | 190 |
| +4.0% | +5.0% | 103 |
| +5.0% | +6.0% | 60 |
| +6.0% | +7.0% | 39 |
| +7.0% | +8.0% | 19 |
| +8.0% | +9.0% | 15 |
| +9.0% | +10.0% | 13 |
With JavaScript on, you work through this step by step on the live chart.
- Source: the Southwest Power Pool's hourly demand and day-ahead demand forecast (EIA-930, accessed 2 November 2026), January–April 2025, as in lesson 4.
- Our calculation: error = (actual − forecast) ÷ forecast for each of the 2,716 valid hours, rounded to 0.1 percentage point.
- May–December is left out: from May the reported forecast runs 8–15% above reported demand every month, cause unverified.
- Gas plants A and B have the sizes of Prairie Town's two gas plants (150 MW and 100 MW, lesson 0); their 5% outage chances are illustrative.
What you just did, as diagrams
- Histogram
- Hours counted per bin of error; the bin width changes how jagged it looks, not the data.
- Mean and median
- Two centres: the average, pulled by every value, and the middle value, which a few wild values barely move.
- Standard deviation, quartiles
- Two spreads: a typical distance from the mean, and the range of the middle half.
- Percentile and interval
- The value a given share of hours stays at or below; two of them bound an interval.
- Probability as a share
- Count the hours where the event happened and divide by all hours; with few hours, the share is rough.
- Independence
- When one event says nothing about the other, the chance of both is the product; a shared cause breaks it.
- Expected value
- Each outcome times its chance, added up; expected values add with or without independence.
Go deeper · AnalystThe formulas, and how sure a sample is
- Mean. \(\bar e = \frac{1}{n}\sum_{i=1}^{n} e_i\), where \(e_i\) is hour \(i\)’s error in % and \(n = 2716\) hours.
- Standard deviation. \(s = \sqrt{\frac{1}{n}\sum_{i=1}^{n} (e_i - \bar e)^2}\), in percentage points. Dividing by \(n - 1\), as many tools do, gives 2.4533 points against 2.4528: with this many hours the choice hardly matters.
- Percentile. Sort the errors and write the share as a fraction \(p\) (\(p = 0.9\) for the 90th percentile). The percentile sits at position \((n - 1)\,p\) counting from 0, between two neighbours when that is not a whole number.
- How sure a share is. Draw \(m\) hours at random and find the share \(\hat p\) above +5%. It scatters by about \(\sqrt{\hat p\,(1 - \hat p)/m}\), its standard error: for \(\hat p\) = 4.9%, 6.8 points for \(m\) = 10 hours, 2.2 for 100 and 0.7 for 1,000.
- Two standard errors. For large samples, about 95% of estimates land within two standard errors. With 10 hours the rule is rough: the share can only be 0%, 10%, 20% and so on.
- Draws with replacement. Each draw can pick any hour, even one already drawn, so the draws are independent with the same chances. Real hours in a row may move together, which this sampling leaves out.
Go deeper · ModelerDistributions as model inputs (a preview)
- Monte Carlo. Draw a model’s uncertain inputs from their distributions, run the model each time, and read percentiles of the result (Modeler lesson M7).
- Scenarios with chances. A stochastic program is an optimization model that plans against several scenarios at once, weighted by their chances, to minimise expected cost: step 8’s expected value inside a model (M8).
- Surrogates. A surrogate is a fast stand-in fitted to a slow model’s runs. One kind, a Gaussian-process model, gives each prediction a mean and a standard deviation (M9).
- Draw together what moves together. Sample whole hours or days, so demand, wind and outages keep their joint behaviour; drawing each input separately assumes independence.
Check yourself
Myth or fact? “Next winter, 95% of hours will fall inside this page's 95% interval.”
- Myth
- Fact
Answer
Myth. It holds 95% of the 2,716 hours it was built from, by construction. Other months are untested, and from May the two reported series disagree.
Myth or fact? “Two plants that are each out in 5% of hours are both out in 0.25% of hours.”
- Myth
- Fact
Answer
Myth, as a general rule. The product holds only if the outages are independent; a shared cause makes both-out hours more common.
Myth or fact? “One wildly wrong reading moves the median less than the mean.”
- Myth
- Fact
Answer
Fact. Adding one +100% reading to these hours moves the mean by +0.04 points and the median by 0.
Five hourly errors: −1%, 0%, +1%, +2%, +8%. Their mean and median?
- Mean +2%, median +1%
- Mean +1%, median +2%
- Both +2%
- Mean +2%, median 0%
Answer
Mean +2% (the sum, +10%, over 5); median +1%, the middle of the sorted five. The +8% pulls the mean up, not the median.
A random sample of 100 of these hours has 9% above +5%; all 2,716 hours have 4.9%. The best reading?
- The forecast got worse
- A share from 100 hours is rough; 9% is within its usual scatter
- 9% is the true chance
- Samples cannot tell you anything
Answer
Rough: with 100 hours the standard error is about 2.2 points, and 4.9% + 2 × 2.2 ≈ 9.3%, so 9% is within two standard errors.
Numbers, sources and what’s next
Numbers to remember
| Number | What it means | Source |
|---|---|---|
| +0.8% and +0.7% | Mean and median error: demand above the day-ahead forecast in 61% of hours. | Our calculation from EIA-930 · SPP, Jan–Apr 2025 |
| 2.45 points | Standard deviation of the errors. | Same data |
| −2.1% to +3.8% | The nominal middle 80% of the hours: lesson 4's band. | Same data |
| 4.9% | Share of hours with demand more than 5% above the forecast (134 hours). | Same data |
| p × q | The chance two events both happen, where p and q are their separate chances: only if they are independent. | Definition |
Next
Sources and further reading
- EIA. Hourly Electric Grid Monitor (Form EIA-930), six-month BALANCE files for 2025: the Southwest Power Pool's demand and day-ahead demand forecast; accessed 2 November 2026.
- Hyndman, R. J., and Athanasopoulos, G. Forecasting: Principles and Practice, 3rd edition, OTexts, section 5.5, Distributional forecasts and prediction intervals (open textbook; checked 3 November 2026).
- Lesson 4, forecasts and surprises, scores this forecast and turns these percentiles into a band.
Spotted an error, or stuck? Write to hlli@ksu.edu. Corrections are made in place and dated here.
Text licensed CC BY 4.0, code MIT: teachers and students may reuse and adapt it, with credit to Honglin Li.