Sina Bolouri
Back to Science articles

Introduction to Time Series

From Correlation Patterns to a Fitted Time-Series Model

How linear projection, PACF, and Yule-Walker equations turn lag relationships into candidate models and forecasts.

Article 4Time-Series Analysisintermediate19-24 minutespartially-verified
time seriesforecastingdata sciencepacfyule-walkerbest linear predictormodel identificationautoregression

Introduction: The Problem Before the Method

A theoretical ARMA model supplies an autocorrelation pattern, but real analysis starts in the opposite direction. The analyst sees one finite sample and must decide:

  • which lags contain useful information,
  • which relationships are direct rather than inherited through shorter lags,
  • what model order is plausible,
  • how coefficients can be estimated,
  • and how the fitted model predicts future observations.

This inverse problem is harder than recognizing a textbook ACF. Sampling variation blurs cutoffs, several candidate models can look similar, and a good in-sample fit can still leave important dependence unexplained.

Best linear prediction, partial autocorrelation, and the Yule-Walker equations provide a coherent path from covariance to a fitted autoregressive model.

The Core Idea

The best linear predictor of a future variable (X_{n+h}) from observations (X_1,\ldots,X_n) has the form

X^n+h=a0+j=1najXj.\widehat{X}_{n+h} = a_0+\sum_{j=1}^{n}a_jX_j.

The coefficients are chosen to minimize mean squared prediction error:

E[(Xn+ha0j=1najXj)2].E\left[ \left( X_{n+h}-a_0-\sum_{j=1}^{n}a_jX_j \right)^2 \right].

For a zero-mean process, (a_0=0). The resulting prediction error is orthogonal to every variable used in the predictor:

E[(Xn+hX^n+h)Xk]=0,k=1,,n.E\left[(X_{n+h}-\widehat{X}_{n+h})X_k\right]=0, \qquad k=1,\ldots,n.

This orthogonality condition converts prediction into a linear system built from autocovariances.

Partial autocorrelation applies the same projection idea to model identification. At lag (h), it measures the correlation between (X_t) and (X_{t-h}) after their linear relationships with the intermediate lags have been removed.

Why the Concept Exists

An ordinary lag-(h) autocorrelation contains both direct and indirect association. In an AR(1) process, (X_t) and (X_{t-2}) are correlated even though the equation uses only lag one, because information travels through (X_{t-1}).

The PACF asks what lag two adds after lag one is already known. For a true AR((p)) process, no lag beyond (p) adds a direct linear contribution in the population, so the PACF cuts off after (p).

The Yule-Walker equations then use estimated autocorrelations to estimate AR coefficients. They provide a computationally simple method-of-moments fit and clarify the connection between model parameters and dependence.

Background and Prerequisites

Projection as geometry

Random variables with finite variance can be viewed as vectors in an inner-product space with

X,Y=E[XY].\langle X,Y\rangle=E[XY].

The best linear predictor is the orthogonal projection of the future variable onto the span of the observed variables. This explains why its error is uncorrelated with every predictor.

Partial autocorrelation

Let (e_t^{(h)}) be the residual from projecting (X_t) on (X_{t-1},\ldots,X_{t-h+1}), and let (e_{t-h}^{(h)}) be the residual from projecting (X_{t-h}) on the same intermediate variables. The partial autocorrelation at lag (h) is

α(h)=Corr(et(h),eth(h)).\alpha(h) = \operatorname{Corr}\left(e_t^{(h)},e_{t-h}^{(h)}\right).

An equivalent time-series definition identifies (\alpha(h)) with the last coefficient in the best linear prediction of (X_t) from its previous (h) values.

Assumptions

Finite second moments and approximate stationarity

Projection and Yule-Walker estimation rely on stable covariance relationships.

Linear prediction is appropriate

The best linear predictor need not equal the full conditional expectation unless additional assumptions hold. Under joint Gaussianity, linear projection and conditional expectation coincide.

The selected sample reflects one regime

Structural changes can create apparent direct lag effects that do not persist.

The AR order is finite and correctly specified

Yule-Walker estimation assumes the fitted AR((p)) form is an adequate representation. If the true process is mixed ARMA or nonlinear, the estimates are approximations.

How It Works

Normal equations for prediction

For a zero-mean stationary process, predicting (X_{n+1}) from (X_n,\ldots,X_1) gives equations of the form

Γna=γ,\Gamma_n \mathbf{a}=\boldsymbol{\gamma},

