Best ARIMA forecast: choose a model by AIC, AICc or BIC

Updated

Forecasting with the best ARIMA fits a set of candidate ARIMA models to a series and picks the one with the best information criterion, then forecasts with it. It replaces most of the hand work of reading the ACF and PACF with a systematic comparison, while keeping the same final checks. It is useful when you forecast many series, or when the ACF and PACF do not point clearly to one model.

When to use it

  • The ACF and PACF suggest more than one plausible model.
  • You need forecasts with prediction intervals for many series and cannot identify each by hand.
  • You want a documented, repeatable way to choose the model.
  • You want to compare an ARIMA forecast with a smoothing method such as Winters' method.

How it works

1. Choose the differencing. Decide d first, because criteria computed on differently differenced data are not comparable. A unit root test such as the augmented Dickey–Fuller test, together with a plot, guides the choice.

2. Fit the candidates. Fit every ARIMA(p, d, q) in a range, for example p and q from 0 to 2, by maximum likelihood, with and without a constant where it makes sense.

3. Compare by information criteria. Each criterion rewards a high log-likelihood (LL) and penalizes the number of estimated parameters k (coefficients plus the noise variance), for n observations after differencing:

AIC = −2·LL + 2k AICc = AIC + 2k(k + 1) / (n − k − 1) BIC = −2·LL + k·ln(n)

Smaller is better. AICc corrects AIC for small samples; BIC penalizes extra terms more and tends to choose smaller models. Differences under about 2 are small: such models have similar support.

4. Check the winner. Its coefficients should be clearly nonzero, its residuals should pass the Ljung–Box test, and it should not contain AR and MA terms that cancel each other.

5. Forecast with prediction intervals.

This article uses exact Gaussian maximum likelihood and writes MA terms with a plus sign (wₜ = … + eₜ + θ·eₜ₋₁).

Example

A heat-treat shop logs the daily average temperature of a water quench tank (°C) for 60 days:

DaysTemperature (°C)
1–1230.8, 30.5, 30.5, 30.7, 30.7, 31.1, 31.2, 31.6, 32.5, 32.6, 32.7, 32.5
13–2432.5, 31.9, 31.3, 31.0, 31.3, 32.0, 31.6, 31.1, 31.2, 30.2, 29.5, 29.2
25–3629.7, 30.2, 30.3, 30.2, 30.0, 30.6, 30.7, 30.6, 30.7, 30.7, 30.6, 30.0
37–4829.8, 29.4, 29.8, 30.4, 30.6, 31.0, 31.0, 31.6, 31.8, 32.2, 31.8, 31.7
49–6030.9, 29.5, 28.7, 27.9, 27.6, 28.6, 28.6, 28.3, 28.3, 28.5, 28.5, 28.4

The level wanders without returning to a fixed mean, and the ACF of the level decays slowly (0.910, 0.767, 0.605, …). The Dickey–Fuller test cannot reject a unit root, so d = 1. The differences have ACF 0.423, 0.131, −0.017 and PACF 0.423, −0.059, −0.062 (bounds ±0.260 with 59 differences): both suggest an AR(1) or MA(1) term.

Nine candidates without a constant, n = 59:

ModelLLAICAICcBIC
(0,1,0)−38.63979.2879.3581.35
(0,1,1)−33.22870.4670.6774.61
(0,1,2)−32.75371.5171.9477.74
(1,1,0)−32.76269.5269.7473.68
(1,1,1)−32.68671.3771.8177.60
(1,1,2)73.3374.0781.64
(2,1,0)71.3471.7777.57
(2,1,1)70.5771.3178.88
(2,1,2)72.3773.5082.75
AICc of candidate ARIMA(p,1,q) models for quench tank temperature020406080AICc(0,1,0)(0,1,1)(0,1,2)(1,1,0)(1,1,1)(1,1,2)(2,1,0)(2,1,1)(2,1,2)
AICc of candidate ARIMA(p,1,q) models for quench tank temperature

ARIMA(1,1,0) has the lowest value on all three criteria. For it, LL = −32.762 and k = 2 (φ and σ²), so AIC = 65.52 + 4 = 69.52, AICc = 69.52 + 12/56 = 69.74 and BIC = 65.52 + 2·ln 59 = 73.68. ARIMA(0,1,1) is close (AICc 70.67), so the data cannot strongly separate the two. ARIMA(2,1,1) looks competitive but its AR and MA terms nearly cancel (φ₁ = 1.341, φ₂ = −0.468, θ = −0.926), a sign of a redundant model. Adding a constant (drift) gives −0.044 °C per day with a standard error of 0.093 and a worse AICc (71.73), so the model has no drift.

Check. The chosen model is

wₜ = 0.423·wₜ₋₁ + eₜ, wₜ = yₜ − yₜ₋₁, σ̂² = 0.1772

with φ = 0.423 (SE 0.117). Residual Ljung–Box tests: Q(6) = 3.55 (df 5, p = 0.616), Q(12) = 13.65 (df 11, p = 0.253), Q(18) = 17.30 (df 17, p = 0.434). No remaining autocorrelation.

Forecast. The last reading is 28.4 and the last change −0.1, so day 61 is 28.4 + 0.423 × (−0.1) = 28.36 °C:

ARIMA(1,1,0) forecast of quench tank temperature with 95% limits26283032Temperature (°C)ForecastLower 95% limitUpper 95% limit61626364656667Day
ARIMA(1,1,0) forecast of quench tank temperature with 95% limits

The forecast levels off at 28.33 °C, but the interval keeps widening, from ±0.8 °C tomorrow to about ±3.4 °C a week out. That is the honest message of a wandering series: the next day or two are predictable, a week is not. The shop uses the model for next-day chiller planning and watches the actual temperature rather than relying on week-ahead forecasts.

How to read the results

  • The criteria table ranks models; look at the gaps, not only the winner.
  • The chosen model's coefficients and residual checks confirm that the winner is adequate, not just the best of a weak set.
  • Prediction intervals show how fast uncertainty grows. For differenced models they grow without limit.

Common mistakes

  • Comparing models with different d by AIC. The likelihoods are for different data; choose d first.
  • Trusting the winner blindly. A model with near-cancelling AR and MA terms, or with failing residual checks, should be rejected even if its AIC is lowest.
  • Searching too wide. Large p and q on short series overfit; a range of 0 to 2 or 3 is usually enough.
  • Reading a flat forecast as certainty. The point forecast may be flat while the interval grows quickly.

Frequently asked questions

AIC, AICc or BIC?

AICc is a good default for short series. BIC favors smaller models and is useful when you want the simplest adequate one. When they agree, as here, the choice is easy.

Why does the forecast level off?

In ARIMA(1,1,0) the predicted changes shrink geometrically (by 0.423 each step), so the level settles after a few days. The uncertainty does not settle, because each future change adds its own error.

Can the search include seasonal models?

Seasonal terms can be added to the candidate set for seasonal data; the comparison works the same way, with seasonal differencing decided first.

Is the best model the true model?

No. It is the best of the candidates by one criterion on this sample. Models with close criteria give similar forecasts and are equally defensible.

Try it with your own data

StatLab SPC is free, open-source statistics for engineers. It runs in your browser, works offline, and never uploads your data.

Open StatLab