ARIMAX Time Series Forecasting Tool

New

Forecast marketing metrics using ARIMAX (AutoRegressive Integrated Moving Average with eXogenous variables). Upload time series data, select external predictors like ad spend or seasonality indicators, and generate forecasts with prediction intervals.

πŸ‘¨β€πŸ« Professor Mode: Guided Learning Experience

New to ARIMAX? Enable Professor Mode for step-by-step guidance through time series forecasting with external predictors!

OVERVIEW & WHAT THIS TOOL SOLVES

Forecasting weekly revenue or web traffic with standard regression ignores serial dependence: this week's sales carry momentum from last week's sales and shocks. Conversely, pure ARIMA forecasting leaves out controllable marketing inputs such as ad spend and promotions. ARIMAX Time Series Forecasting combines AutoRegressive (AR), Integrated differencing (I), and Moving Average (MA) dynamics with eXogenous predictors (X). That lets you estimate how the outcome moves with marketing inputs beyond its own momentum, and project multi-step forecasts with prediction intervals.

🎯 Questions It Answers

  • How strongly does our time series move with marketing inputs (ad spend, promos, price) in the same period, after accounting for autocorrelation and trends?
  • What is our multi-period forecast and 95% prediction interval under planned future marketing spend?
  • Do we need seasonal (SARIMAX) or moving-average (MA) terms to capture lingering shocks and calendar cycles?

πŸ“‚ What Data You Need

  • Time-Ordered CSV: Evenly spaced periods (days, weeks, months, or quarters) sorted chronologically.
  • 1 Continuous Outcome (Yt): Numeric series to forecast (e.g., sales, sessions, signups).
  • Optional Exogenous Levers (Xj,t): Complete columns for external drivers (e.g., ad spend, promo flags).

πŸ’‘ What You'll Discover

  • Joint Parameter Table: Exogenous driver slopes (Ξ²), autoregressive lags (Ο†), and moving-average error terms (ΞΈ).
  • ACF / PACF & Ljung-Box Diagnostics: Residual autocorrelation checks verifying whether your (p, d, q) order captured the time structure.
  • Scenario Forecast Simulator: Interactive multi-step forecasts under custom future predictor trajectories.
πŸ” Modeling Rules: Understanding (p, d, q), Exogenous Drivers & ARX vs. ARIMAX
  • The Four Building Blocks: AR (p) captures momentum from past outcomes, while I (d) differences the series (Yt βˆ’ Ytβˆ’1) to remove drift and reach stationarity. MA (q) absorbs short-lived shocks from past forecast misses, and X estimates how the outcome moves with external inputs in the same period.
  • Complete Predictor Histories Required: External predictors (X) cannot contain missing values in the historical training window. To forecast h steps ahead, you must supply planned or baseline values for those predictors over all h future periods.
  • New to Time Series? Start with the ARX Forecasting Tool to master AR(p), differencing(d), and external predictors before adding Moving Average MA(q) and seasonal terms here.
πŸ“ Under the Hood: Model Equations & Variable Definitions
1. ARIMAX(p, d, q) Model Specification
\[ Y_t = \mu + \sum_{j=1}^{k} \beta_j X_{j,t} + u_t, \qquad (1 - \phi_1 B - \cdots - \phi_p B^p)(1 - B)^d u_t = (1 + \theta_1 B + \cdots + \theta_q B^q)\varepsilon_t \]
πŸ’¬ Read it in plain English: Outcome Yt moves with the external predictors Xj,t in the same period. The unexplained time-series error ut is differenced d times to remove trend, then modeled with p autoregressive lags and q moving-average shock lags. The constant ΞΌ appears only when the model does no differencing (d = 0 and no seasonal differencing); with differencing there is no constant, so the model has no drift of its own.
Yt, Xj,t
Time-Series Outcome & Exogenous Predictors YOUR DATA β“˜
Target metric at period t (Yt) and external marketing or environmental inputs (Xj,t).
ΞΌ
Mean Level (intercept) ESTIMATED β“˜
The level of Yt when every predictor is 0, in a model with no differencing. A differenced model has no constant (no drift).
Ξ²j
Exogenous Predictor Coefficients ESTIMATED β“˜
Expected difference in Yt when Xj,t is 1 unit higher in the same period. Reading it as the effect of the input assumes the input was not timed to expected demand.
Ο†1 … Ο†p, ΞΈ1 … ΞΈq
Autoregressive (AR) & Moving Average (MA) Weights ESTIMATED β“˜
Carryover weights on past series deviations (Ο†1…φp) and past white-noise shocks (ΞΈ1…θq).
B, d, ut, Ξ΅t
Backshift Operator, Differencing Order & Innovations OUTPUT β“˜
Lag operator B (where (1 βˆ’ B)ut = ut βˆ’ utβˆ’1), differencing count d, correlated error ut, and white-noise innovation Ξ΅t.
πŸ“š

