Module 3 — Linear Prediction and State-Space Recursions
Module 3 — Linear Prediction and State-Space Recursions
Core question
Given a covariance structure and a vector of observations, which linear combination predicts an unobserved value with minimum mean-squared error?
Learning outcomes
You will be able to:
- derive the normal equations for a best linear predictor;
- compute prediction-error variance from a Schur complement;
- explain when a linear predictor equals a conditional expectation;
- obtain multi-step AR predictions from powers of a companion matrix;
- derive the Kalman prediction and correction equations;
- distinguish filtering, prediction, and smoothing.
1. Prediction is a projection problem
Let be a centred target and let
For a linear predictor ,
Differentiation gives the normal equations
When is positive definite,
In computation, use solve(Gamma, g). The inverse notation explains the mathematics; explicitly forming an inverse is usually unnecessary.
2. Orthogonality is the defining check
At the optimum,
The error is therefore orthogonal to every predictor. This statement needs finite second moments, not Gaussianity.
If is jointly Gaussian, the conditional mean is linear:
Without joint Gaussianity, this remains the best linear predictor but need not be the best among all nonlinear functions.
3. Worked AR(1) projection
For a stationary AR(1) with variance and correlation , predict from
Then
Solving gives . Once is known, receives zero extra weight. The matrix calculation recovers the Markov property rather than assuming it.
The error variance is
4. Partitioned covariance and the Schur complement
The joint covariance is
Conditioning removes the part of explained linearly by . The remaining variance,
is the Schur complement of . It is non-negative because the joint covariance matrix is positive semidefinite.
R: solve the projection and verify orthogonality
The following cell uses an AR(2). Because the true process uses only two lags, the coefficient on should be numerically zero when predicting from .
Best linear prediction from an AR(2) covariance matrix
The first two weights reproduce and the third is zero up to rounding. The MSPE reproduces the innovation variance.
5. Multi-step prediction uses matrix powers
Write an AR() in state form:
With ,
If and , then
The point prediction propagates the state; the uncertainty accumulates every future innovation.
6. Innovations reveal information one observation at a time
Suppose is the projection on the past. Define the innovation
Innovations are mutually orthogonal. For Gaussian processes they are independent. A joint Gaussian likelihood can therefore be written as a sum of one-step terms:
This is the sequential counterpart of the covariance-matrix likelihood in Module 4.
7. State space avoids a growing covariance inverse
Use the linear Gaussian model
with
If summarises the filtered state, prediction is
The observation innovation and its covariance are
Correction is
| Task | Information used |
|---|---|
| prediction | observations through |
| filtering | observations through |
| smoothing | the complete sample, including observations after |
When is missing, keep the prediction and skip correction. No ad hoc imputation is required.
Practice
- For AR(1) with and , construct and above and solve for .
- Show that adding a predictor cannot increase the minimum MSPE.
- For an AR(2), write , , and explicitly.
- Explain why the innovations likelihood and joint covariance likelihood agree for a Gaussian model.
- In a local-level model, what happens to during several consecutive missing observations?
Answers
- , , and .
- The old predictor remains available in the larger span, so minimisation over the larger set cannot be worse.
- The first row of is , the second is , , and .
- Orthogonal sequential innovations factor the same multivariate normal density into conditional normal densities.
- Prediction uncertainty accumulates process noise because no measurement correction reduces it.
Takeaway
Linear prediction is a covariance problem: solve normal equations, verify orthogonality, and read uncertainty from a Schur complement. State-space recursions perform the same conditioning sequentially. Continue to Estimation and Inference.
Module 2 — ARMA, ARIMA, and Model Identification
Build AR, MA, and ARIMA models from lag polynomials, roots, shock propagation, and finite-sample diagnostics.
Module 4 — Estimation, Likelihood, and Inference
Derive AR estimators from regression and moment equations, evaluate exact Gaussian likelihoods with covariance matrices, and interpret uncertainty.