In this blogpost: The Ergodic Theorem, the author goes through von Neumann's and Birkhoff's ergodicity theorems. In the case of von Neumann's theorem, the proof that if $(X, \mu, T)$ is an ergodic measure preserving system and $f\in L^2(X)$, then $\lim_{n\to\infty}\frac{1}{n}\sum_{j=1}^{n}(f\circ T^n)(x) = \int_Xf\mu$ is given in terms of linear operators. Consider the remarks made after Lemma 3.
Question: I am interested in knowing why the orthogonal projection $P$ is the integral operator, i.e. $Pf = \int_X fd\mu$.
If it helps answering the question, I have also other material related to von Neumann's Ergodic Theorem, where another author angle to proving the theorem is rephrasing it in terms of conditional expectation and Radon-Nikodym theorem. Unfortunately this author's proof of the equality $\lim_{n\to\infty}\frac{1}{n}\sum_{j=1}^{n}(f\circ T^n)(x) = \int_Xf\mu$ is essentially just that that if $S = \{A \in F\mid T^{-1}(A) = A \text{ almost everywhere}\}$ and $T$ is ergodic, then $S$ consists only of sets of measure $0$ or $1$ and therefore $E(f\mid S) = \int fd\mu$. As you can see, this argument doesn't really explain the why the used orthogonal projection is the integral/conditional expectation.
$\lim_{n\to\infty}\frac{1}{n}\sum_{j=1}^{n}(f\circ T^n)(x) =E(f|S)$. This is easily verified using the definition of conditional expectation: The limit on the left is an invariant function which makes it measurable w.r.t. $S$; If $A \in S$ the the integral of the left side over $A$ equals $\int _A f$ by simple calculation. [It is the limit of a constant sequence!).