# Ergodic process

In econometrics and signal processing, a stochastic process is said to be ergodic if its statistical properties (such as its mean and variance) can be deduced from a single, sufficiently long sample (realization) of the process. The reasoning behind this is that any sample from the process must represent the average statistical properties of the entire process, so that regardless what sample you choose, it represents the whole process, and not just that section of the process. A process that changes erratically at an inconsistent rate is not said to be ergodic.[1]

## Specific definitions

One can discuss the ergodicity of various statistics of a stochastic process. For example, a wide-sense stationary process $X(t)$ has constant mean

$\mu_X= E[X(t)]$,
$r_X(\tau) = E[(X(t)-\mu_X) (X(t+\tau)-\mu_X)]$,

that depends only on the lag $\tau$ and not on time $t$. The properties $\mu_X$ and $r_X(\tau)$ are ensemble averages not time averages.

The process $X(t)$ is said to be mean-ergodic[2] or mean-square ergodic in the first moment[3] if the time average estimate

$\hat{\mu}_X = \frac{1}{T} \int_{0}^{T} X(t) \, dt$

converges in squared mean to the ensemble average $\mu_X$ as $T \rightarrow \infty$.

Likewise, the process is said to be autocovariance-ergodic or mean-square ergodic in the second moment[3] if the time average estimate

$\hat{r}_X(\tau) = \frac{1}{T} \int_{0}^{T} [X(t+\tau)-\mu_X] [X(t)-\mu_x] \, dt$

converges in squared mean to the ensemble average $r_X(\tau)$, as $T \rightarrow \infty$. A process which is ergodic in the mean and autocovariance is sometimes called ergodic in the wide sense.[3]

An important example of an ergodic processes is the stationary Gaussian process with continuous spectrum.

## Discrete-time random processes

The notion of ergodicity also applies to discrete-time random processes $X[n]$ for integer $n$.

A discrete-time random process $X[n]$ is erdogic in mean if

$\hat{\mu}_X = \frac{1}{N} \sum_{n=1}^{N} X[n]$

converges in squared mean to the ensemble average $E[X]$, as $N \rightarrow \infty$.

## Example of non-ergodic random process

Suppose you have two coins, one of which is fair, and the other of which has two heads. You choose (at random) one of the coins and then perform a sequence of independent tosses of that selected coin, and let $X[n]$ be 1 for heads and 0 for tails for the $n$th toss. The ensemble average is 1/2 1/2 + 1/2 1 = 3/4, whereas the long-term average is 1/2 for the fair coin and 1 for the two-headed coin. So this random process is not ergodic in mean.