This work shows how exponential concentration inequalities for time averages
of stochastic processes over a finite time interval can be obtained from a
martingale representation formula. The approach relies on mixing properties of
the underlying process, applies to a wide range of initial conditions and makes
no assumptions on stationarity or time-homogeneity. A direct method is
presented for diffusion processes and discrete-time Markov processes. For
general square-integrable processes the constants in the concentration
inequalities can be expressed in terms of the quadratic variation of a family
of auxiliary martingale. For continuous-time Markov processes they admit a
natural expression in terms of the squared field operator applied to the
semigroup. The paper concludes with two examples: the squared
Ornstein-Uhlenbeck process and the $M/M/\infty$ queue.