Course contentsShow
← Data Science
Lesson 774 of 2,14520. Time Series ModelsFree lesson

Autoregressive (AR) Models

Learn how AR models predict current values using linear combinations of past observations.

Autoregressive (AR) Models

What You'll Learn

You'll learn how AR models use a time series' own past values to predict what comes next—like forecasting tomorrow's temperature based on the last few days.

The Core Idea

An autoregressive (AR) model predicts the current value of a time series as a linear combination of its past observations. The "auto" means "self"—the series regresses on itself!

Think of it like this: If you wanted to predict how tired you'll feel tomorrow, you might look at how tired you felt today, yesterday, and the day before. An AR model does exactly that with numerical data.

The AR Model Structure

An AR model of order p, written as AR(p), uses the previous p values:

y_t = c + φ₁·y_(t-1) + φ₂·y_(t-2) + ... + φ_p·y_(t-p) + ε_t

Where:

  • y_t is the current value
  • c is a constant
  • φ₁, φ₂, ..., φ_p are coefficients (weights for past values)
  • y_(t-1), y_(t-2), ... are lagged (past) observations
  • ε_t is random error (the irregular component)

Example: AR(1)

The simplest case, AR(1), uses only the immediately previous value:

y_t = c + φ₁·y_(t-1) + ε_t

If today's stock price was 100andφ1=0.8,themodelmightpredicttomorrow′spriceas:‘10+0.8×100=100 and φ₁ = 0.8, the model might predict tomorrow's price as: `10 + 0.8 × 100 = 90` (plus some noise).

Identifying AR Order

Remember PACF from earlier lessons? It's perfect for identifying AR order! An AR(p) model shows significant spikes at lags 1 through p in the PACF plot, then cuts off sharply.

Key Takeaway: AR models predict the present using weighted combinations of past values, where the number of lags used defines the model's order (p).