# The average recurrence time

As seen on wikipedia, given a measure space $(X,\Sigma,\mu)$ with $\mu(X) < \infty$ and a measure preserving transformation $T: X \mapsto X$. Let $A \subset X$ be a set of positive measure. Define $k_i$ as the power of $T$ such that $T^{k_i}x \in A$ for the $i$th time: that is to say $k_i$ is the "$i$'th return time to $A$". The difference between recurrence times is $R_i = k_i - k_{i-1}$ (assume for simplicity that $k_0 = 0$, that is $x \in A$)

I would like know how to prove the following:

$$\lim\limits_{n\mapsto\infty} \frac{R_1 + \cdots + R_n}{n} = \frac{\mu(X)}{\mu(A)}$$

The wikipedia article indicates that this is a consequence of the ergodic theorem.

Note that my definition of the $k_i$ above differs slightly from that of wikipedia, in as much as I have omitted to say that the $k_i$s are sorted in increasing order.

As you might guess from the reference to the ergodic theorem, you do need to assume that $T$ is ergodic. For a counterexample where $T$ is not ergodic, consider the identity map and suppose $\mu(A) < \mu(X)$.
Note that $R_1 + \ldots + R_n = k_n$. Let $I_A$ be the indicator function of $A$, which of course is in $L^1(\mu)$.
The Birkhoff ergodic theorem says if $T$ is ergodic, $\lim_{k \to \infty} \frac{1}{k} \sum_{j=1}^k I_A(T^i x) = \frac{1}{\mu(X)} \int I_A d\mu$ almost everywhere, i.e. $S_k(x)/k \to \mu(A)/\mu(X)$ where $S_k(x)$ is the number of $i \in \{1,2,\ldots, k\}$ such that $T^i(x) \in A$. Since $\mu(A) > 0$, we also have $k/S_k(x) \to \mu(X)/\mu(A)$ almost everywhere. But if $k = k_n(x)$, $S_k = n$.