  Boltzmann-Sanov and Cramer-Chernoff's theorems provide large deviation
probabilities, entropy, and rate functions for the spatial distribution of
systems and the total internal energy of an ensemble respectively. By the
method of Lagrange's undetermined multipliers, the results of both theorems,
the differentials of entropies or rate functions with respect to numbers of
systems, establish the statistical equilibrium condition. We connect the large
deviation statistics to the reversible and irreversible processes of the
spatial arrangements of the systems and the energy exchange of the ensemble
with the heat reservoir. We obtain the equalities between the differentials of
entropies and other thermodynamic variables in the reversible processes and
suggest inequalities of entropy productions for the irreversible processes.
