← 7. Time series
Time series forecasting
Try this analysis →

ARIMA·SARIMA·SARIMAX

Keep past patterns and information known in advance separate when you use them.

p·d·qSeasonal differencingExogenous variablesPrediction intervals

910 bagsARIMA690 bagsSARIMA+ weekly seasonality570 bagsSARIMAX+ scheduled departuresFinal evaluation MAE (bags) · daily airport baggage volume

An airport needs to know in advance how many bags it will have to handle tomorrow. If it expects too few, staffing falls short; if it expects far too many, equipment and staff may sit idle unnecessarily. But daily baggage volume doesn't simply stay at about yesterday's level. Weekends and weekdays follow different patterns, and demand can change a lot with holidays and flight schedules.

The standard method for forecasting the future using the movement of values observed over time is ARIMA (AutoRegressive Integrated Moving Average). Explicitly adding a repeating seasonal pattern gives SARIMA (Seasonal ARIMA), and adding external variables that affect the outcome, such as flight schedules, lets you use SARIMAX (Seasonal ARIMA with eXogenous variables).

The three methods are not completely separate, competing analyses; they are models that expand, step by step, the range of information used for forecasting. In this article we explain how each model works, setting the orders, a real example, diagnostics, forecast accuracy, prediction intervals and points to watch when using exogenous variables.

SECTION 1

What kind of data does ARIMA forecast?

ARIMA is a model that forecasts the future of a time series using the structure of past observations and past forecast errors.

It can be applied to data recorded at equal intervals, such as daily or monthly, and is used for data where time order matters. It builds into the model the facts that today's baggage volume is related to yesterday's, and that the shock of a day with more bags than expected can linger afterward.

8k10k56-day holdout2024-012025-12Last 8 weeksWk 1Wk 2Wk 3Wk 4Wk 5Wk 6Wk 7Wk 8
Daily baggage volume

What matters in ARIMA is that, unlike regression analysis, it does not assume the observations are independent of each other. Instead, it directly models the temporal dependence among observations. However, if a particular repeating seasonality is strong, or you need to use external information known about the future, basic ARIMA alone may not be enough.

SECTION 2

What are ARIMA's three orders p, d and q?

ARIMA is usually written as ARIMA(p,d,q).

The three numbers determine what temporal structure the model reflects.

OrderNameRole
pAutoregressive (AR) orderSets how many time points back the influence of past observations is reflected
dDifferencing (I) orderSets how many times to difference to reduce nonstationarity due to trends and the like
qMoving average (MA) orderSets how many time points back the influence of past forecast errors is reflected

For example, ARIMA(1,1,1) is a model that differences the series once and, in the differenced series, uses the value and the shock from one time point earlier. The moving average (MA) here is different from a moving average that simply averages the last 7 days of baggage volume. ARIMA's MA terms mean a linear combination of past errors.

A simplified equation for understanding the form of the model is as follows.

φ(B)(1 − B)d yt = c + θ(B) εt

Here B is the lag (backshift) operator, φ(B) is the autoregressive polynomial and θ(B) is the moving average polynomial. In actual forecasting, also check how the constant and trend terms are included according to the software's model definition.

SECTION 3

What does SARIMA add?

SARIMA is a model that adds seasonal autoregressive, differencing and moving average structures to ARIMA.

It is usually written as SARIMA(p,d,q)(P,D,Q,s). The lowercase orders in front are the nonseasonal structure, and the uppercase orders after them are the seasonal structure. s is the seasonal period.

171421ACF171421PACFLag (days)Seasonal lags 7 · 14 · 21
ACF and PACF

If an airport's daily baggage volume has a similar pattern every week, you can consider s = 7. If a pattern repeats every year in monthly data, you would usually consider s = 12. However, if both weekly and annual seasonality matter in daily data, a SARIMA with a single seasonal period can hardly explain both adequately. You can additionally consider calendar variables or other multiple-seasonality models.

For example, SARIMA(1,1,1)(1,0,1,7) reflects seasonal dependence at a 7-day interval on top of ordinary short-term time dependence. The appropriate model setup can differ depending on whether the structure is explained just by mean differences by day of the week or whether autocorrelation remains at lag 7.

