Tutorials › Econometrics (Graduate) › Random Walks, Stochastic Trends, And Integration

Unit Roots and Cointegration · Tutorial 389 of 952

Random Walks, Stochastic Trends, And Integration

Learn how random walks generate stochastic trends and how to classify a series by the minimum differencing needed to make it stationary.

Advanced 10 min read

What You'll Learn

  • Define I(0), I(1), and the minimum-differencing convention for I(d)
  • Derive the mean and variance of a random walk with and without drift
  • Explain why nondegenerate random-walk levels are nonstationary
  • Distinguish stochastic trends from stationary fluctuations in a series
  • Work through differences to classify specified processes as I(0) or I(1)
  • Avoid classifying a series from a short observed path alone

Why Differencing Matters

Economic time series often move persistently: a shock to an exchange rate, price index, or output measure may continue to affect its level long after the shock occurs. A stationary fluctuation behaves differently: its distribution does not change over time, and shocks do not permanently shift the series. Differencing provides a precise way to distinguish these patterns.

The central example is the random walk. Its changes can be stationary even though its level is not. The level carries forward the cumulative history of its innovations, creating a stochastic trend. Whether the random walk has a nonzero drift changes its expected path, but does not remove the stochastic trend when its innovations have positive variance.

Definition: A process is covariance stationary if its mean is constant over time, its variance is finite and constant over time, and the covariance between two observations depends only on their time separation. An I(0) process is stationary in levels under the course convention. A process is I(d), for an integer \(d\geq1\), if its \(d\)-th difference is I(0), but its \((d-1)\)-th difference is nonstationary. Thus \(d\) is the minimum number of differences required to obtain stationarity. In particular, I(1) means that the level is nonstationary and the first difference is I(0).

The difference operator is \(\Delta y_t=y_t-y_{t-1}\). Repeated differencing is defined recursively: \(\Delta^2 y_t=\Delta(\Delta y_t)\), and so on. Stationarity here refers to the process implied by a model, not to a visual impression from a short finite record.

Random Walks With and Without Drift

Let \(y_0\) be a fixed initial value, and let the innovations \(\varepsilon_t\) be independent and identically distributed with mean zero and variance \(\sigma^2>0\). The positive-variance condition is important: it ensures that random innovations actually accumulate. A random walk with drift \(\mu\) is

$$ y_t=y_{t-1}+\mu+\varepsilon_t,\qquad t\geq1. $$

When \(\mu=0\), this is a random walk without drift. When \(\mu\neq0\), the series has an expected upward or downward movement of \(\mu\) units per period, in addition to its stochastic movement. Repeated substitution gives

$$ y_t=y_0+\mu t+\sum_{j=1}^{t}\varepsilon_j. $$

The first difference is \(\Delta y_t=\mu+\varepsilon_t\). These differences are independent across time, have constant mean \(\mu\), and have variance \(\sigma^2\); therefore they are covariance stationary. The level, however, has expectation \(y_0+\mu t\) and variance \(t\sigma^2\). Its variance changes with time, so the level is nonstationary whether the drift is zero or nonzero. Consequently, under the stated assumptions, the random walk is I(1).

Key distinction: The drift \(\mu\) determines the systematic change in the expected level. The stochastic trend comes from the cumulative innovations \(\sum_{j=1}^{t}\varepsilon_j\). A nonzero drift does not make the innovations disappear, and a zero drift does not make a random walk stationary when \(\sigma^2>0\).

Why the Level Is Nonstationary

The nonstationarity follows directly from the moments of the process. Because the innovations have mean zero and are independent, their sum has mean zero and variance equal to the sum of their variances. Hence

$$ E(y_t)=y_0+\mu t,\qquad \operatorname{Var}(y_t)=\operatorname{Var}\left(\sum_{j=1}^{t}\varepsilon_j\right)=t\sigma^2. $$

