## A Simple Problem in Statistical Physics

In physics we often have to resort to computer simulations in which continuously varying quantities are modelled on a discrete lattice. We also have recourse from time to time to model physical properties of a system as random quantities with some associated probability distribution. The following problem came up in a conversation recently, and I think it’s rather cute so thought I’d post it here.

Consider a regular three-dimensional Cartesian grid, at each vertex of which is defined a continuous variable $x$ which varies from site to site with the same probability distribution function $F(x)$ at each location. The value of $x$ at any vertex can be assumed to be statistically independent of the others.

Now define a local maximum of the fluctuating field defined on the lattice to be a point at which the value of $x$ is higher than the value at all surrounding points, defined so that in $D$ dimensions there are $3^{D}-1$ neighbours.

What is the probability that an arbitrarily-chosen point is a local maximum?

### Solution

Well, the most popular answer is in fact the correct one but I’m quite surprised that a majority got it wrong! Like many probability-based questions there are quick ways of solving this, but I’m going to give the laborious way because I think it’s quite instructive (and because I’m a bit slow).

Pick a point arbitrarily. The probability that the associated value lies between $x$ and $x+dx$ is $f(x)dx$, where $f(x)=dF(x)/dx$ is the probability density function. According to the question there are $3^3-1=26$ neighbours of this point. The probability that all of these are less than $x$ is$F(x)\times F(x)\times \ldots F(x)$ 26 times, i.e. $[F(x)]^{26}$  becauses they are independent. Note that this is a continuous variable so the probability of any two values being equal is zero. The probability of the chosen point being a local maximum with a given value of $x$ is therefore $f(x)dx\times [F(x)]^{26}$. The probability of it being a local maximum with any value of $x$ is obtained by integrating this expression over all allowed values of $x$, i.e. $\int f(x) dx [F(x)]^{26}$. But the integrand can be re-written

$\int f(x) dx [F(x)]^{26} = \int dF \times F^{26} = \frac{1}{27} \int d\left(F^{27}\right) = \frac{1}{27},$

because  $F=1$ at the upper limit of integration and $F=0$  at the bottom.

So you don’t need to know the form of $F(x)$ – but the calculation does rely on it being a continuous distribution.

This long-winded method demonstrates the applicability of the product rule and the process of marginalising over variables, but the answer should tell you a much quicker way of getting there.  The central point and the 26 neighbours constitute a set of 27 points. The probability that any particular one is the largest of the set is just 1/27, as each is equally likely to be the largest. This goes for the central value too, hence the answer.

### 10 Responses to “A Simple Problem in Statistical Physics”

1. I’m only commenting so that I can get this to give me updates on future posts…

• Use the RSS feeds for posts and comments (two separate feeds).

2. The probability is $3^{-D}$.

3. It’s much simpler than that. You have a set of 3^D independent random values (the center value and its 3^D-1 neighbors.) What is the probability that the center value is the largest one? Obviously, 1/3^D.

• telescoper Says:

Yes, I said there were quicker ways. I went through this to show how you could relate it to the product rule for probabilities and marginalisation.

The long-winded approach is also the only way to deal with the general case in which the lattice values are correlated. There you have to use conditional probabilities for the neighbours, but the logic remains the same.

4. “The probability that any particular one is the largest of the set is just 1/27”

But it needs to be the largest of the set of which it is the central member.

I was going to say (1/2)^26, as the probability that a randomly chosen member is greater than another randomly chosen member is 1/2.

Anthony

• Okay, I’ve seen why I’m wrong: it’s not 1/2 x 1/2 x 1/2 x 1/2, but 1/2 x 2/3 x 3/4 x 4/5 x … x 26/27 = 1/27.

5. There are regularity conditions that F(x) need to satisfy before you can go from [integral sign] f(x) F(x)^26 dx to [integral sign] f(x) dx F(x)^26.

• Anton Garrett Says:

Peter did say that his analysis assumed a reasonably continuous form for F. But his symmetry argument which also led to the answer shows that it makes no difference, ie there is no discontinuous F(x) for which the answer is not 1/27.

• telescoper Says:

If it’s a discrete variable then the probability of two neighbouring sites being equal is not zero, so then the answer may be different.