Use a Case Study

Use presets to auto-load realistic marketing time series data. The download button exposes the exact dataset used so you can tweak it in Excel before re-uploading.

πŸ“€

Upload Your Data

Upload a CSV with at least a date/time column and a numeric outcome column. Optional columns for exogenous predictors (ad spend, promotions, etc.) can be included.

Drag & drop time series file

CSV with columns: date, outcome, [optional exogenous variables]. Up to 2,000 rows.

No file uploaded.

INPUTS & SETTINGS

Column Selection

Select which columns represent the time period, outcome (Y), and any exogenous predictors (X).

Date/Time Format Help

Supported date formats:

  • YYYY-MM-DD (e.g., 2024-01-15)
  • YYYY-MM (e.g., 2024-01)
  • MM/DD/YYYY (e.g., 01/15/2024)
  • DD/MM/YYYY (e.g., 15/01/2024)

Not supported:

  • Spelled-out months (e.g., "January 2024")
  • Relative dates (e.g., "Last week")
  • Inconsistent formats within the same column
πŸ’‘ Surefire Method (Recommended)

If you're having trouble with date parsing, use simple sequential labels instead:

  • 1, 2, 3, 4, ... (numeric sequence)
  • t1, t2, t3, t4, ... (labeled sequence)
  • Period1, Period2, Period3, ...
  • Week1, Week2, Week3, ... or Month1, Month2, ...

The model only needs the chronological order of your observations; actual dates are used only to label the output, so sequential numbers work fine.

Upload data to select exogenous predictors.

Predictor timing: when each effect starts and how long it lasts Default: same period, no carryover

By default a predictor is matched to the same period as the outcome. Effect starts after shifts it later: with 1, this period's outcome is matched to last period's value, and the first row is left out of the fit because it has no earlier value. Carries over keeps a share of the effect in each following period, as the Marketing Mix Modeling Lab's carryover does. Unlike the MMM Lab, which starts the carryover from nothing unless you mark a channel as already running, this page does not assume a predictor started at the first row: it also estimates how much of the effect was already carrying over from before the data began, so spending that was running all along is not undercounted. That term is counted among the model's parameters; its estimate is in the note under the metrics, not in the coefficient table.

Select a predictor above to set when its effect starts and how long it lasts.

Trying several settings and keeping the best-looking one is how false findings are made. In tests on data where the predictor truly did nothing, the best of its 65 delay and carryover settings looked significant about half the time for a daily on/off flag (about 6 times in 10 when it marks runs of days) and about three times in four for monthly spend; with three predictors each set on its own, at least one looked significant about 9 times in 10. One setting chosen in advance did so about 1 time in 20. Choose a setting for a reason you can state, then judge it on the held-back periods.

Model Specification

Set the ARIMA order (p, d, q). Use the diagnostics panel to help choose appropriate values.

Enable this if your data shows repeating patterns at regular intervals (e.g., weekly cycles, monthly patterns).

6 periods

A 95% prediction interval is the range the actual value in a future period should fall inside 95% of the time if the model is right; it is wider than a confidence interval for an average because it includes that period's own random shock. This level does not change which coefficients count as significant.

The model is refitted without those periods, forecasts them from the predictors' actual values, and is scored against the seasonal-naive forecast (the same period one season back) and the naive forecast (the last value). In-sample RMSE and MAE cannot tell you this.

Advanced settings: the estimate search Default settings

Each extra start begins the search for the best estimates from a different random point and runs it again. After the fit the page says whether they all reached the same fit, found a better one, landed on different fits, or reached the same log-likelihood with different AR and MA estimates; the last two usually mean the model has more AR or MA terms than the data can pin down. Starts that all agree do not show that the model is well specified: with one AR or MA term more than the data need, they usually still agree.