If \(\mu\neq0\), the level mean changes with \(t\). If \(\mu=0\), the mean is constant, but the variance still increases as \(t\sigma^2\), since \(\sigma^2>0\). Either way, covariance stationarity fails. More generally, for \(s\leq t\), the innovations shared by \(y_s\) and \(y_t\) are \(\varepsilon_1,\ldots,\varepsilon_s\), so

$$ \operatorname{Cov}(y_s,y_t)=s\sigma^2. $$

This covariance depends on the earlier time \(s\), not only on the lag \(t-s\). It gives another way to see why the level is not covariance stationary. By contrast, the first differences have covariance zero at every nonzero lag because the innovations are independent.

The assumption \(\sigma^2>0\) is not cosmetic. If \(\mu=0\) and \(\sigma^2=0\), every innovation is zero almost surely, so \(y_t=y_0\) for all \(t\). That constant process is I(0), not a stochastic-trend I(1) process. This degenerate case is excluded from the nondegenerate random-walk claims above.

Worked Example: A Random Walk Without Drift

Suppose a hypothetical series follows \(y_t=y_{t-1}+\varepsilon_t\), with \(y_0=100\). For illustration, take three realized innovations to be \(1,-2,\) and \(0.5\) units. The model assumes the innovations are independent, have mean zero, and have a common variance \(\sigma^2>0\); the displayed values are one possible path, not evidence for those assumptions.

Construct the levels. Starting at \(y_0=100\),

$$ y_1=100+1=101,\qquad y_2=101-2=99,\qquad y_3=99+0.5=99.5. $$

Difference the levels.

$$ \Delta y_1=101-100=1,\qquad \Delta y_2=99-101=-2,\qquad \Delta y_3=99.5-99=0.5. $$

These differences reproduce the innovations. Under the model, \(\Delta y_t=\varepsilon_t\) is stationary, while \(\operatorname{Var}(y_t)=t\sigma^2\) increases over time. The series is therefore I(1). The three calculated differences illustrate the identity but cannot establish stationarity from a short sample path.

Drift, Stationary Fluctuations, and Integration

A random walk with drift combines a deterministic change in expectation with a stochastic trend. Its increments fluctuate around the constant mean \(\mu\), while its level includes the cumulative innovations. This is different from a stationary fluctuation around a stable level: in a stationary process, shocks may affect later observations, but they do not accumulate as a permanent sum of innovations.

The distinction matters for interpretation. A persistent rise in a series does not, by itself, tell us whether it comes from a deterministic trend, a stochastic trend, or a sequence of stationary fluctuations. The model and its differenced behavior matter. Later analysis may specify deterministic terms explicitly; here, the focus is on the random-walk mechanism and on classifying the stated processes by their differences.

Worked Example: A Random Walk With Drift

Consider a hypothetical process \(y_t=y_{t-1}+2+\varepsilon_t\), where \(y_0=50\), the innovations are independent with mean zero and variance \(\sigma^2=1\) unit squared, and one possible sequence of realized innovations is \(-1,0.5,-0.5\). The positive innovation variance satisfies the nondegeneracy condition.

Calculate the levels.

$$ y_1=50+2-1=51,\qquad y_2=51+2+0.5=53.5,\qquad y_3=53.5+2-0.5=55. $$

Calculate the first differences.

$$ \Delta y_1=51-50=1,\qquad \Delta y_2=53.5-51=2.5,\qquad \Delta y_3=55-53.5=1.5. $$

These values equal \(2+\varepsilon_t\), as required. The model gives \(E(y_t)=50+2t\) units and \(\operatorname{Var}(y_t)=t\) unit squared. For example, at \(t=3\), the expected level is \(56\) units and the variance is \(3\) unit squared. The differences have mean \(2\) units and variance \(1\) unit squared at every time. Thus the level is nonstationary and the first difference is stationary: this process is I(1).

Why the Minimum Number of Differences Matters

