probability density function of randomly picking a point on a sphere

shuipi

Newcomer
What is the PDF of radomly pick a point on the surface of a sphere with radius r? Note the sphere is a continuous geometry, not a spherical could of descret points. I know it should be a straigh line parralell to the x axis, since no matter which point you pick the probability is the same. But what's this line's height? Some say it's 1 / 4 * pi * r * r, which is 1 over the surface area of the sphere, but what if r is so small that its surface area is smaller than 1? Then the probability would be greater than 1? There must something fundamentally wrong in my understanding to this subject.
 
The projected density in any of the three axes is constant.. rather surprising at first! Basically at a distance x, the radius of the shell is sqrt(1-x*x) but the shell is tilted by the inverse of that so it ends up being constant.

This leads to a way to pick a sample on the surface of the sphere:

pick x= -R to R with constant density. (the surprising but correct step)
pick y and z by chosing a random angle from 0 to 2Pi with scaled radius based on x.

something like:

x= rand(-R, R);
r= sqrt(R*R-x*x);
theta= rand(0, 2*Pi);
y= r*sin(theta);
z= r*cos(theta);

output is x, y, z, on the surface of the sphere of radius R with uniform sampling density.
 
What is the PDF of radomly pick a point on the surface of a sphere with radius r? Note the sphere is a continuous geometry, not a spherical could of descret points. I know it should be a straigh line parralell to the x axis, since no matter which point you pick the probability is the same. But what's this line's height? Some say it's 1 / 4 * pi * r * r, which is 1 over the surface area of the sphere, but what if r is so small that its surface area is smaller than 1? Then the probability would be greater than 1? There must something fundamentally wrong in my understanding to this subject.
Since the sphere has an infinite number of points, the probability of picking any single point is 0. That's not how you want to approach this problem.

Think about a simple example: The interval [0,1]. With a uniform distribution, the probably of picking any single point is 0. But, what you can do is find the probability of the point being in some subinterval. For example, what is the probability that x > 0.5? Well the answer would be 0.5.

With your sphere example, what you want is the probability that the point is in some region, R. Then the solution is P(x in R) = (area of R) / (surface area of sphere).
 
Thanks for the explanation. Now I know where I misunderstood it. I got probability density function and probability confused. the value of a pdf is not the probability of x, but rather its probability density, which can be greater than 1. only when you do an integral for a set of x do you get the probability.
 
Thanks for the explanation. Now I know where I misunderstood it. I got probability density function and probability confused. the value of a pdf is not the probability of x, but rather its probability density, which can be greater than 1. only when you do an integral for a set of x do you get the probability.
Exactly right. I'm glad I explained it well enough as I was sick with the flu when I made my post! :D
 
Back
Top