SECTION 4

What external information does SARIMAX use?

SARIMAX is a model that adds exogenous regressors to SARIMA's time dependence structure.

When forecasting an airport's baggage volume, if you know the airlines' number of scheduled departures, you can use not only past volume but also the number of scheduled flights. For example, you could set up a model like this.

yt = β0 + β1 xt + ut

φ(B)(1 − B)d(1 − Bs)D ut = θ(B) Θ(Bs) εt

8k9k10k70 flights80 flights90 flightsAbout +124 bags per flightScheduled departures
Scheduled departures and baggage volume

Here xt is the number of scheduled departures on that date, and ut is the regression residual following an ARIMA-type time dependence structure. This is one common regression-with-ARIMA-errors representation of SARIMAX, and the parameterization can differ by implementation.

To use an exogenous variable, you must also know, or separately forecast, its values for the future dates you want to forecast. The number of scheduled flights can be checked in advance, but the actual number of departures can change due to same-day delays and cancellations. For an operational forecast, use only information actually available at the time of forecasting.

SECTION 5

Example: forecasting daily baggage volume at an airport

Suppose a mid-sized airport recorded daily baggage volume for 731 days, from January 1, 2024 to December 31, 2025.

The airport wants to plan the handling staff needed for the first week of 2026. The data record the number of bags handled each day, the number of scheduled departures on that date, the day of the week and whether it was a public holiday.

ItemSetting
Unit of analysisDaily
Full observation period2024-01-01 to 2025-12-31, 731 days
Target variableNumber of bags handled per day (bags)
Weekly seasonal period7 days
Candidate exogenous variableNumber of scheduled departures available at the time of forecasting
Final evaluation period2025-11-06 to 2025-12-31, last 56 days
Training period2024-01-01 to 2025-11-05, 675 days
Final forecast target2026-01-01~2026-01-07
Training675 days2024-01-01 ~ 2025-11-05→Holdout56 days2025-11-06 ~ 12-31→Forecast7 days2026-01-01 ~ 01-07
Splitting the period

In this split, the last 56 days were set aside as a holdout for final performance evaluation. In an actual analysis, you should choose the orders by running separate time series cross-validation within the training period, and use the holdout to evaluate that choice. If you repeatedly pick the model that does best on the holdout, you risk judging final performance too optimistically.

SECTION 6

Which graphs and diagnostics do you check before the analysis?

First, plot daily baggage volume in time order and check for long-term rises and falls, weekly patterns, surges around holidays, missing dates and so on.

A single-day outlier may be a recording error, but it may also be real demand caused by a concentration of flights or a special event, so look into the cause before deleting it.

Next, review the autocorrelation function (ACF) and partial autocorrelation function (PACF). If autocorrelation repeats at lags of 7, 14 and 21 days, you can suspect weekly seasonality. If you suspect nonstationarity due to a nonseasonal trend, refer to results such as the ADF unit root test and consider whether differencing is needed.

However, the differencing order d is not decided automatically by a single ADF p-value. You need to check the time series plot, the ACF and variability after differencing, the model's residuals and forecast performance together, and you should also avoid over-differencing.

SECTION 7

How do ordinary differencing and seasonal differencing differ?

An ordinary first difference takes the difference between today and yesterday.

Δyt = yt − yt−1

Δ7yt = yt − yt−7

Ordinary difference · y(t) − y(t−1)+2k−2kSD903 bagsSeasonal difference · y(t) − y(t−7)+2k−2kSD468 bags
Ordinary differencing and seasonal differencing

A seasonal difference with a 7-day period, on the other hand, takes the difference between today and the same weekday a week earlier. For example, if Monday's volume is 8,400 bags and the previous Monday's was 8,100 bags, the seasonal difference is 300 bags. The two kinds of differencing have different purposes. Ordinary differencing deals with nonseasonal long-term trends, while seasonal differencing is used to reduce repeating seasonal shifts in level.

Seasonality being present does not necessarily mean D = 1 is needed. Seasonal mean differences can be expressed with day-of-week variables, or explained by seasonal AR and MA terms. d and D should be set according to the actual data.