where (\Gamma_n) is the covariance matrix of the observed vector and (\boldsymbol{\gamma}) contains covariances between the future observation and each predictor.

Solving for (\mathbf{a}) yields the minimum-MSE linear predictor.

Yule-Walker equations

For an AR((p)) model,

Xt=ϕ1Xt1++ϕpXtp+Wt,X_t=\phi_1X_{t-1}+\cdots+\phi_pX_{t-p}+W_t,

the population autocorrelations satisfy

ρ(k)=ϕ1ρ(k1)++ϕpρ(kp),k=1,,p.\rho(k)=\phi_1\rho(k-1)+\cdots+\phi_p\rho(k-p), \qquad k=1,\ldots,p.

In matrix form,

Rpϕ=rp,R_p\boldsymbol{\phi}=\mathbf{r}_p,

where

Rp=[1ρ(1)ρ(p1)ρ(1)1ρ(p2)ρ(p1)ρ(p2)1],R_p= \begin{bmatrix} 1 & \rho(1) & \cdots & \rho(p-1)\\ \rho(1) & 1 & \cdots & \rho(p-2)\\ \vdots & \vdots & \ddots & \vdots\\ \rho(p-1) & \rho(p-2) & \cdots & 1 \end{bmatrix},

and

rp=[ρ(1)ρ(2)ρ(p)].\mathbf{r}_p= \begin{bmatrix} \rho(1)\\ \rho(2)\\ \vdots\\ \rho(p) \end{bmatrix}.

Replacing population autocorrelations with sample values gives

ϕ^=R^p1r^p.\widehat{\boldsymbol{\phi}} = \widehat{R}_p^{-1}\widehat{\mathbf{r}}_p.

The innovation variance can be estimated by

σ^W2=γ^(0)j=1pϕ^jγ^(j).\widehat{\sigma}_W^2 = \widehat{\gamma}(0) - \sum_{j=1}^{p} \widehat{\phi}_j\widehat{\gamma}(j).

Identification workflow

The Practical Procedure

1. Confirm that the series is modelable as stationary

Do not use ARMA identification patterns to compensate for unresolved trend or seasonality.

2. Inspect the ACF and PACF jointly

Use both because either plot alone can be ambiguous.

  • AR((p)): PACF tends to cut off after (p); ACF tails off.
  • MA((q)): ACF tends to cut off after (q); PACF tails off.
  • ARMA((p,q)): both tend to tail off.

3. Prefer a small candidate set

Finite-sample bars rarely create a perfect cutoff. Propose several low-order models rather than selecting an exact order visually.

4. Estimate using an appropriate method

Yule-Walker is fast and natural for pure AR models. Conditional sum of squares and maximum likelihood are more general for ARMA models.

5. Check admissibility

Verify stationarity and invertibility roots. A numerical fit can return a poor or near-boundary model.

6. Diagnose residuals and compare candidates

A model is not accepted because its ACF resembles the data. Residual whiteness, parameter uncertainty, information criteria, and forecast performance must also be considered.

Mathematical or Technical Foundation

AR(1) Yule-Walker estimate

For

Xt=ϕXt1+Wt,X_t=\phi X_{t-1}+W_t,

the population relationship is

ρ(1)=ϕ.\rho(1)=\phi.

Therefore,

ϕ^YW=ρ^(1).\widehat{\phi}_{YW}=\widehat{\rho}(1).

The forecast is

X^n+1=ϕ^Xn\widehat{X}_{n+1}=\widehat{\phi}X_n

for a centered series.

AR(2) equations

For AR(2),

[1ρ(1)ρ(1)1][ϕ1ϕ2]=[ρ(1)ρ(2)].\begin{bmatrix} 1 & \rho(1)\\ \rho(1) & 1 \end{bmatrix} \begin{bmatrix} \phi_1\\ \phi_2 \end{bmatrix} = \begin{bmatrix} \rho(1)\\ \rho(2) \end{bmatrix}.

Using sample autocorrelations gives estimates for (\phi_1) and (\phi_2). If the matrix is ill-conditioned, estimates can be unstable, especially when dependence is extreme or the sample is short.

Recursive prediction

For a fitted AR((p)), unknown future values in the recursion are replaced by their forecasts. For example, an AR(2) gives

X^n+1=ϕ^1Xn+ϕ^2Xn1,\widehat{X}_{n+1} = \widehat{\phi}_1X_n+\widehat{\phi}_2X_{n-1}, X^n+2=ϕ^1X^n+1+ϕ^2Xn.\widehat{X}_{n+2} = \widehat{\phi}_1\widehat{X}_{n+1} + \widehat{\phi}_2X_n.

