Tutorials › Econometrics (Graduate) › Random Walks and Trends as Stationarity Counterexamples

Stationary Processes and Dependence · Tutorial 352 of 952

Random Walks and Trends as Stationarity Counterexamples

Learn how accumulating shocks or adding a deterministic time trend can make a process nonstationary, and how to verify the mean and covariance restrictions directly.

Beginner 10 min read

What You'll Learn

  • State the weak-stationarity restrictions in terms of a constant mean and lag-dependent covariance.
  • Derive the mean and variance of a random walk with and without drift.
  • Compute the random walk covariance between two dates and identify its dependence on calendar time.
  • Check how a deterministic linear trend affects the mean and covariance restrictions.
  • Distinguish the zero-innovation-variance case from a random walk with genuinely variable shocks.
  • Avoid mistaking a constant mean or a lag-invariant covariance for full weak stationarity.

Why Random Walks and Trends Challenge Stationarity

A time series can look simple and still fail to be weakly stationary. In a random walk, shocks accumulate rather than dissipate: the level at a later date contains all earlier innovations. In a deterministic-trend process, the expected level changes systematically with time even if the deviations around that trend behave stationarily. Examining their moments makes clear which feature of weak stationarity each process violates.

The distinction matters because many time-series summaries and methods are developed for processes whose means and covariances do not change with calendar time. A plot that drifts upward is a clue, but the decisive check is to calculate the mean and covariance. The calculations also reveal an important edge case: if the random walk’s innovation variance is zero, its covariance restriction does not fail, even when it has nonzero drift.

Definition: A process \(X_t\) with finite second moments is weakly stationary if its mean is constant over time and its covariance between any two dates depends only on the time separation. Thus \(E[X_t]=\mu\) for every \(t\), and \(\operatorname{Cov}(X_t,X_{t-h})=\gamma(h)\) whenever both dates are defined. In particular, the variance \(\gamma(0)\) must be constant over time.

These are separate restrictions. A process can have a constant mean but a time-varying variance, or it can have constant variance and lag-dependent covariances but a changing mean. To establish weak stationarity, both restrictions must hold. The calculations below use innovations with mean zero, finite variance \(\sigma^2\), and zero covariance across distinct dates. Independence is not required for these moment calculations.

Mean and Variance of a Random Walk

Consider a random walk with drift, initialized at a fixed value \(x_0\):

$$ X_t=X_{t-1}+\delta+\varepsilon_t,\qquad t=1,2,\ldots,\qquad X_0=x_0. $$

Here \(\delta\) is the drift per time period, and the innovations satisfy \(E[\varepsilon_t]=0\), \(\operatorname{Var}(\varepsilon_t)=\sigma^2\), and \(\operatorname{Cov}(\varepsilon_t,\varepsilon_j)=0\) for \(t\ne j\). Iterating the equation gives \(X_t=x_0+\delta t+\sum_{i=1}^{t}\varepsilon_i\). Taking expectations and variances yields:

$$ E[X_t]=x_0+\delta t,\qquad \operatorname{Var}(X_t)=t\sigma^2. $$

The initial value is fixed, so it contributes no variance. Each innovation contributes \(\sigma^2\), and uncorrelated innovations have zero cross-covariances; consequently, the variance of their sum is \(t\sigma^2\). With no drift, the mean is constant at \(x_0\), but if \(\sigma^2>0\), the variance increases with time. Constant mean alone therefore does not make a random walk weakly stationary.

Worked Example: A Random Walk Without Drift

Suppose a hypothetical process has \(X_0=10\), no drift, and innovations with mean zero, variance \(4\), and zero covariance across dates. Find the mean and variance at dates \(0\) through \(3\), and compute one covariance between different dates.

Here \(\delta=0\) and \(\sigma^2=4\). The formulas give \(E[X_t]=10\) and \(\operatorname{Var}(X_t)=4t\). Thus the mean is \(10\) at every date, while the variances at \(t=0,1,2,3\) are respectively \(0,4,8,12\).

To find \(\operatorname{Cov}(X_3,X_1)\), note that \(X_1\) contains the first innovation and \(X_3\) contains the first three. Their shared random component is \(\varepsilon_1\), so the covariance is \(\operatorname{Var}(\varepsilon_1)=4\). The variance already fails to remain constant, and the covariance calculation below shows that covariances at a fixed lag also change with calendar time. This process is not weakly stationary.

