NeuroNomixer logoNeuroNomixer
  • Home
  • Blog
  • Visual Guides
  • Authors
  • Contact
Sign InSign Up
NeuroNomixer logo
HomeBlogAuthorsContactPrivacy Policy

© 2026 NeuroNomixer — Built with Next.js & Tailwind CSS

Unit 13: Time Series & Forecasting

Time Series Fundamentals & Forecasting

Explore decomposition, trend, seasonality, smoothing, and forecasting with prediction intervals across three real-world datasets. Learn to spot and prevent temporal leakage.

Explore datasets (1/2)
Adjust smoothing
Read leakage warning

Sign in to save progress

Select Dataset

Monthly retail revenue with strong trend and seasonality (4 years, 2020–2023).

Original Time Series

48 monthly observations, 2020–2023

$ / month
1.0k1.2k1.4k1.6k1.8kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23

Additive Decomposition

Separates the series into trend, seasonal, and residual components. Trend is extracted with a 12-month centred moving average; seasonal is the average deviation from trend by calendar month.

Observed
1.0k1.2k1.4k1.6k1.8kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23
Trend
1.2k1.4k1.6kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23
Seasonal
-200-1000100200Jan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23
Residual
-100-50050100Jan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23

Additive decomposition: Observed = Trend + Seasonal + Residual. The trend captures long-run direction, the seasonal component captures repeating patterns, and the residual is what neither model explains.

Smoothing Methods

Adjust the sliders to see how each method handles noise.

Moving Average

Smooths out short-term fluctuations

w = 12
3 months24 months
1.0k1.2k1.4k1.6k1.8kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23
Original
MA(12)

A larger window produces a smoother line but introduces more lag. Small windows track the data closely but retain noise.

Exponential Smoothing

Weights recent data more heavily

α = 0.20
α=0.05 (slow)α=0.95 (fast)
1.0k1.2k1.4k1.6k1.8kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Dec 23
Original
ES(α=0.20)

ES[t] = α · y[t] + (1−α) · ES[t−1]. High α reacts quickly to changes but stays noisy. Low α is smoother but slow to adapt.

12-Month Forecast with Prediction Intervals

Extends a linear trend fitted by least squares to the deseasonalized history, plus the learned monthly seasonal pattern. The shaded band widens with the forecast horizon using a simplified rule of thumb, PI ≈ ŷ ± 1.96 · σ · √(1 + h/n). Real forecasting libraries derive interval width from the fitted model (for example ARIMA state-space variances) rather than this shortcut.

1.0k1.2k1.4k1.6k1.8k2.0kJan 20Jul 20Jan 21Jul 21Jan 22Jul 22Jan 23Jul 23Jan 24Apr 24Jul 24Oct 24Forecast →
Historical
Forecast
95% Prediction Interval

Hold-Out Accuracy (fit on 2020–2022, evaluated on 2023)

The model is fit on the first 36 months only, then forecasts the final 12 months it never saw. The metrics below compare those forecasts against the held-out 2023 actuals. Scoring a model on data it was fit on would be data leakage, and the numbers would look better than the model deserves.

MAE

27.86$

Mean Absolute Error: average unsigned forecast error.

RMSE

34.41$

Root Mean Squared Error: penalises large errors more than MAE.

MAPE

1.7%

Mean Absolute Percentage Error: relative accuracy. Caveat: MAPE is unreliable when values approach or cross zero.

Critical Concept

Critical Pitfall: Temporal Data Leakage

The most common mistake in time series modeling, and how to avoid it.Click to expand

Stationarity

A series is stationary when its mean, variance, and autocorrelation do not change over time. Many forecasting models require stationarity, achieved through differencing or log transforms.

Autocorrelation (ACF)

The correlation of a series with a lagged version of itself. Seasonal series show spikes at lags 12, 24 in monthly data. The ACF guides lag selection in ARIMA models.

Walk-Forward Validation

The correct CV strategy for time series: train on all data up to time t, predict t+1..t+h, advance by one step. Never shuffle time series data for cross-validation.

← All GuidesNext Guide →