SECTION 8

How do you compare the three models?

In this example, suppose three candidate models were examined on the training data.

The following orders are candidates for illustration, not optimal orders estimated from real data.

Past values · errors7-day seasonalityScheduled flightsARIMA✓SARIMA✓✓SARIMAX✓✓✓
Information each of the three models uses
CandidateModelInformation included
ARIMAARIMA(1,1,1)Nonseasonal autocorrelation and differencing
SARIMASARIMA(1,1,1)(1,0,1,7)ARIMA structure + weekly seasonality
SARIMAXSARIMAX(1,1,1)(1,0,1,7)SARIMA structure + scheduled departures

For model selection you can use AIC and AICc on the training period, residual diagnostics, validation errors from a rolling-origin approach and so on. However, directly comparing the information criteria of models that use different differencing or likelihood definitions may not be appropriate. Also, when evaluating forecast performance, you must apply the same evaluation period and forecast origins.

SARIMAX with exogenous variables is not always the best model. If the exogenous variable carries little information or its future values are highly uncertain, a simpler SARIMA can be more stable.

SECTION 9

How do you read the final evaluation results?

Below is a performance table calculated under identical conditions, forecasting one day ahead at a time over the last 56 days.

Each day's forecast used only the past baggage volume and scheduled flight information available at that forecast time.

ModelMAE (bags)RMSE (bags)
ARIMA9101,180
SARIMA690910
SARIMAX570760
6008001,0001,2001,180910760RMSE910690570MAEARIMASARIMASARIMAX
1-day-ahead forecast performance

Mean absolute error (MAE) is the average of the absolute differences between actual volume and the forecasts. SARIMAX's MAE of 570 bags means that, under this evaluation method, a one-day forecast differed from actual volume by about 570 bags on average.

Root mean squared error (RMSE) is more sensitive to large errors. SARIMAX's RMSE of 760 bags was smaller than the other models', so it can be interpreted as having reduced relatively large forecast misses as well. However, the table above shows 1-day-ahead forecast results, so you cannot conclude that the same ranking holds for 7-day-ahead forecasts.

SECTION 10

How do you interpret an actual 7-day forecast and its prediction intervals?

The following is an example forecast for January 1–7, 2026, calculated by re-estimating the model on the data observed through the end of 2025 and feeding in the number of scheduled departures.

DateScheduled departuresExpected bags95% prediction interval (bags)
Jan 1728,2007,000~9,400
Jan 2788,9007,600~10,200
Jan 3849,7008,300~11,100
Jan 4819,3007,800~10,800
Jan 5758,6007,000~10,200
Jan 6768,7007,000~10,400
Jan 7799,1007,300~10,900
7k8k9k10k11kObservedForecast · 95% interval
Forecast for the first week of January 2026

The expected volume on January 3 is 9,700 bags, with a 95% prediction interval of 8,300–11,100 bags. This interval expresses the uncertainty of a new daily observation, on the condition that the model assumptions and the specified number of scheduled departures are appropriate. It is not a guarantee that each day's actual volume will fall inside the interval; 95% is a criterion about the model's repeated forecasting properties.

Operators can set baseline staffing from the mean forecast and separately plan flexible staff or equipment to respond when demand close to the upper bound appears. Note, though, that this interval may not fully include the possibility that the scheduled flights themselves change. If large-scale cancellations or extra flights are expected, it is a good idea to calculate exogenous-variable scenarios separately.

SECTION 11

Why are residual diagnostics needed?

Even if forecast errors are small, if systematic patterns remain in the residuals, the model may have missed important time dependence.

So after fitting, check the residual series and its ACF, the Ljung–Box test, changes in residual variance and so on.

Ljung–Box · SARIMAX residualsp = 0.28Fail to reject no autocorrelation171421Residual ACF
Residual diagnostics

For example, suppose the p-value of the Ljung–Box test on the SARIMAX residuals was 0.28. This means there is not enough evidence to reject the null hypothesis that there is no residual autocorrelation up to the chosen lag. But it is not evidence that the residuals are completely independent or that the model is necessarily correct.

