← SciSim / Statistics
Time Series Basics — AR(1), ACF
Tier: Standard Undergraduate
§1 Interactive Simulation
Parameter 1
Parameter 2
Mean
Variance
Samples
0
Query prob
Parameter 1
Parameter 2
Query x
Speed 20/s
§2 The Idea, Step by Step

From "tomorrow looks like today" to AR(1)

Think about the weather. If it is warm today, tomorrow is probably warm too — not exactly the same, but close. Yesterday carries over into today, plus a little surprise. That "carry-over plus a fresh surprise" is the entire idea behind a time series: each value remembers the one before it, then gets nudged by something new.

BUILD — NAME THE PIECES

Call the value at time step $t$ the symbol $X_t$. The simplest useful model is AR(1) — "autoregressive of order 1." It says today is a fraction $\phi$ of yesterday, plus a fresh random shock $\varepsilon_t$:

$$X_t = \phi\,X_{t-1} + \varepsilon_t$$

Here $\phi$ (phi) is the memory knob, somewhere between $-1$ and $1$. Worked number: if $\phi = 0.8$ and yesterday's value was $X_{t-1}=10$, then today is expected to be $0.8\times 10 = 8$, scattered up or down by the size of the shock $\varepsilon_t$. The shock is a draw from a bell curve with mean $0$ and spread $\sigma$ — that bell is exactly what the plot above shows.

DEEPEN — MEMORY THAT FADES

How strongly does $X_t$ relate to a value $k$ steps back? That is the autocorrelation function, and for AR(1) it decays geometrically: $\text{ACF}(k)=\phi^k$. With $\phi=0.8$, the link two steps back is $0.8^2=0.64$ and five steps back is $0.8^5\approx 0.33$ — memory fades but never quite vanishes. The series is stationary (its mean and variance stay stable over time) only when $|\phi|<1$. Push $\phi$ to $1$ and you get a random walk: shocks never fade, and the series wanders off without settling. In the sim, Parameter 1 sets the center the series fluctuates around and Parameter 2 sets the noise size $\sigma$ — the standard deviation of each shock $\varepsilon_t$.

TRY THIS IN THE SIM ABOVE

The bell curve is the distribution of one shock $\varepsilon_t$ — the surprise added at each step. First, drag Parameter 2 small and watch the bell narrow: small shocks mean the series barely strays from its trend. Then widen Parameter 2 and the curve spreads — bigger shocks make a jumpier, less predictable series. Finally click +1000 and watch the green histogram fill in the smooth bell: the noise is well-behaved (mean stays put, variance stays finite), which is exactly the condition that keeps AR(1) stationary.

§3 Mathematical Derivation

Time Series Basics — AR(1), ACF — Autocorrelation and autoregressive models

$$X_t = \phi X_{t-1} + \varepsilon_t,\quad \varepsilon_t\overset{iid}{\sim}N(0,\sigma^2)$$

$\text{ACF}(k) = \text{Corr}(X_t, X_{t-k}) = \phi^k \quad\text{(AR(1))}$

KEY PROPERTIES

This distribution has important theoretical and applied properties. See the simulation tabs to explore how shape changes with parameters.

APPLICATIONS

Finance: stock price prediction, volatility modeling. Economics: GDP, inflation, unemployment. Climate: temperature anomalies. Signal processing: noise filtering. Machine learning: LSTM networks for sequential data. The AR(1) model is the simplest non-trivial time series — stationary when |φ|<1. Random walk (φ=1) is non-stationary.

Key Results

Use the interactive simulation above to explore how the PDF shape responds to parameter changes. The Live Sampling tab demonstrates convergence of empirical frequencies to theoretical probabilities.

Ross — A First Course in Probability, 10th ed. 2019
Hogg, McKean & Craig — Introduction to Mathematical Statistics, 8th ed. 2018
DeGroot & Schervish — Probability and Statistics, 4th ed. 2012
§4 FAQ
StatQuest — youtube.com/@statquestSeeing Theory — seeing-theory.brown.edu
§5 Misconceptions & Common Errors
Key Error

Always verify parameter definitions before computing probabilities.
Different textbooks and software packages use different parameterizations. Always check which convention is being used (e.g., rate vs scale for exponential/gamma; shape vs rate for beta). Plug in extreme values and check that the PDF shape matches your expectation.
See the simulation to visualize how parameters affect the distribution shape.

Casella & Berger — Statistical Inference, 2nd ed. 2002
DeGroot & Schervish — Probability and Statistics, 4th ed. 2012