I must be missing something. I could not find an answer in similar posts.

Suppose I have an energy $E(x)$ and have sampled many points, $\{x_1, x_2, ..., x_N\}$ through a Metropolis Monte Carlo simulation. If the space is high enough dimension such that numerically integrating over the space is impossible, what are my options for estimating the partition function (or free energy)?

P.S. I don't really care about the accuracy of the estimate. This question is more for didactic reasons than for practical ones.

  • $\begingroup$ Sampled according to which distribution? -- Note that from a normalized sample of the Gibbs distribution, you cannot reconstruct the normalization (unless you use the sample to estimate the entropy and compute the free energy). $\endgroup$ Jul 8, 2021 at 9:40
  • $\begingroup$ What is each individual point $x_i$? $\endgroup$ Jul 8, 2021 at 9:55
  • $\begingroup$ Correct, I was assuming the canonical ensemble. And $x \in \mathbb{R}^N$ where $N$ is the dimension of the space. $x_i$ is a single point in $\mathbb{R}^N$ and is the $i$th point in the sample. $\endgroup$
    – edissnoon
    Jul 9, 2021 at 10:19

1 Answer 1


Metropolis Monte Carlo is a method for calculating averages, like $$ \langle f(x)\rangle = \frac{\int f(x)p(x)dx}{\int p(x)dx}. $$ One cannot however calculate the normalization constant, $Z=\int p(x)dx$. In physics this is usually not a problem, since the partition function is not a measurable quantity - it is a convenient tool for deriving equations analytically, but it is not really a goal in itself, and not needed when performing numerical calculations.

If one indeed needs a normalization constant, one needs to resort to other methods, like Population Monte Carlo or annealed importance sampling - these usually include Metropolis MC as a basic element. I suggest looking in Cross Validated for more information, since this goes beyond physics.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.