The last lesson of the time-series part builds the models. A series can be explained by its own past (autoregressive), by past shocks (moving average), or by the past of other series (a vector autoregression), and unit-root series that share a trend can have a long-run relationship that corrects its own deviations (cointegration). We learn to read the ACF and PACF, to test whether one series helps predict another, and to tell a genuine long-run link from a spurious one.
The Ashanagar survey is invented. The statistics modules used one district of 60 households. Econometrics needs more households and more variables, so this is a new, larger survey of 600 households in the same imaginary district: income, spending, household size, whether the household is in the town or a village, the head’s schooling and earnings.
Because we wrote the data-generating process, we know the true answers, and every lab can show whether a regression recovers them. Household spending, in thousands of rupees a month, was generated as 1 + 0.45 × income + 0.9 × household size + 1.5 × town + an error with standard deviation 2.5. A real survey never tells you its true coefficients. This one does, so you can see how close an estimate comes.
It also holds a variable, the head’s ability, that a real survey could not observe. It is kept so that the lessons on omitted variables can show what happens when it is left out. Every figure here is illustrative, not official statistics.
Let et be a purely random (white-noise) process. Three families of stationary models:
An AR(p) is stationary when the roots of its characteristic equation lie outside the unit circle (for AR(1): |φ| < 1; for AR(2): φ₁ + φ₂ < 1, φ₂ − φ₁ < 1 and |φ₂| < 1). A finite MA is always stationary. An ARIMA(p, d, q) model fits an ARMA(p, q) to a series after differencing it d times, which is how a unit-root series is modelled. The mean of xt = c + φxt−1 + et is c ÷ (1 − φ).
Taking the variance of both sides of xt = φxt−1 + et, with xt−1 unrelated to et and a stable process (|φ| < 1):
Multiplying the equation by xt−h and taking expectations, the covariance at lag h is φ times the covariance at lag h − 1, so γh = φhγ₀ and
xt = et + θet−1 has variance (1 + θ²)σ². xt and xt−1 share one shock, et−1, so their covariance is θσ². xt and xt−2 share no shock, so their covariance is zero:
The first autocorrelation of an MA(1) cannot exceed ½ in absolute value, whatever θ.
For φ = 0.7 the theory gives 0.700, 0.490 and 0.343; the sample autocorrelations of a simulated AR(1) are 0.699, 0.481, 0.328. For θ = 0.7 the theory gives ρ₁ = 0.7 ÷ 1.49 = 0.47 and zero after; the simulated MA(1) gives 0.469, −0.005, −0.004.
Which model fits a series? The autocorrelation function (ACF) plots the correlation of the series with itself at each lag. The partial autocorrelation function (PACF) plots the correlation at lag k after removing the effect of the shorter lags. Their shapes are the fingerprints:
| Process | ACF | PACF |
|---|---|---|
| AR(p) | Tails off (decays gradually, possibly with oscillation) | Cuts off after lag p |
| MA(q) | Cuts off after lag q | Tails off |
| ARMA(p, q) | Tails off | Tails off |
| White noise | No significant lags | No significant lags |
Try each of the five in the lab and compare the bars with the table, then lengthen the series to sharpen the pattern. The dashed lines are approximate 95% bands (±1.96 ÷ √n): a bar outside is significantly different from zero, and one in twenty bars will be outside by chance.
The ACF: the correlation of the series with itself k periods back. Dark bars lie outside the 95% band.
The PACF: the correlation at lag k after the shorter lags have been taken out.
An autoregressive process has a PACF that cuts off after lag 1 (here 1 lag outside the band at the start) while its ACF decays gradually towards zero (6 lags outside the band). Each value depends on a few past values, and through them on all of history, so the correlations fade smoothly.
The practical method, due to Box and Jenkins, has four steps: identify a tentative model from the ACF and PACF (after differencing if there is a unit root); estimate its parameters; diagnose by checking that the residuals are white noise, for example with the Ljung-Box statistic Q = n(n + 2) Σ rk² ÷ (n − k), chi-square under the null of no autocorrelation up to the chosen lag; and forecast. When several models fit, an information criterion (AIC or BIC, lesson 4) chooses between them.
A vector autoregression (VAR) treats several series symmetrically: each variable is regressed on lags of itself and of all the others, with no variable assumed exogenous in advance. For two variables x and y, a VAR(1) is
Granger causality. x Granger-causes y if past values of x help predict y beyond what past values of y already give. In the VAR it is an F test that all the lags of x are jointly zero in the equation for y: if rejected, x Granger-causes y. Testing both ways: lags of Y significant in X’s equation, and lags of X insignificant in Y’s, means Y Granger-causes X and X does not Granger-cause Y (the opening question). Two-way significance is bidirectional causality (feedback), and none is no Granger causality.
The name is misleading. Granger causality is about predictive content and timing, not about causes. A variable that moves first because people anticipate something (stock prices before earnings, Christmas cards before Christmas) predicts without causing. It also depends on the lag length and on which other variables are in the model.
Real data. For India’s annual growth rates of private consumption and GDP (65 observations, 1961 to 2025), a one-lag Granger test of whether GDP growth helps predict consumption growth gives F = 0.05 (p = 0.82), and whether consumption growth helps predict GDP growth F = 0.6 (p = 0.44). Neither is significant: in annual data the two move together within the same year, and the previous year’s growth adds nothing. That is no statement about whether consumption drives output or the other way round.
Lesson 15 warned that regressing one I(1) series on another is spurious. There is one exception, and it is the most important idea in applied macroeconometrics. Two I(1) series are cointegrated if some linear combination of them is stationary: each wanders, but they wander together, and the gap between them keeps returning to a fixed level. Consumption and income, prices at home and abroad adjusted for the exchange rate, short and long interest rates: theory says such pairs are tied together in the long run. The test is a two-step recipe, due to Engle and Granger:
The residual test uses its own critical values, more negative than Dickey-Fuller’s, because the regression has already chosen the line that makes the residuals look as stationary as it can. The lab computes them by simulation. Try the two settings: with a cointegrated pair the residual hugs zero and the statistic is far below the cutoff; with two unrelated random walks it wanders and the test rightly fails to reject.
x is a random walk and y = 1 + 2x + u. In the first case u is stationary with the persistence set below; in the second it is another random walk. The true long-run slope is 2.
y (blue) and x (gold). Both wander; whether they wander together is the question.
The residual of y regressed on x: the gap. If it returns to zero, the series are cointegrated.
The residual has an Engle-Granger statistic of −6.05 against the 5% cutoff −3.37: reject no cointegration, the gap looks stationary. The series really are cointegrated, and the test finds it in 100% of samples at this length and persistence. The error-correction coefficient −0.54 is the share of last period's gap that is closed this period: a negative number, because the gap pulls y back.
Cointegration implies an error-correction model (ECM): the short-run changes of y respond to the last period’s deviation from the long-run relationship, which pulls y back towards it:
Real data. India’s log consumption on log GDP, 1960 to 2025 (World Bank, read 2026-10-24): the long-run slope is 0.88 and the Engle-Granger statistic of the residual is −1.21, against a simulated 5% critical value of −3.43 for independent walks of this length. We cannot reject no cointegration. The error-correction coefficient is −0.072 (t = −1.4), a small and insignificant speed of adjustment. This is a sober result: theory says consumption and income are tied together, but 65 annual observations are few for a test that has low power against a gap as persistent as this one (the residual’s autocorrelation is about 0.94, lesson 10), and nothing here shows the pair is cointegrated. The honest summary is “no evidence of cointegration in these data”, not “proof that they are unrelated”.
An AR(p) has a PACF that cuts off after p and an ACF that tails off; an MA(q) the reverse. A VAR regresses each variable on lags of all. x Granger-causes y if lags of x improve the prediction of y; it is about prediction, not causation. Two I(1) series are cointegrated if a combination is stationary; test by running the levels regression and testing its residuals for a unit root (Engle-Granger), and model them with an error-correction mechanism.
Restricted against unrestricted regressions, reading output, and statement questions, up to GATE and IIT JAM level.
These are questions from the TestStop bank. A free account answers 10 a day, each with its worked solution; All-Access opens every set with no daily limit.
The questions matching tests with their purposes (Ljung-Box, Engle-Granger, Granger) are collected in the test atlas at the end of the module. For the unit-root tests that come before cointegration, see lesson 15.