Home / Statistical Tools / Analysis Tools / Time Series / How-To / Partial Autocorrelation
Partial Autocorrelation¶
Partial autocorrelation asks what is left of the relationship at a given lag once every shorter lag has been accounted for. This walkthrough uses the same twenty readings as the Autocorrelation page, because running both on one series is the clearest way to see what the word "partial" is doing.
Goal¶
Compute the partial autocorrelation function over twenty readings, and compare it with the plain autocorrelation of the same data.
Sample Data¶
| Temperature |
|---|
| 53.9 |
| 57.2 |
| 55.6 |
| 51.9 |
| 48.2 |
| 48.7 |
| 46.0 |
| 42.7 |
| 45.1 |
| 46.7 |
| 49.2 |
| 46.6 |
| 47.5 |
| 47.9 |
| 43.9 |
| 47.1 |
| 48.8 |
| 56.2 |
| 55.3 |
| 53.5 |
Steps¶
-
Put the data in Excel
Press Copy for Excel, click cell A1 in a blank worksheet, and press Ctrl+V.
-
Launch the analysis
From the Excel ribbon, select QXL Stat Tools → Analysis Tools → Time Series → Partial Autocorrelation.
-
Select your data
Select cells A1:A21.
-
Configure the analysis
Tick Temperature, leave the Correlation Options tab on Auto, and click Finish. Auto gives five lags for twenty rows, the same as the autocorrelation run.
Result¶
A worksheet named PACF Temperature, with a needle chart and a table headed Partial Autocorrelation Function. There are three columns here, Lag, PACF and T-Stat, with no LBQ.
| Lag | PACF | T-Stat |
|---|---|---|
| 1 | 0.7151 | 3.1981 |
| 2 | -0.3455 | -1.5453 |
| 3 | -0.1822 | -0.8148 |
| 4 | 0.1284 | 0.5740 |
| 5 | -0.1669 | -0.7465 |
Lag 1 matches the autocorrelation exactly, at 0.7151. It has to: at lag 1 there are no shorter lags to divide out, so the two functions ask the same question.
The bands are flat here. Every lag shares one limit of ±0.4680, drawn as two straight dashed lines, because it is the 97.5th percentile of a t distribution with 19 degrees of freedom divided by the square root of twenty rows. That is a real difference from the autocorrelation chart, whose bands widen lag by lag. The T-Stat is built the same way: PACF times the square root of the row count, not PACF divided by a per-lag standard error.
Only lag 1 is outside the band. Everything from lag 2 on sits inside.
The Difference From Autocorrelation¶
Set the two tables side by side:
| Lag | ACF | PACF |
|---|---|---|
| 1 | 0.7151 | 0.7151 |
| 2 | 0.3426 | -0.3455 |
| 3 | 0.0041 | -0.1822 |
| 4 | -0.1315 | 0.1284 |
| 5 | -0.2004 | -0.1669 |
At lag 2 they disagree completely, 0.3426 against -0.3455. Both are correct answers to different questions.
The autocorrelation at lag 2 is large and positive because a reading resembles the one two back. But it resembles it largely through the reading in between: period 1 pulls period 2, and period 2 pulls period 3, so periods 1 and 3 look related even if nothing connects them directly. The partial autocorrelation removes that inherited path and reports what is left over, and here what is left over is small and in the other direction.
That is why the ACF fades away gradually over this series while the PACF drops off after the first lag. The relationship in this data really does run one step at a time.
Things to try next¶
- Switch to Manual and set Lag Value to 8. The flat band does not move, because it depends only on the row count. Only the number of needles changes.
- Run Autocorrelation on the same twenty rows. Line up the two charts and the widening bands against the flat ones are immediately visible.
- Blank a row and re-run both. The band moves on both charts, because both use the number of rows selected rather than the count of numeric values.