Large deviation principle:
general formulation for continuous random variables; exponential decay
and rate function (section 3,1, 3,2)
Examples of direct computation of rate functions: random bits (example 2.1)
Reference review: "The large deviation approach to statistical
mechanics" by H. Touchette (Phys. Rep. 2009)