A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Prediction Intervals and Out-of-Sample Forecasting

Graduate Depth 128 in the knowledge graph ☐ I know this ☆ Set as goal
1,031prerequisites beneath it
See this on the map →
Confidence Intervals and Hypothesis Tests in RegressionInference in Linear Regression+3 more→
forecasting prediction uncertainty

Core Idea

Prediction intervals account for both uncertainty in parameter estimates and irreducible error variance, making them wider than confidence intervals for mean predictions. Choosing between prediction and confidence intervals depends on the task: use confidence intervals to estimate mean effects, prediction intervals to forecast individual outcomes.

Explainer

From your work on confidence intervals in regression, you know how to quantify uncertainty about estimated coefficients and about the expected value of Y at a given X. A confidence interval for the mean of Y at X = x* answers the question: "What is the average outcome for all units with this value of X?" But there is a different and often more practically relevant question: "What outcome should I expect for this specific new unit?" That is the question a prediction interval answers — and the distinction matters enormously for applied work.

Here is why a prediction interval must be wider than a confidence interval for the mean. When you ask about the mean of Y at a given X, uncertainty comes only from imprecision in your estimated regression line — you have estimated β with some error. As sample size grows, this uncertainty shrinks toward zero. But when you ask about a *specific new observation*, there is an additional, irreducible source of uncertainty: the error term ε for that new unit. That new unit will not fall exactly on the regression line even if you knew the line perfectly. The variance of a new prediction is therefore Var(ŷ_new) = σ²[1 + X_new′(X′X)⁻¹X_new], the "1" representing the irreducible error variance that never disappears no matter how large your sample. The confidence interval omits the "1" term. This structural difference means prediction intervals do not shrink to zero as n → ∞ — they converge to ±1.96σ around the true mean, where σ is the residual standard error.

A practical implication is that prediction intervals widen as X_new moves away from the center of your data. This follows from the (X_new′(X′X)⁻¹X_new) term, which is smallest near the mean of X and grows as you extrapolate. Predicting the salary of someone with 20 years of experience when most of your data covers 0–10 years yields an interval so wide it may be useless. This is the statistical signature of extrapolation risk: even if your model is correctly specified within the observed range, predictions far outside it carry large formal uncertainty — and unknown model misspecification risk on top of that.

Out-of-sample forecasting brings a further complication: model selection bias. When you fit a model on training data and evaluate its predictive accuracy on a held-out test set, the test error is an honest estimate of future prediction error; in-sample R² and residual variance estimates are not. Overfitted models look precise in-sample but produce wide prediction intervals out-of-sample — or, worse, generate point forecasts that perform poorly in ways the in-sample fit masked. The discipline of holding out a test set, or using cross-validation, forces you to confront prediction interval width honestly. A model that minimizes in-sample residual variance is not the same as a model that minimizes out-of-sample forecast error, and understanding this gap is the foundation of modern forecasting methodology.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Number Bonds to 10 → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts (0s, 1s, 2s, 5s, 10s) → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Comparing and Ordering Integers → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Dividing Integers → Unit Rates → Proportions → Percent Concept → Converting Between Fractions, Decimals, and Percents → Operations with Rational Numbers → Two-Step Equations → Solving Multi-Step Equations → Equations with Variables on Both Sides → Angle Pairs: Complementary, Supplementary, and Vertical → Parallel Lines and Transversals → Corresponding Angles → Alternate Interior Angles → Triangle Angle Sum Theorem → Exterior Angle Theorem → Triangle Inequality Theorem → Similar Triangles: AA Similarity → Similar Triangles: SSS and SAS Similarity → Proportions in Similar Triangles → Right Triangle Trigonometry Introduction → Sine, Cosine, and Tangent Ratios → Trigonometric Ratios Review → Radian Measure → Converting Between Degrees and Radians → The Unit Circle → Graphing Sine and Cosine → Graphing Tangent and Reciprocal Trigonometric Functions → Derivatives of Trigonometric Functions → Antiderivatives → Indefinite Integrals → Basic Integration Rules → Riemann Sums → Definite Integral Definition → Probability Density Functions and Continuous Distributions → Cumulative Distribution Functions → Continuous Random Variables → Probability Density Functions → Expected Value → Weak Law of Large Numbers → Probability Axioms and Rules → Conditional Probability → Independence of Events → Sampling Distributions → Standard Error of Estimators → Hypothesis Testing: Framework and Logic → P-values and Statistical Significance → Effect Size and Practical Significance → Hypothesis Testing: Framework and Logic → Z-Tests and T-Tests for Means → One-Sample Z-Test for Means → One-Sample and Two-Sample T-Tests → Inference in Linear Regression → Prediction Intervals in Regression → Linear Regression Basics → Residuals and Goodness of Fit (R²) → Simple (Bivariate) OLS Regression → Classical OLS Assumptions (Gauss-Markov) → Multiple Regression → Interpreting Regression Coefficients → Hypothesis Testing in Regression → F-Test and Joint Significance → R-Squared and Model Fit → Omitted Variable Bias → Causal Inference and the Identification Problem → Potential Outcomes and the Rubin Causal Model → Selection Bias → Instrumental Variables → Dynamic Panel Models and Arellano-Bond/Blundell-Bond Estimation → Dynamic Panel Models: Arellano-Bond Estimator → First-Difference Estimator for Panel Data → Within Estimator (Fixed Effects) for Panel Data → Between and Random Effects Estimators for Panel Data → Hausman Test: Fixed Effects Versus Random Effects → Dynamic Panel Models and System GMM Estimation → Vector Autoregression (VAR) Models and Impulse Responses → ARIMA Models and Time Series Forecasting → Prediction Intervals and Out-of-Sample Forecasting

Longest path: 129 steps · 1031 total prerequisite topics

Prerequisites (5)

Leads To (0)

No topics depend on this one yet.