Time Series • Time Series Regression Model
Time Series / Prediction of New Observations

Prediction of New Observations

Notes 5 Time Series Regression Model

Prediction of a new observation uses a fitted regression to estimate a future or unused y at a chosen set of x values. That is different from reporting the estimated mean response at the same x: the mean is the average level of the line; an individual y still has extra scatter around that line.

Notes

Prediction of New Observations

Definition

Prediction of a new observation uses a fitted regression to estimate a future or unused y at a chosen set of x values. That is different from reporting the estimated mean response at the same x: the mean is the average level of the line; an individual y still has extra scatter around that line.

Example

Using ŷ = 1.5 + 1.6x from the four-point teaching fit, a new x = 5 gives fitted mean 1.5 + 1.6×5 = 9.5. That 9.5 is the estimated mean response at x = 5. An individual new y at x = 5 would still vary around 9.5. x = 5 is one step beyond the observed x range 1–4, so treat it as a short extrapolation, not a guaranteed future.

Mean Response vs Individual Prediction

Estimated mean response Prediction of a new observation
Target The average y at a given x One new y at that x
Uncertainty Uncertainty in the fitted line Line uncertainty plus leftover scatter
Interval Confidence interval for the mean Prediction interval for the new y

A prediction interval is generally wider than a confidence interval for the mean at the same x, because an individual outcome has more to explain than the average. Both intervals are model-based ranges, not promises. They typically widen as x moves away from the centre of the training x values.

Prediction Flow

Input values of x ↓ Fitted regression model ↓ Predicted value ŷ ↓ Prediction interval (wider than CI for the mean)

Supply future x values that are realistic (next week's temperature, not an impossible calendar). For time series, also remember that autocorrelated residuals mean the leftover is not independent noise; a simple OLS prediction interval can then be too narrow.

Exam-Oriented Key Points

  1. Mean response ≠ one new observation; the second has extra scatter.
  2. Prediction intervals are generally wider than confidence intervals for the mean.
  3. Plug in x, compute ŷ, then attach an interval if the assumptions allow it.
  4. Extrapolation beyond the observed x range is weaker than interpolation.

A Small Prediction Example in Python

What the Student Should Expect

Same constructed four points as the OLS example. Predict at x = 5. Expected display: a mean near 9.5 and a summary that includes a mean confidence interval and a prediction interval. The prediction interval should be the wider of the two. Do not copy invented printed bounds into an answer booklet.

# Import libraries import pandas as pd import statsmodels.api as sm # Load / prepare constructed data df = pd.DataFrame({"x": [1, 2, 3, 4], "y": [3, 5, 6, 8]}) X = sm.add_constant(df["x"]) fit = sm.OLS(df["y"], X).fit() # New x (one step beyond the sample) new_X = sm.add_constant(pd.DataFrame({"x": [5]}), has_constant="add") # Mean response interval and prediction interval mean_ci = fit.get_prediction(new_X).summary_frame(alpha=0.05) print(mean_ci[["mean", "mean_ci_lower", "mean_ci_upper", "obs_ci_lower", "obs_ci_upper"]])

In statsmodels, mean_ci_* refers to the mean response and obs_ci_* to the new observation. Compare those two widths on your own run.

Exam-Oriented Key Points

  1. Prediction needs the fitted model and the new x values.
  2. Report ŷ and, when asked, say whether the interval is for the mean or for a new y.