Consider a discrete time Markov chain $(X\_t)$ on a finite state space $\mathcal{S}$, with transition matrix $P$. Assume that the chain admits a stationary distribution $\pi$, which I will identify with its probability mass function $(\pi(i))\_{i\in \mathcal{S}}$. In this case I know that, given any function $f:\mathcal{S}\to\mathbb{R}$, the following ergodic theorem holds
$$\mathbb{P}\left(\lim\_{n\to\infty}\frac{1}{n}\sum\_{t=0}^n f(X\_t)=\sum\_{i\in\mathcal{S}}f(i)\pi(i)\right)=1$$
I would be interested to know whether, and under which hypotheses, the result generalize to the case when:


* $\mathcal{S}$ is a compact metric space (in particular $\mathcal{S}=[0,1]$). Of course, here the chain is described by a transition kernel $P:\mathcal{S}\to\Delta(\mathcal{S})$ (with the notation $\Delta(\mathcal{S})$ I mean the space of probability distributions on $\mathcal{S}$) and its stationary distribution, if it exists, is $\pi\in\Delta(\mathcal{S})$ such that $\pi=\int\_{\mathcal{S}}P(s)d\pi(s)$
* Instead of considering the time average of a function $f:\mathcal{S}\to\mathbb{R}$, we consider the time average of the (independent) realizations of a family of random variables whose law depends on the state of the chain, namely a Markov kernel $\Phi:\mathcal{S}\to\Delta(\mathbb{R})$.


It makes sense to ask that, for all $s\in\mathcal{S}$ it holds $\int\_{\mathbb{R}}xd\Phi(s)(x)<\infty$, so that each variable in the family has finite expectation. Denote by $\phi(s)$ a realization of $\Phi(s)$.


My **question** is: (under what hypotheses) does it still hold that


$$\mathbb{P}\left(\lim\_{n\to\infty}\frac{1}{n}\sum\_{t=0}^n \phi(X\_t)=\int\_\mathcal{S}\left(\int\_{\mathbb{R}}xd\Phi(s)(x)\right)d\pi(s)\right)=1$$


**Observation**: what I am able to observe if a version of the ergodic theorem holds for continuous state spaces, then, trivially, defining $F:\mathcal{S}\to\mathbb{R}$ such that $F(s)=\int\_{\mathbb{R}}xd\Phi(s)(x)$, my statement of interest is true if
$$\lim\_{n\to\infty}\frac{1}{n}\sum\_{t=0}^n \phi(X\_t)=\lim\_{n\to\infty}\frac{1}{n}\sum\_{t=0}^n F(X\_t)$$
This seems to point to a relation between the kernels $P$ and $\Phi$. But I don't really know which.


Any help or reference would be greatly appreciated. I beg your pardon in advance in case my notation is not precise, and I am willing to clarify it.



"Ergodic theorem" for Markov kernels
I understand your setup in the following way (I will somewhat modify your notation). One is given a
measurable state space $S$ and two "kernels" $\{\pi\_s\}, \{\varphi\_s\}$ (i.e., families of probability measures indexed by $S$ and subject to the usual measurability conditions). The measures $\pi\_s$ are on $S$, and the measures $\{\varphi\_s\}$ are on $\mathbb R$. One runs the Markov chain $(S\_t)$ with the transition probabilities $\{\pi\_s\}$ and at each moment $t$ independently samples a random variable $X\_t$ from the distribution $\varphi\_{S\_t}$. The question is about the ergodic averages of the sequence $(X\_t)$ under the assumption that the chain $(S\_t)$ has a stationary probability measure $\pi$.


First of all, since you are asking about convergence of ergodic time averages to the spatial average, one has to assume that the measure $\pi$ is ergodic (otherwise one has to pass to its ergodic decomposition). [Of course, this assumption has to be imposed in the case of a finite state space as well.]


An answer to your question follows from the observation that the sequence $(S\_t,X\_t)$ is also Markov with the transition probabilities
$$
\widetilde \pi\_{s,x} = \int \delta\_\sigma\otimes\varphi\_\sigma\,d\pi\_s(\sigma) \;.
$$
It has a stationary measure $\widetilde\pi$ obtained by the same lifting from the stationary measure $\pi$
$$
\widetilde\pi = \int \delta\_{\sigma}\otimes\varphi\_\sigma\,d\pi(\sigma) \;.
$$
The key point is that ergodicity of $\pi$ implies that of $\widetilde\pi$ (it follows, for instance,
from the characterization of ergodicity in terms of absence of non-constant bounded harmonic functions in combination with the that the harmonic functions of the lifted chain depend on the first coordinate only, and therefore are just the lifts of the harmonic functions of the original chain). Thus, one just has to apply the usual ergodic theorem for the time shift on the path space of the lifted chain to the function $F(s,x)=x$ of the time 0 state.


The final comment is that this question is purely measure theoretical and does not require any continuity or compactness assumptions.


