# What is the average of a random hemispherical distribution

by Centrefuge
Tags: average, distribution, hemispherical, random
 P: 327 It's tricky to generate a point uniformly distributed on the surface of a sphere. In particular, generating the latitude and longitude uniformly will not work. You can find a discussion here: http://mathworld.wolfram.com/SpherePointPicking.html The definition of "uniformly distributed" is that at point's probability of landing in a region is proportional to the area of the region. You are correct that 1/2 of the points should be within 60 degrees of the poles, because the two "spherical caps" (the regions within 60 degrees of a pole) each have area $\pi r^2$, so the total area within 60 degrees of the poles is $2 \pi r^2$. Since the area of a sphere is $4 \pi r^2$, the probability of a point's landing within the spherical caps is $\frac{2 \pi r^2}{4 \pi r^2} = \frac{1}{2}$.  On re-reading your post, though, I see you are averaging the angles. That's not the same as counting the points that lie in a specified region. So no, I don't think the average angle should be 60 degrees. I'll look into this more later, but I don't have time to right now.[/edit]
 P: 327 What is the average of a random hemispherical distribution OK, as I wrote earlier, the most direct way to check that you are generating uniformly distributed points is to check that the number of points in a region on the surface of the sphere is proportional to the area of the region; that's the definition of "uniformly distributed". But since you're looking at the average angle, let's see if we can figure out what that should be. I'm assuming that $\phi$ is zero at the "north pole" and you are generating points uniformly distributed on the hemisphere where $0 \leq \phi \leq \pi/2$. If so, then the joint pdf of $(\theta, \phi)$ is $$f(\theta, \phi) = \frac{1}{2 \pi} \sin \phi$$ for $0 \leq \theta \leq 2 \pi$ and $0 \leq \phi \leq \pi / 2$, so the expected value of $\phi$ is $$\int_0^{2 \pi} \int_0^{\pi /2} \phi \; \sin \phi \; d\phi \; d\theta = 1 \text{ radian} = 57.3 \text{ degrees}$$ (calculus left as an exercise for the reader). So it appears from this result that you are correctly generating the uniformly distributed points.