Here the exponential distribution has
For , maximize . Its derivative is and its second derivative is negative, so the maximizing parameter is . Therefore the rate function of an exponential sample mean is
For , letting in the same supremum gives , including the logarithmic divergence when . The moment-generating function is finite near zero, so Cramér's theorem supplies the full large deviation principle.
The rate function is nonnegative, with its unique minimum at ; . It tends to infinity both as and as . Its finite sublevel sets are closed bounded intervals contained in , hence compact. Thus it is a good rate function.