Why the Random Walk Covariance Depends on Date

The covariance restriction can be checked directly. For dates \(s,t\geq 0\), the deterministic terms \(x_0+\delta t\) and \(x_0+\delta s\) do not affect covariance. Expanding the covariance of the innovation sums gives:

$$ \begin{aligned} \operatorname{Cov}(X_t,X_s) &=\operatorname{Cov}\left(\sum_{i=1}^{t}\varepsilon_i,\sum_{j=1}^{s}\varepsilon_j\right)\\ &=\sum_{i=1}^{t}\sum_{j=1}^{s}\operatorname{Cov}(\varepsilon_i,\varepsilon_j)\\ &=\min(t,s)\sigma^2. \end{aligned} $$

In the double sum, every term with \(i\ne j\) is zero. A nonzero term remains only when the innovation appears in both sums; there are \(\min(t,s)\) shared innovations, each with variance \(\sigma^2\). For a fixed positive lag \(h\), take \(s=t-h\), where \(t\geq h\). Then:

$$ \operatorname{Cov}(X_t,X_{t-h})=(t-h)\sigma^2. $$

If \(\sigma^2>0\), this covariance changes as \(t\) changes even though \(h\) is held fixed. The process therefore violates the covariance restriction as well as, when \(\sigma^2>0\), the constant-variance requirement. Drift does not appear in this calculation: adding a deterministic drift changes the mean but not the covariance.

Worked Example: A Random Walk With Drift

Suppose a hypothetical random walk has \(X_0=2\), drift \(\delta=0.5\) units per period, and innovations with mean zero, variance \(\sigma^2=1.44\), and zero covariance across dates. Calculate its mean and variance at dates \(0\) through \(3\), then compare covariances at lag one.

The mean and variance are \(E[X_t]=2+0.5t\) and \(\operatorname{Var}(X_t)=1.44t\). The means at \(t=0,1,2,3\) are \(2,2.5,3,3.5\) units; the variances are \(0,1.44,2.88,4.32\) square units. Both the changing mean and changing variance violate weak stationarity.

At lag one, \(\operatorname{Cov}(X_2,X_1)=\min(2,1)(1.44)=1.44\) square units. At the next pair of dates, \(\operatorname{Cov}(X_3,X_2)=\min(3,2)(1.44)=2.88\) square units. The lag is the same, but the covariances differ because the later pair shares more accumulated innovations. Thus the covariance restriction also fails.

The drift contributes \(0.5\) units to the mean increase per period; it does not cause the variance or covariance changes. Those changes arise from the positive innovation variance and the accumulation of shocks.

The Zero-Variance Edge Case

The statement that a random walk’s covariance restriction fails needs the condition \(\sigma^2>0\). If \(\sigma^2=0\), each mean-zero innovation is zero almost surely: a random variable with zero variance equals its mean almost surely. In this case \(X_t=x_0+\delta t\) is deterministic, and all its covariances are zero. The covariance restriction is satisfied, although the mean restriction fails when \(\delta\ne 0\).

Worked Example: Nonzero Drift but Zero Innovation Variance

Take \(X_0=3\), drift \(\delta=2\) units per period, and innovation variance \(\sigma^2=0\). Find the process values and assess each weak-stationarity restriction.

Every innovation is zero almost surely, so \(X_t=3+2t\). The values at \(t=0,1,2\) are \(3,5,7\) units, and the mean \(E[X_t]=3+2t\) changes over time. Therefore the mean restriction fails.

Because each value is deterministic, \(\operatorname{Cov}(X_t,X_s)=0\) for all pairs of dates. The variance is also zero at every date. Both the variance requirement and the requirement that covariance depend only on lag are satisfied. The process is still not weakly stationary, because weak stationarity requires a constant mean as well as the covariance restriction.

Deterministic Trends With Stationary Deviations

A different construction adds a deterministic trend to a stationary process. Write \(X_t=a+bt+u_t\), where \(a\) is an intercept, \(b\) is a fixed slope, and \(u_t\) is weakly stationary with mean zero and autocovariance \(\gamma_u(h)\). The trend changes the mean, while adding deterministic terms does not change covariance:

$$ E[X_t]=a+bt,\qquad \operatorname{Cov}(X_t,X_{t-h})=\gamma_u(h). $$

