Large deviation theory; examples of direct computation of rate functions: Gaussian sample mean and the law of large numbers (example 2.2), symbol frequence and Kullback-Leibler divergence (example 2.4)

Reference review: "The large deviation approach to statistical mechanics" by H. Touchette (Phys. Rep. 2009)