Uniform Distribution on a Sphere: Part 4 (The Easy Way)

(This post continues where we left off in Parts 3a and 3b and provides an alternative solution to the problem that is more useful in practice.)

We saw that using spherical coordinates to generate random points on the surface of a sphere required us to transform one of our angles to obtain a uniform distribution. In Part 3a we performed this transformation with the help of map projections, and in Part 3b we found it directly by using calculus. What would happen if we wanted to generalize this procedure to higher dimensions?

Continue reading

Uniform Distribution on a Sphere: Part 3b (The Solution by Calculus)

(This post continues where we left off in Part 2 and gives a more direct solution than Part 3a. However this post uses multivariable/vector calculus, and I do not provide many explanations for readers unfamiliar with that material.)

As we saw in Part 2, the problem with picking our spherical angles \theta and \phi uniformly was that the area on our two-dimensional grid changed when we transformed that surface into the sphere in three dimensions. In particular if we wanted to calculate the probability mass in a region R of our spherical angles, we have the formula from Part 0:


where f_{\theta,\phi} is our probability density function. However when we move to the sphere our area elements are no longer little rectangles with area \mathrm{d}\theta\cdot\mathrm{d}\phi; they are little patches on the surface of a sphere. What area do these corresponding patches have?

Continue reading

Uniform Distribution on a Sphere: Part 0 (Preliminaries)

(Note that this topic has been covered in detail by several well-known websites. While their material is sound, I feel that some of the interesting details in this problem are obscured by  multivariate calculus. In this series of posts, I will attempt to explain this problem assuming limited prior mathematical knowledge. Readers with a good grasp of probability will want to skip past the preliminaries.)

In this series of posts we will answer the question: how do we choose a point uniformly at random on the surface of a sphere? (Think: how do we pick a random place on a globe without bias to any particular location(s)?)

Before we get to the solution, we need to address a few basics. First consider the phrase “uniformly at random.” What does this mean?

Continue reading