As the horizon grows, more inputs are forecasts rather than observations, and uncertainty increases.

Worked Example

Source-derived example: preliminary AR order

The course material uses sample ACF and PACF plots to distinguish simulated AR and MA sequences. A reproducible workflow in R is:

set.seed(42)
x <- arima.sim(model = list(ar = c(0.5, -0.2)), n = 500)

par(mfrow = c(1, 2))
acf(x, main = "Sample ACF")
pacf(x, main = "Sample PACF")

For a sufficiently long AR(2) sample, the ACF should tail off while the PACF has its main population contributions through lag two. Individual later sample PACF bars may still cross a pointwise reference line.

Source-derived example: Lake Huron

The uploaded material uses LakeHuron to connect differencing, ACF/PACF inspection, AR order selection, and fitting. A compact exploratory sequence is:

x <- diff(LakeHuron)

acf(x)
pacf(x)

fit <- ar(x, method = "yule-walker", order.max = 2)
fit

This is an educational workflow, not automatic evidence that AR(2) is the best model. Residual diagnostics and candidate comparisons remain necessary.

Original explanatory example: temperature residual forecasting

Suppose a machine-temperature series has already been adjusted for shift schedule and ambient temperature. Its stationary residuals show:

  • a gradually decaying ACF,
  • a strong PACF at lag one,
  • and weak later PACF values.

An AR(1) is a reasonable first candidate. The fitted coefficient estimates persistence, while the innovation variance estimates the remaining one-step unpredictability. A second candidate with lag two may be retained if the lag-two PACF is materially large or engineering knowledge suggests a delayed thermal effect.

Interpreting the Results

A PACF spike at lag (h) means lag (h) adds linear predictive information after shorter lags are controlled. It does not establish a causal delay.

A Yule-Walker coefficient is a sample-based estimate derived from autocovariance matching. Its uncertainty should be reported. A coefficient near one may indicate genuine persistence, unresolved nonstationarity, or finite-sample ambiguity.

The best linear predictor minimizes mean squared error within a chosen linear span. It does not claim to be the best possible nonlinear predictor.

Real-World Applications

In industrial telemetry, PACF can help distinguish immediate persistence from delayed effects. In software monitoring, an AR model can forecast stationary deviations around a known traffic baseline. In financial or demand data, Yule-Walker estimates provide fast baselines and initial values for more general optimization.

The projection interpretation also appears in linear regression, Kalman filtering, kriging, and Gaussian-process prediction.

Common Misunderstandings

“PACF measures causality”

It removes linear contributions of intermediate lags. It does not remove confounding, prove a physical pathway, or establish intervention effects.

“The largest significant lag is the model order”

Pointwise sample variation can create isolated bars. Model order should emerge from a candidate-and-diagnostic workflow.

“Yule-Walker is always equivalent to maximum likelihood”

The methods use different objectives and can produce different finite-sample estimates. Exact or conditional likelihood methods are generally preferred for mixed ARMA models.

“A best linear predictor is always the conditional mean”

That equality holds under conditions such as joint Gaussianity. In general, it is optimal only among linear predictors.

“A high-order AR model is harmless”

Extra lags increase estimation variance, can create unstable roots, and may fit sample noise rather than persistent structure.

Limitations and Failure Modes

ACF/PACF patterns become unreliable with short samples, strong outliers, missing observations, near-unit roots, or prior filtering. Seasonal and nonseasonal patterns can overlap. Parameter uncertainty can be substantial even when the fitted curve looks plausible.

Yule-Walker is naturally suited to AR models but does not directly estimate a general MA component. It can also be sensitive to the chosen sample autocovariance convention and treatment of the mean.

Alternatives and Trade-Offs

Maximum likelihood uses the full assumed probability model and supports ARMA estimation but requires numerical optimization. Conditional least squares is simpler but conditions on initial observations. Burg estimation can provide stable AR fits. Regularized autoregression is useful when many candidate lags exist, though its selection and inference differ from classical AR modeling.

Automated order selection can search candidate grids, but it should remain constrained by data length, domain knowledge, diagnostics, and forecast evaluation.

Connection to Broader Topics

Yule-Walker equations are both estimation equations and prediction equations because the same covariance structure governs the optimal linear projection. PACF is also connected to the Durbin-Levinson recursion, which efficiently updates predictors and prediction-error variances as lag order increases.

