The mean ergodic theorem is equivalent to the assertion that for every
function K and every epsilon, there is an n with the property that the ergodic
averages A_m f are stable to within epsilon on the interval [n,K(n)]. We show
that even though it is not generally possible to compute a bound on the rate of
convergence of a sequence of ergodic averages, one can give explicit bounds on
n in terms of K and || f || / epsilon. This tells us how far one has to search
to find an n so that the ergodic averages are "locally stable" on a large
interval. We use these bounds to obtain a similarly explicit version of the
pointwise ergodic theorem, and show that our bounds are qualitatively different
from ones that can be obtained using upcrossing inequalities due to Bishop and
Ivanov. Finally, we explain how our positive results can be viewed as an
application of a body of general proof-theoretic methods falling under the
heading of "proof mining."Comment: Minor errors corrected. To appear in Transactions of the AM