[Math] Average over angles

averagegeometry

I feel quite dumb for asking this, but it's getting a bit frustrating.

I have a function which depends on $\theta$ and $\phi$ in spherical coordinates:

$$ f(\theta, \phi) = \sin^2 \theta \mathcal{L} + \left( \cos^2\theta +\sin^2\phi \sin^2\theta \right) \mathcal{M} $$

where $ \mathcal{L}$ and $ \mathcal{M}$ are positive constants.

I want to average this quantity over uniformly random distributed directions. To do this I think of $\theta$ and $\phi$ as two uniform distributed random variables and evaluate

$$f^\text{rand} = \int _{-\infty}^{\infty} \, d\phi \int _{-\infty}^{\infty} d \theta\, U(\phi) U(\theta) f(\theta,\phi) = \int _{0}^{2\pi} \, \frac{1}{2\pi} d\phi \,\int _{0} ^{\pi} \frac{1}{\pi} d \theta \, f(\theta,\phi) $$

Is this correct? If not, what am I missing?

Best Answer

It is tempting to generate points (or equivalently, directions) uniformly distributed on the sphere in this way. Unfortunately it is not correct. For a short discussion of the issue, you may want to look at the following.

Geometric probability has many examples of this type, where different methods of picking a direction, or a point, "at random" yield quite different answers. And you should not "feel dumb." There is a fair history of different answers being obtained by using different, but not obviously different, notions of randomly chosen points.

The issue in this case is that we get a heavy biasing towards the two poles. A strip around the equator, of large area, has a much smaller probability of being selected than a region of similar area near the poles. This can be seen, among other ways, by looking at the Jacobian. But at the informal level, it can also be seen by examining the piece from $\phi=0$ to $\phi=0.1$, and then the piece from $\phi=\pi/2 -0.1$ to $\phi=\pi/2$. The disparity of areas is clear. Thus your integral does not give uniform weight to all directions, and therefore does not "average" $f$ in the intended way.

Related Question