Application of statistical mechanics