Extra starts guard against the search stopping on a lesser fit. Each one can add about as long as the first search took. On a large file the time limit may stop them early, and the page will say how many finished.

How long the page may search for the best estimates. A search the limit stops is reported with its best point so far, and the page says the numbers are approximate.

A longer limit gives the search more time to finish on large files. The wait can be up to about three and a half times this number when the holdout test is on, and twice this number when it is off. The page cannot be interrupted or scrolled while it runs, and your browser may ask whether to wait; choose Wait.

Update Forecast refits the model after a change to the forecast horizon, the forecast band level, the significance level or a search setting (Advanced settings); with the same data, orders and search settings the estimates stay the same unless the time limit stops the search.

Analysis Settings

Sets which coefficients are highlighted as significant and the level of their confidence intervals. The forecast band has its own level, set by the buttons beside Forecast Periods.

VISUAL OUTPUT

Time Series with Forecasts

Upload data and fit the model to see the time series plot with forecasts and prediction intervals.

Interpretation Aid

The solid blue line shows historical values, while the red dashed line shows forecasts. The shaded area is the prediction interval: the range each future value should fall in, at the chosen level, if the model is right. It widens further out because the uncertainty adds up period by period. Forecasts depend on the assumed values for exogenous predictors above.

πŸ”„ SARIMAX forecasts: If you enabled seasonality, the forecast should show the expected seasonal pattern (ups and downs) based on where you are in the cycle. If the forecast looks "flat" despite obvious historical patterns, check: (1) Is the pattern truly seasonal (fixed calendar cycles) or event-driven? (2) Is your seasonal period (s) correct? (3) Do you have enough data (at least 2 full cycles)?

Residuals Diagnostics

Residuals Over Time

Residuals should appear randomly scattered around zero with no obvious patterns.

ACF of Residuals

PACF of Residuals

Interpretation Aid: Understanding Residual Diagnostics
πŸ“Š Residuals Over Time

Good model fit produces residuals that look like white noise: randomly distributed around zero with constant variance. Look for:

  • No trends: Residuals shouldn't drift up or down over time
  • Constant spread: The "band" of residuals should be roughly the same width throughout
  • No patterns: Cycles or repeating structures suggest missed seasonality
πŸ“ˆ ACF & PACF Charts

ACF (Autocorrelation): Measures correlation with past values at each lag.

PACF (Partial Autocorrelation): Direct correlation at each lag, removing intermediate effects.

  • Bars outside red lines: Statistically significant autocorrelation (potential problem). Expect about one bar in twenty to cross the lines by chance alone, so look for spikes at meaningful lags (1, 2, or the season).
  • All bars inside red lines: no autocorrelation detected, which is what white noise looks like (good)
⚠️ Problem Patterns & Solutions
PatternMeaningTry This
Significant ACF spikes at lags 1, 2, 3... MA terms needed Increase q (MA order)
Significant PACF spikes at lags 1, 2, 3... AR terms needed Increase p (AR order)
Slow decay in ACF Series not stationary Increase d (differencing)
Spikes at the season's lag (12 for monthly data, 4 for quarterly, 7 for daily) Seasonal pattern not captured Enable "Include Seasonality" and set s to the lag with spikes

SUMMARY STATISTICS

Descriptive Statistics

Outcome Variable

Statistic Value
Provide data to see summary statistics.

Exogenous Predictors

Variable Mean Std. Dev. (sample) Min Max
Provide data to see predictor statistics.

MODEL RESULTS

Model specification: –
AIC: –
BIC: –
RMSE: –
MAE: –
Interpretation Aid

RMSE and MAE here are in-sample: they score the periods the model was fitted to. Turn on Hold back the last periods above the Fit button for a score on unseen periods against a baseline.

AIC/BIC: Lower is better: both reward fit and charge a penalty for each extra term. Compare AIC and BIC only between models with the same differencing (the same d and D) fitted to the same series, for example ARIMA(1,1,1) against ARIMA(0,1,1), or the same orders with and without predictors. Changing d or D changes the data the likelihood is computed on, so those numbers cannot be compared; use the holdout test for that.

RMSE: Root Mean Square Error: average magnitude of prediction errors in the same units as the outcome.

MAE: Mean Absolute Error: average absolute deviation, less sensitive to outliers than RMSE.

