# Can any probability distribution be written as a Boltzmann distribution?

By redefining the energy function, $E(x)$, can any $p(x)$, be written as a boltzmann distribution, ie. $p(x) = \frac{e^{-E(x)}}{Z}$, where Z is the partition function?

I've thought more about this since, and of course the infinite problem is an issue. Also, what energy function would give the delta? Certainly not a nice one. So it's not yet clear to me that this can always be done.

However, it is promising to note that any discrete distribution can be represented by an appropriate Energy function, unique up to an additive constant.

Also, note, that if one considers the functional form $S = \ln \sum_i e^{E(x_i)}$ (i.e. logarithm of partition function), the gradient (with respect to the $\{x_i\}$ is a probability distribution, and the Jacobian is the covariance matrix.

Yes. Just define E(x) so the relative probabilities for x1 and x2 match the target distribution. You could start with the origin and define all relative probabilities with respect to that (or any other point).

Note that the energy function won't be unique (you can always add a constant to it).

• In mathematical notation you are saying this: Given $p$, pick any $Z\gt 0$ you wish to define $E(x)=-\log(Z p(x)) = -\log(p(x)) - \log(Z)$. That often works, but what do you do for points $x$ where $p(x)=0$?
– whuber
Apr 16 '13 at 3:13
• That's a good point. It's commonplace to assign values of infinity to regions of the energy functions - e.g. hard sphere potentials, square-well approximations to LJ potentials, self-avoiding walk models of polymers, lattice models of proteins etc. In practical implementations of simulations or samplers, it could be implemented as either a "large-enough" number or as a special case. Apr 16 '13 at 12:59
• That may work for the physicists, but is sufficiently sketchy that it should raise doubts even in practical applications. Even if you use a really, really "large-enough" number, the resulting "probability" will still not have a finite integral! Either a principled introduction of a true "infinity" is needed or a more rigorous construction of $E$ is required.
– whuber
Apr 16 '13 at 14:26
• I don't understand the criticism regarding the integral not being finite - the partition function is defined such that the resulting probability integrates to 1. E(x)=infinity regions of the space simply wouldn't contribute to the probability integral. Apr 16 '13 at 14:46
• A bit late, but anyway... whuber is right. The answer is yes for all positive pdfs, i.e. $p(x) > 0$. In physics this is ensured through the ergodic hypothesis, mathpages.com/home/kmath606/kmath606.htm Aug 28 '13 at 14:25