# What is the difference between ergodicity and the law of large numbers?

I want to begin by saying that I know absolutely no measure theory.

To my knowledge, roughly speaking a stochastic process is ergodic if its time average converges to the expectation (space average) over a long period of time.

For an iid sequence $$X_{1} \ldots X_{n}$$ with finite mean, I noticed that if consider the index as time then the average of this sequence $$\frac{1}{n} \sum_{i=1}^{n} X_{i}$$ is the very definition of time average. The law of large numbers states this will converge to $$E[X_{i}]$$ as $$n \rightarrow \infty$$.

So, I am not sure how the law of large numbers is different from ergodicity? Looks to me they are saying the same thing. Can a stochastic process be ergodic if it isn't iid?

I am also not sure how the definition of ergodicity coincides with the definition given in the context of markov chains, where the chain is ergodic if it is aperiodic, irreducible, and finite mean recurrence time.

• Definitions vary. I would say a discrete time Markov chain $Z(t)$ is ergodic if it is irreducible and aperiodic, in which case we are sure that for each state $i$ we have $$\lim_{t\rightarrow\infty} P[Z(t)=i|Z(0)=z_0] = \lim_{t\rightarrow\infty} \frac{1}{t}\sum_{\tau=0}^{t-1} 1_{\{Z(\tau)=i\}} \quad (wp1)$$ even if there is no stationary distribution (in that case both sides are 0) and regardless of the intial state $z_0$. – Michael Dec 5 '18 at 8:07
• Also, defining $\{Y_i\}$ iid uniform over $[0,1]$ and $\{X_i\} = \{Y_1, Y_1, Y_2, Y_2, Y_3, Y_3, ...\}$ (so that we repeat pairs) means $\{X_i\}$ is not iid but $E[X_i]=1/2$ is the same for all $i$ and certainly the time average $\frac{1}{n}\sum_{i=1}^n X_i$ converges to $1/2$ with prob 1. – Michael Dec 5 '18 at 8:14
• Q.: "What is the difference between ergodicity and the law of large numbers?" A.: The LLN for i.i.d. processes is (that is, may be seen as) a special case of the ergodic theorem. IOW, the class of ergodic processes is vastly larger than the class of i.i.d. processes. – Did Dec 5 '18 at 8:58
• @Did, if possible could you explain what sort of other processes besides iid fall into the class of ergodic processes? Or perhaps point me to a reference text? – Ollie Dec 6 '18 at 4:41
• Say, the simple random walk on a discrete circle. – Did Dec 6 '18 at 11:24