When \(b\ne 0\), the mean restriction fails. The covariance restriction is nevertheless satisfied: at a given lag, the covariance is the same as that of \(u_t\). This process is not weakly stationary, but its deviations from the deterministic trend, \(X_t-(a+bt)=u_t\), are stationary. This is called a trend-stationary process. By contrast, a random walk accumulates stochastic shocks; its changing variance and date-dependent covariance are not removed merely by subtracting a linear trend from its mean.

Worked Example: A Linear Trend With White-Noise Deviations

Suppose a hypothetical series is \(X_t=5+0.2t+u_t\), where \(t\) is measured in periods and \(u_t\) is mean-zero white noise with variance \(9\) square units. White noise here means the deviations have zero covariance at distinct dates. Compare the means at \(t=0\) and \(t=10\), and evaluate the covariance pattern.

The mean is \(E[X_t]=5+0.2t\) units, so it equals \(5\) units at \(t=0\) and \(7\) units at \(t=10\). The mean restriction fails.

For any date \(t\), \(\operatorname{Var}(X_t)=\operatorname{Var}(u_t)=9\) square units. At lag zero, the covariance is \(9\); at every nonzero lag, it is \(0\). These values depend only on the lag, so the covariance restriction is satisfied. The full process is not weakly stationary because its mean changes, but subtracting \(5+0.2t\) leaves the stationary white-noise deviation \(u_t\).

Compare the Restrictions, Not Just the Direction of a Plot

The examples separate three different cases. A random walk with positive innovation variance fails the covariance restriction because past shocks are retained in later levels. A deterministic trend plus stationary deviations satisfies the covariance restriction but fails the mean restriction when its slope is nonzero. If the random walk has zero innovation variance, it has constant zero covariance, but nonzero drift still makes its mean nonconstant.

ProcessMean restrictionCovariance restrictionWeakly stationary?
Random walk without drift, \(\sigma^2>0\)SatisfiedFails: variance and fixed-lag covariance depend on dateNo
Random walk with drift, \(\sigma^2>0\)Fails: mean changes with dateFails: variance and fixed-lag covariance depend on dateNo
Random walk with drift, \(\sigma^2=0\), \(\delta\ne 0\)Fails: mean changes with dateSatisfied: every covariance is zeroNo
Deterministic linear trend plus stationary deviations, \(b\ne 0\)Fails: mean changes with dateSatisfied: covariance depends only on lagNo
Key takeaway: A changing mean and a changing covariance are distinct reasons for failing weak stationarity. For a random walk with \(\sigma^2>0\), accumulated shocks make both the variance and fixed-lag covariance date-dependent; a deterministic trend added to stationary deviations changes the mean but leaves the covariance restriction intact. When \(\sigma^2=0\), the random walk covariance restriction is satisfied, even if drift makes the mean nonconstant.

Common Mistakes

  • Checking only the mean. A driftless random walk has a constant mean when it starts at a fixed value, but its variance \(t\sigma^2\) changes with time if \(\sigma^2>0\). Constant mean is necessary, not sufficient.
  • Claiming drift changes the covariance. A deterministic drift changes the mean but cancels from covariance. For the random walk, covariance depends on the accumulated innovations.
  • Calling every trend process covariance-nonstationary. A deterministic trend plus stationary deviations has covariance that depends only on lag. It fails weak stationarity because of its changing mean.
  • Ignoring the zero-variance case. The random-walk covariance restriction fails only when \(\sigma^2>0\). At \(\sigma^2=0\), all covariances are zero; assess the mean restriction separately.

Check Your Understanding

For each question, identify the relevant mean or covariance restriction and justify your conclusion.

  1. A random walk starts at \(X_0=4\), has no drift, and has innovation variance \(2\). What are its mean and variance at date \(t\), and which weak-stationarity restriction fails?
  2. For a random walk with innovation variance \(\sigma^2\), derive \(\operatorname{Cov}(X_t,X_{t-h})\) for \(t\ge h\). What happens at fixed lag when \(\sigma^2=0\)?
  3. A process is \(X_t=1-0.3t+u_t\), where \(u_t\) is weakly stationary with mean zero. Which restriction fails, and does the covariance restriction hold?
  4. Why does a nonzero drift not affect the covariance formula for a random walk?
  5. A random walk has nonzero drift and zero innovation variance. Explain why it is not weakly stationary even though its covariance restriction is satisfied.
Clinical Biostats