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:

\int_R\!f_{\theta,\phi}(\theta,\phi)\,\mathrm{d}\theta\,\mathrm{d}\phi

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 3a (The Solution by Mapping)

(This post continues where we left off in Part 2.)

I have split the solution into two posts. First I show how we could use results from cartography to solve our problem. Then I show how to derive those same results directly using some calculus. While I try to explain the calculus, I realize that I may not be able to reach everyone who is unfamiliar with the concepts. I hope that the first part at least can give all readers a sense of the solution in what I think is a more relatable way than the standard treatment.

Continue reading

Uniform Distribution on a Sphere: Part 2 (The Problem)

(This post continues where we left off in Part 1.)

In Part 1 we devised a method for choosing a point uniformly at random on a circle. When we tried to extend this to a sphere we saw that the chosen points were clumped together instead of spread out evenly upon the surface (see Figure 1).

Continue reading

Uniform Distribution on a Sphere: Part 1 (First Attempt)

(Despite the title, this is the second post in the series. Part 0 covered the definition of uniform distributions in discrete and continuous space. If this last sentence makes no sense, go back and read Part 0.)

Instead of tackling the problem of picking a point on a sphere right away, let’s consider the easier problem of picking a point on a circle. We will then extend this method to the harder problem. (Mathematicians like to do this.)

Continue reading