The Use of Stochastic Methods to Explore the Thermal Equilibrium Distribution and Define Entropy Production out of Equilibrium