A process does not become I(1) merely because its first differences happen to be stationary. A stationary process can also have stationary first differences. Integration order records the minimum number of differences needed, so a process that is already stationary in levels is I(0), even if differencing it leaves a stationary process.

For an I(0) process \(y_t\), the difference \(\Delta y_t\) is a linear combination of two observations of a stationary process, and is itself stationary. For example, its mean is zero if \(y_t\) has a constant mean, and its variance is finite and constant because the autocovariances of \(y_t\) depend only on lag. This is why the minimum-differencing condition is essential: checking only whether \(\Delta y_t\) is stationary cannot distinguish I(0) from I(1).

Worked Example: A Stationary Series Is Not I(1)

Suppose \(y_t=\varepsilon_t\), where \(\varepsilon_t\) is independent over time, has mean zero, and has variance \(4\) units squared. The level is already stationary: its mean is zero, its variance is \(4\), and its covariance is zero at every nonzero lag. Therefore \(y_t\) is I(0).

Its first difference is

$$ \Delta y_t=\varepsilon_t-\varepsilon_{t-1}. $$

The difference has mean \(0\) and variance \(4+4=8\) units squared. At lag one,

$$ \operatorname{Cov}(\Delta y_t,\Delta y_{t-1}) =\operatorname{Cov}(\varepsilon_t-\varepsilon_{t-1},\,\varepsilon_{t-1}-\varepsilon_{t-2}) =-4. $$

At lags greater than one, the differences share no innovations, so their covariance is zero. These moments depend on the lag and not on calendar time, so \(\Delta y_t\) is also stationary. But \(y_t\) required zero differences to become stationary; its integration order is I(0), not I(1).

A Practical Classification Procedure

For a specified stochastic process, classify integration order by checking the level first and then differencing. A concise workflow is:

1
Check the level.
Determine whether the process has a constant mean and variance and covariances that depend only on lag. If it is stationary, classify it as I(0).
2
Take the first difference if needed.
Compute \(\Delta y_t=y_t-y_{t-1}\), then use the model to check whether the differenced process is stationary.
3
Apply the minimum rule.
If the level is nonstationary and the first difference is stationary, classify the process as I(1). Do not assign I(1) just because the first difference is stationary.

A finite observed sequence can be differenced arithmetically, but it cannot by itself establish the probability structure of an unobserved process. Integration-order conclusions require assumptions or a statistical analysis of the data; a handful of increasing or decreasing observations is not sufficient.

Common Pitfalls

  • Calling a zero-drift random walk stationary. A constant expected level does not imply stationarity. With \(\sigma^2>0\), its variance is \(t\sigma^2\), which changes over time.
  • Ignoring the drift. A random walk with drift has differences with mean \(\mu\), not necessarily zero. Stationarity does not require a zero mean; it requires that the mean remain constant.
  • Classifying from the first difference alone. The first difference of an I(0) series can also be stationary. Check the level first and use the minimum number of differences.
  • Inferring integration from a short plot or path. A finite sequence may look persistent by chance. A model-based classification concerns the process-generating properties, not just the direction of a few observations.
Key takeaway: With independent, mean-zero innovations of positive variance, a random walk with or without drift has nonstationary levels and stationary first differences, so it is I(1). An I(0) process is already stationary in levels; integration order is the minimum differencing required.

Check Your Understanding

Answer each question using the model assumptions and the minimum-differencing definition.

  1. For \(y_t=y_{t-1}+\varepsilon_t\), with independent innovations of mean zero and variance \(\sigma^2>0\), what are the mean and variance of \(y_t\) when \(y_0\) is fixed?
  2. For a random walk with drift \(\mu\), what is the mean and variance of its first difference?
  3. Why is a random walk with zero drift still nonstationary when its innovation variance is positive?
  4. A process is stationary in levels and its first difference is also stationary. What is its integration order, and why?
  5. Why can a short increasing sequence of observed values not, on its own, establish that the data-generating process is I(1)?
Clinical Biostats