Definition
For intervals issued at a nominal level of 90 %, the empirical coverage is the fraction of test periods whose outcome lies between the lower bound l and the upper bound u. Coverage can be met by intervals that are uselessly wide, so it is read with the average width, or combined with it in the interval score of Winkler:
W = (u − l) + (2 ÷ α) (l − y) if y < l, + (2 ÷ α) (y − u) if y > u
where α is 1 minus the nominal level. The score is the width when the outcome is inside, and grows with the distance when it is outside. Lower is better.
Worked example
The data are normal with standard deviation 3. One forecaster uses the right standard deviation, the other believes it is 2. Both issue 90 % intervals.
import numpy as np
rng = np.random.default_rng(2)
y = rng.normal(50, 3, size=200)
z, alpha = 1.645, 0.10
def report(name, sd):
l, u = 50 - z * sd, 50 + z * sd
inside = (y >= l) & (y <= u)
winkler = (u - l) + (2 / alpha) * (np.clip(l - y, 0, None) + np.clip(y - u, 0, None))
cov = inside.mean()
se = np.sqrt(0.9 * 0.1 / len(y)) # sampling error if the true coverage is 0.90
print(f"{name:22s} coverage = {cov:.3f} (0.90 +/- {1.96 * se:.3f} expected) width = {u - l:.2f} Winkler = {winkler.mean():.2f}")
report("correct spread, sd 3", 3.0)
report("overconfident, sd 2", 2.0)Output, produced by running the code above when this page was built:
correct spread, sd 3 coverage = 0.900 (0.90 +/- 0.042 expected) width = 9.87 Winkler = 12.00 overconfident, sd 2 coverage = 0.765 (0.90 +/- 0.042 expected) width = 6.58 Winkler = 13.86
The overconfident intervals are narrower and miss more often than the sampling error allows. The Winkler score charges the misses more than it rewards the narrower width.
Where it misleads
- With 200 periods, a true coverage of 90 % can show anywhere between about 86 % and 94 %. On 20 periods the check is almost empty.
- Average coverage can hide groups. Intervals too wide for large items and too narrow for small ones can average to the nominal level. Check coverage by segment.
- On count data an interval cannot hit a level exactly, because the bounds are integers. A 90 % interval that covers 94 % may be the closest available.
- Errors in consecutive periods are often correlated, so the effective number of independent checks is smaller than the number of periods.
In our work
We check coverage by group, because the average can hide a failure. In our small area estimation study, standard 95 % intervals contained the census value 54 % of the time; letting small communes vary more than large ones brought the figure to 96 %.
Service: forecasting and statistical studies Research note: small area estimation, checked against a census Research note: intermittent demand forecasting, measured
References
- Winkler, R. L. (1972). A decision-theoretic approach to interval estimation. Journal of the American Statistical Association, 67(337), 187-191. doi:10.1080/01621459.1972.10481224
- Gneiting, T., Raftery, A. E. (2007). Strictly proper scoring rules, prediction, and estimation. Journal of the American Statistical Association, 102(477), 359-378. doi:10.1198/016214506000001437
- Hyndman, R. J., Athanasopoulos, G. (2021). Forecasting: principles and practice, 3rd edition. OTexts, Melbourne. otexts.com/fpp3