Tip: If adding seasonal AR or MA terms (with d and D unchanged) raises AIC and BIC, the seasonal pattern may not be strong enough to justify the extra terms. Seasonal differencing (D = 1) changes the data, so judge that model on the holdout test, not on AIC.

APA-Style Report

Fit the model to see the APA-style statistical report.

Managerial Interpretation

Business-focused interpretation will appear here after fitting the model.

Coefficient Estimates

Parameter Estimate Std. Error p-value 95% CI
Fit the model to view coefficient estimates.
Interpretation Aid: Understanding Coefficients
πŸ“Š Types of Coefficients
AR Coefficients (ar.L1, ar.L2, ...)

What they mean: How the part of the outcome that the mean and predictors leave unexplained carries over from earlier periods. With d = 1 they describe period-to-period changes, not levels.

  • Positive (e.g., 0.7): Persistence: a period above what the model expects tends to be followed by another one above it (with d = 1: a rise tends to be followed by another rise)
  • Negative (e.g., -0.3): Reversal: a period above expectation tends to be followed by one below it (with d = 1: a rise tends to be partly undone)
  • Close to 0: Past periods add little to the prediction
  • Close to 1 (0.99 or more for a single AR term, or AR terms adding up to 0.98 or more with d = 0): the series still behaves like a random walk at this differencing; the page flags it, and one more difference is usually the fix

Example: ar.L1 = 0.65 means "about 65% of last period's deviation (from what the mean and predictors explain) carries over to this period"; with d = 1, read the deviation as last period's change.

MA Coefficients (ma.L1, ma.L2, ...)

What they mean: How much past forecast errors affect current values. These capture short-term adjustments.

  • Positive (e.g., 0.5): If we under-predicted last period, we adjust upward this period
  • Negative (e.g., -0.4): If we under-predicted last period, part of that surprise is undone this period. This is common after differencing: it is what exponential smoothing does. Near -1 it is the sign of over-differencing, which the page flags.

Example: ma.L1 = 0.45 means "if sales came in $100 above our forecast last period, add about $45 to this period's forecast."

Exogenous Coefficients (your predictor names)

What they mean: How much higher the outcome is, in the same period, for each one-unit higher value of the predictor, with the series' own dynamics in the model.

  • Read them like regression coefficients on the level of the outcome, even when the model differences the series
  • A one-unit higher predictor goes with an outcome higher by the coefficient value in the same period; that is an association, not proof that the predictor causes the change
  • If you set a delay or carryover under Predictor timing, a predictor's row is its effect in the first period it reaches, not in the same period; the note under the coefficient table says which rows this applies to.

Example: ad_spend = 2.3 means "a month with $1 more advertising goes with $2.30 more in sales that month, with the model's time-series terms accounted for."

SigmaΒ² (sigma2)

What it means: The estimated variance of the random error term. Larger values = more unexplained variability.

πŸ”„ Seasonal Coefficients (ar.S.L*, ma.S.L*, SARIMAX Only)

What they mean: These appear when you enable seasonality. They capture how the same season last cycle relates to the current period.

  • ar.S.L12: How this month's deviation relates to the same month last year (for s=12)
  • ma.S.L12: Adjustment based on the forecast miss in the same month last year (for s=12)

Example: ar.S.L12 = 0.8 means "80% of last year's same-month deviation (from what the mean and predictors explain) carries over to this month."

If seasonal AR or MA coefficients are non-significant, the seasonal pattern may be weak or you may have chosen the wrong period (s). With seasonal differencing (D = 1) the pattern itself is carried by the difference, so a non-significant seasonal MA term says little about how strong the season is.

πŸ“ˆ Statistical Significance
  • p-value below the significance level (0.05 unless you change it under Analysis Settings): the coefficient is statistically significant (highlighted in green)
  • p-value above it: Cannot rule out that the true effect is zero
  • Confidence Interval: Its level matches the significance level (95% at 0.05); if it doesn't include 0, the coefficient is significant

Non-significant AR or MA terms might indicate you've over-specified the model. Try reducing p or q (or P/Q for seasonal terms).

⚠️ Common Issues
  • Very large standard errors: Possible multicollinearity or insufficient data
  • AR or MA terms pinned at the edge (near 1 or -1): the page keeps them stationary and invertible and flags a fit that lands on the edge; the write-up names the change to try (often a different d or D)
  • All exogenous coefficients non-significant: External variables may not help; try a simpler ARIMA model
  • Seasonal coefficients non-significant: You may have the wrong seasonal period (s), or the pattern isn't truly seasonal
  • Model takes very long to fit: A large seasonal period (s near 24) with seasonal terms is the usual cause; aggregate to a coarser period (smaller s) or drop a seasonal term

