Historically, this occurred because the original idea was to use Metropolis–Hastings algorithm to compute averages on a system in contact with a heat bath where the weight is given by the Boltzmann factor, P ( x ) ∝ ∝ exp ⁡ ⁡ ( − − β β E ( r ) ) .