📊 AR(1) & MA(1) Models Visualization

Created by Dr. Pedram Jahangiry | Enhanced with Claude

Generate a random AR(1) or MA(1) series and adjust the autoregressive coefficient φ or moving-average coefficient θ live to see how each parameter shapes memory, stationarity, and the resulting forecast path. The MA(1) forecast collapses to its mean after a single step, while the AR(1) forecast decays toward its long-run mean geometrically — a distinction the chart makes visible rather than merely asserted.

Interactive Teaching Tool for Understanding Autoregressive and Moving Average Models

0.5
1
1
100
20
AR(1) Time Series with Forecasts

📚 AR(1) - Autoregressive Model (Order 1)

yt = c + φ·yt-1 + εt

Key Concepts:
Autoregressive: Current value depends on previous value(s)
φ (Phi): Controls memory - how much past influences present
|φ| < 1: Required for stationarity (series doesn't explode)
φ > 0: Positive autocorrelation (smooth, trending patterns)
φ < 0: Negative autocorrelation (oscillating patterns)
φ → 1: Approaches random walk (long memory)
φ → 0: Approaches white noise (no memory)

Forecasting:
• Uses past values to predict future
• Multi-step forecasts decay toward long-run mean: c/(1-φ)
• Forecast: ŷt+h = c(1-φh)/(1-φ) + φh·yt