Forecasts

Period Forecast Lower (95%) Upper (95%)
Fit the model to view forecasts. Use the slider to select 0-12 forecast periods.

DIAGNOSTICS & ASSUMPTIONS

Stationarity & Model Diagnostics

Click "Check Stationarity" or fit the model to see diagnostic tests.

Augmented Dickey-Fuller Test (ADF)

Tests whether the series has a unit root (non-stationary).

What is the ADF Test?

The ADF test checks whether your time series has a unit root, a wandering level that never settles; a series without one is stationary (statistical properties don't change over time). ARIMA models need a stationary series once it has been differenced.

  • p-value < 0.05: βœ… the test rejects a unit root, so the series looks stationary. Try d = 0.
  • p-value β‰₯ 0.05: ⚠️ the test cannot reject a unit root; that does not prove there is one, but with a visible trend, differencing (d = 1) is the usual next step.

What makes a series non-stationary?

  • Trends (consistently going up or down)
  • Changing variance (volatility increases over time)
  • Seasonal patterns with changing amplitude

The fix: Differencing (setting d=1 or d=2) removes trends. The model then works with changes rather than levels.

Ljung-Box Test (Residual Autocorrelation)

Tests whether residuals exhibit significant autocorrelation.

What is the Ljung-Box Test?

This test checks if there's leftover pattern in your residuals (the differences between actual and fitted values).

  • p-value > 0.05: βœ… no autocorrelation detected at the tested lags, which does not prove the model is right; read it with the residual plots and a holdout test.
  • p-value ≀ 0.05: ⚠️ Significant autocorrelation detected. The model is missing some structure.

If you see significant autocorrelation:

  • Try increasing p (AR order) if PACF shows spikes
  • Try increasing q (MA order) if ACF shows spikes
  • Check for seasonal patterns you haven't accounted for
  • Consider adding more exogenous variables

Model Selection Guidance

Choosing p (AR order)

Fit the model with p = 0 and q = 0 at your chosen d: its residuals are then the (differenced) series itself, so the PACF of Residuals chart shows the series' own PACF:

  • Count significant spikes (bars outside red lines)
  • The number of spikes before cutoff = suggested p
  • Typical values: 0, 1, or 2

PACF shows 2 significant spikes β†’ try p=2

Choosing d (Differencing)

Based on the ADF test:

  • ADF p-value < 0.05 β†’ d=0 (the test rejects a unit root)
  • ADF p-value β‰₯ 0.05 β†’ try d=1
  • The differenced series still cannot reject a unit root β†’ d=2 is possible, but look at the chart first
  • Rarely need d > 2

Upward trend in data β†’ likely need d=1

Choosing q (MA order)

From the same p = 0, q = 0 fit, read the ACF of Residuals chart:

  • Count significant spikes after lag 0
  • Spikes that cut off sharply suggest MA terms
  • Typical values: 0, 1, or 2

ACF shows 1 significant spike at lag 1 β†’ try q=1

Common Starting Points
ModelWhen to Use
ARIMA(1,1,1)A common start for a series that wanders or trends; the page fits no drift term, so its forecast levels off instead of extending the trend
ARIMA(0,1,1)Random walk with smoothing (simple exponential smoothing)
ARIMA(1,0,0)Stationary data with persistence (AR(1) process)
ARIMA(0,1,0)Pure random walk (tomorrow = today + noise)
ARIMA(2,1,2)More complex dynamics; try if simpler models fail diagnostics
πŸ’‘ Model Comparison Tip

Try a few (p, q) combinations at the same differencing and compare:

  • AIC/BIC: Lower is better, but only between models with the same d and D (penalizes complexity)
  • Ljung-Box p-value: Above 0.05 means no detectable leftover autocorrelation, not proof the model is right
  • Holdout error: Lower than the baseline's on held-back periods; the one check of the three that also compares models with different differencing

In-sample RMSE usually falls as terms are added, so it cannot choose the order by itself. The best model balances fit with simplicity (few parameters, the lowest AIC at its differencing) and holds up on the holdout test.