If large errors occur repeatedly on particular dates such as holidays, you can consider holiday dummies, event variables or separate calendar effects. Even then, feed only variables that can be known in advance for future dates into the forecast, and avoid leaking past information when checking performance.

SECTION 12

Points to watch when using ARIMA, SARIMA and SARIMAX

Respect the time order of the forecast periods.

With time series data, splitting training and evaluation data by shuffling rows at random can let future information leak into past forecasts. So it is best to use time-based splits and rolling-origin validation.

Check whether the exogenous variables will be available in the future.

The flight variable in SARIMAX must be the flight schedule available at the time of forecasting. Putting actual flight records confirmed later into past forecasts overstates performance.

Don't specify the seasonal period mechanically.

Daily data doesn't always have a 7-day period as its key cycle. Check whether weekly, annual and holiday effects exist at the same time and consider other models if needed.

More differencing does not mean better forecasts.

Over-differencing can remove useful level information and make forecasts unstable. Check the residuals and forecast errors together.

Don't interpret model coefficients directly as causal effects.

Even if SARIMAX shows a positive relationship between the number of scheduled flights and baggage volume, this is only a conditional relationship useful for forecasting; an exogenous causal effect has not been proven.

SECTION 13

How do ARIMA, SARIMA and SARIMAX differ from ETS?

ETS is a family of state space models that smooth changes in level, trend and seasonality, while ARIMA focuses on autocorrelation and the differencing and error structure.

Both approaches can be used for many kinds of time series, and in certain cases they are closely related mathematically.

MethodMain featureWhen to consider
ETSSmoothing of level, trend and seasonalityForecasts that use relatively stable patterns
ARIMANonseasonal lag dependence structureSeries where autocorrelation and differencing matter
SARIMARepeating seasonal lag structureA fixed seasonal period, such as weekly or monthly
SARIMAXSeasonal structure + external explanatory variablesForecasts where future values of exogenous variables are available

You can't say any one method is always accurate. Evaluate them over the same forecast horizon and data conditions, and also consider the interpretability needed for operations and the maintenance burden.

SECTION 14

How do you report the results?

In a paper or analysis report, it is good to present the observation period and frequency, the training and evaluation periods, the chosen orders, when the exogenous variable information becomes available, residual diagnostics and forecast errors together.

If you forecast several days at once, report performance separately for each forecast horizon as well.

Example results report

To forecast daily baggage volume at an airport, 731 days of data from January 1, 2024 to December 31, 2025 were analyzed. The first 675 days were used for model training and the last 56 days for final evaluation. A plain ARIMA, a SARIMA reflecting weekly seasonality and a SARIMAX adding the number of scheduled departures as an exogenous variable were compared. In the same 1-day-ahead forecast evaluation, the MAEs were 910, 690 and 570 bags, respectively, and SARIMAX's RMSE of 760 bags was the lowest of the three models.

After refitting the final model to the full observation period and forecasting January 1–7, 2026, the expected volume on January 3 was 9,700 bags, with a 95% prediction interval of 8,300–11,100 bags. However, because the forecasts depend on the assumption that the input number of scheduled departures and the model's error structure are appropriate, the forecasts need to be updated if flight schedules change.

An actual report should also present the rationale for choosing the final orders, the coefficient estimates, the residual tests, how the prediction intervals were calculated and the range of data available at the time of forecasting.

✓Wrap-up

Use time patterns and information known about the future separately

ARIMA forecasts the future through the structure of past values and forecast errors, and SARIMA adds a repeating seasonal lag structure.

SARIMAX adds exogenous variables on top of that, letting the forecast use changes in operating plans that are hard to capture from past baggage volume alone.

When choosing among the three models, rather than comparing only the orders, it is important to review the seasonal structure of the data, the future availability of exogenous variables, residual diagnostics and errors by forecast horizon together. Also, for practical decision-making it is more useful to explain the final forecast together with a prediction interval showing its uncertainty, rather than presenting it as a single number.

KEY TAKEAWAY

The key is not to choose the most complex model, but to check how stably you can explain the future with the information actually available at the time of forecasting.