Paste the data, get the tables, the ACF plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free ACF plot calculator
What is a ACF plot?
An ACF plot shows the correlation between a series and lagged copies of itself. The x-axis is the lag (1 step back, 2 steps back and so on) and the y-axis is the autocorrelation coefficient r, which ranges from −1 to +1. Each vertical stem is one lag. Dashed horizontal lines mark approximate 95% limits, ±1.96/√N, the range expected when the series is pure white noise.
At lag k the coefficient is rk = Σ(xt − x̄)(xt+k − x̄) / Σ(xt − x̄)². A Ljung–Box test adds one overall verdict by testing many lags together.
When and why to use a ACF plot
When
- Checking whether observations are independent before using a method that assumes independence.
- Spotting trend (slow decay) and seasonality (spikes at the seasonal lag) in a series.
- Choosing the moving-average order and deciding whether differencing is needed before ARIMA modelling.
- Checking that the residuals of a fitted model look like white noise.
- Looking at repeated physiological measurements such as glucose, heart rate or EEG-derived series.
Why
- The ACF plot is the standard first diagnostic of a time series because the plot reveals memory, trend and seasonality in one picture.
- Ignoring autocorrelation makes standard errors too small and p-values too optimistic in regression and group comparisons.
Typical biomedical examples
daily ICU admissions, continuous glucose readings, heart rate variability series, daily case counts, repeated clinic measurements over time.
How to interpret the results
Slow, steady decay from a high first value
This pattern signals a trend or a nonstationary mean. Difference the series once and draw the ACF plot again.
Spikes at seasonal lags
A stem at lag 12 (and 24, 36) in monthly data signals yearly seasonality. A seasonal difference at that lag is the usual remedy.
Cutoff after lag q
When stems are significant up to lag q and then fall inside the limits, a moving-average component of order q is suggested, especially when the PACF tails off.
Smooth or wavy decay
Geometric or sinusoidal decay suggests an autoregressive component. Consult the PACF plot for the order.
All stems inside the limits
The series is consistent with white noise. About 1 lag in 20 is expected to cross the limits by chance, so one stem barely beyond the line at a high lag is not meaningful.
Limits are pointwise
Each dashed limit applies to one lag alone. The Ljung–Box test judges a block of lags together and is better for an overall decision. When the data are autocorrelated, Bartlett’s wider limits are more accurate than ±1.96/√N.
Strongly negative first value after differencing
A lag-1 coefficient near −0.5 after differencing can mean the series was over-differenced.
Linear dependence only
The ACF plot measures linear association between time points. A significant stem is not evidence of causation.
Common mistakes
- Reading the ACF plot of a series with a strong trend as if the high values showed genuine memory.
- Treating each stem as a separate significance test.
- Requesting far too many lags: a common ceiling is about N/4, and StatFAS caps the maximum at N/2 − 1.
- Using fewer than about 50 observations and trusting fine detail.
- Forgetting the seasonal period when the data are monthly or weekly.
- Using unevenly spaced observations.
How to make a ACF plot
The easy way: StatFAS.com
The free ACF plot calculator at StatFAS.com handles the calculations, draws the figure to publication standard and writes the APA 7 results text. The ACF plot calculator page walks through every step.
Paste the data, get the tables, the ACF plot and APA 7 wording in seconds. Analysis needs no sign-in; downloads need a free sign up, then log in.
Open the free ACF plot calculator
SPSS
- If seasonal differencing is wanted, define the cycle first with Data > Define Date and Time.
- Choose Analyze > Forecasting > Autocorrelations.
- Move the series into Variables.
- Under Display tick Autocorrelations (tick Partial autocorrelations as well to get the PACF plot in the same run).
- Under Transform choose Difference (1) or Seasonally difference when needed.
- Click Options, set the maximum number of lags, and choose the standard error method (Independence model or Bartlett’s approximation).
- SPSS draws the plot and prints a table with the Box–Ljung statistic for every lag.
R
x <- ts(values, frequency = 12)
acf(x, lag.max = 24, main = "") # lag 0 (always 1) is drawn first
Box.test(x, lag = 24, type = "Ljung-Box") # joint test over 24 lags
acf(diff(x), lag.max = 24) # after first difference
acf(diff(x, lag = 12), lag.max = 24) # after seasonal differencePython
import matplotlib.pyplot as plt
from statsmodels.graphics.tsaplots import plot_acf
from statsmodels.stats.diagnostic import acorr_ljungbox
plot_acf(y, lags=24, zero=False, bartlett_confint=False, alpha=0.05) # white-noise limits
plt.show()
print(acorr_ljungbox(y, lags=[24]))
plot_acf(y.diff().dropna(), lags=24, zero=False) # first difference
plot_acf(y.diff(12).dropna(), lags=24, zero=False) # seasonal difference
plt.show()How to report the results in APA 7
Example template: “The ACF of the [variable] series (N = [N]) was computed for [K] lags with 95% limits of ±[limit]. Significant autocorrelation occurred at lags [list]. A Ljung–Box test indicated [significant / no significant] serial dependence, Q([K]) = [value], p [value].” Mention any differencing that was applied before the ACF plot was drawn.
Frequently asked questions
What does the dashed line on an ACF plot mean?
The dashed lines mark approximate 95% limits for white noise, ±1.96/√N. A stem outside the lines is larger than expected for an uncorrelated series.
How many lags should be shown in an ACF plot?
For non-seasonal data 20 to 24 lags are usual, and for seasonal data at least two full cycles (24 for monthly data). Do not exceed about half of the series length.
What is the difference between the ACF plot and the PACF plot?
The ACF plot shows the total correlation at each lag. The PACF plot shows the correlation at each lag after the effect of shorter lags is removed. Together the two plots suggest the model order.
Does a significant ACF stem mean the series is not stationary?
Not by itself. Stationary series can have significant stems. A slow decay over many lags is the sign of nonstationarity.
Key takeaways
- A ACF plot is only as good as the preparation: correct period, equal spacing, no gaps.
- Slow, steady decay from a high first value: This pattern signals a trend or a nonstationary mean. Difference the series once and draw the ACF plot again.
- Report numbers together with the figure, using APA 7 wording.
- StatFAS.com produces the figure, the tables and the APA 7 text from pasted data.
Related reading
PACF plot blog · Seasonal decomposition plot blog · ACF plot calculator