The application of statistical mechanics to systems with stochastic or random behavior, such as diffusion.