The next step is model adequacy: residual analysis, portmanteau tests, AIC/AICc, and overfitting control.

Connection to Portfolio or Learning

A portfolio forecasting component could make model identification transparent by displaying:

  • the transformed series,
  • ACF and PACF with caveats,
  • candidate orders,
  • parameter estimates and root checks,
  • residual diagnostics,
  • and rolling forecast errors.

This would demonstrate that model selection is an evidence chain rather than a single automated function call.

Key Takeaways

  1. Best linear prediction is an orthogonal projection that minimizes mean squared error within a linear predictor space.
  2. Ordinary autocorrelation includes indirect lag relationships; PACF isolates the incremental linear contribution of a lag after shorter lags are controlled.
  3. Population PACF cuts off after (p) for an AR((p)) process, but finite-sample plots rarely show a perfect cutoff.
  4. Yule-Walker estimation matches sample autocorrelations to the theoretical AR equations.
  5. ACF/PACF patterns should generate a small candidate set, not a final decision.
  6. Recursive multi-step forecasts increasingly depend on prior forecasts, so uncertainty grows with horizon.
  7. Parameter estimates require root checks, residual diagnostics, and forecast evaluation before the model is accepted.

Review Questions

  1. Why can lag two be correlated with the present in an AR(1) process?
  2. What does the PACF remove before measuring the lag-(h) relationship?
  3. How do the Yule-Walker equations connect autocorrelation to AR coefficients?
  4. Under what assumption does the best linear predictor equal the conditional expectation?
  5. Why should an isolated PACF bar not determine model order?
  6. What changes in an AR forecast recursion after the first step?

Further-Learning Path

ARMA structure and theoretical ACF
→ supplies model signatures.

Projection, PACF, and Yule-Walker estimation
→ convert those signatures into candidate fitted models.

Likelihood and information criteria
→ compare candidates using fit and complexity.

Residual diagnostics
→ test whether unexplained dependence remains.

Rolling-origin forecast evaluation
→ assess practical predictive performance.

  1. ARMA Models as Dynamic Filtersprerequisite. Defines the mechanisms being identified and estimated.
  2. Diagnosing and Selecting Time-Series Modelscontinuation. Adds residual testing, AIC, and AICc.
  3. The Durbin-Levinson Algorithmdeeper theory. Develops recursive prediction and PACF computation.
  4. Maximum Likelihood for ARMA Modelscomparison. Explains a general alternative to Yule-Walker estimation.
  5. Transparent Forecasting Dashboardsimplementation. Turns the identification workflow into an inspectable interface.

References

Author not identified. (n.d.). Introduction to time series [Course notes, Modules 4-5]. Full citation details could not be confirmed.

Box, G. E. P., Jenkins, G. M., Reinsel, G. C., & Ljung, G. M. (2015). Time series analysis: Forecasting and control (5th ed.). Wiley.

Brockwell, P. J., & Davis, R. A. (2016). Introduction to time series and forecasting (3rd ed.). Springer. https://doi.org/10.1007/978-3-319-29854-2

Hyndman, R. J., & Athanasopoulos, G. (2021). Forecasting: Principles and practice (3rd ed.). OTexts. https://otexts.com/fpp3/

R Core Team. (n.d.). R documentation. R Foundation for Statistical Computing. https://stat.ethz.ch/R-manual/R-devel/library/stats/html/00Index.html

Shumway, R. H., & Stoffer, D. S. (2025). Time series analysis and its applications: With R examples (5th ed.). Springer. https://doi.org/10.1007/978-3-031-70584-7

Research and Verification Notes

  • Uploaded material used: M4L2 for best linear prediction, one-step and multi-step prediction, forecast coefficients, and PACF; M5L1 for sample ACF/PACF order identification; M5L2 for method of moments and Yule-Walker examples.
  • Authoritative verification: Projection, PACF, and Yule-Walker definitions were checked against Brockwell and Davis (2016), Box et al. (2015), and Shumway and Stoffer (2025).
  • Clarifications added: The article distinguishes linear projection from the full conditional expectation and treats ACF/PACF patterns as candidate-generation heuristics.
  • Original material: The machine-temperature scenario and transparent dashboard design are explanatory additions.
  • Code status: R snippets were not run in the present environment.
  • Missing metadata: The source PDFs do not identify enough bibliographic information for a complete course-note citation.
  • Recommended review: Confirm how the target site will display matrices and ensure mean/intercept conventions match any reproduced software output.