What is the average of a random hemispherical distribution

In summary, the conversation discusses the challenges of generating points uniformly distributed on a sphere, with a focus on the average angle of the points. It is noted that the definition of "uniformly distributed" means that the probability of a point landing in a region is proportional to the area of the region. The conversation also mentions different methods for generating points on a sphere and the importance of considering finite precision in computational systems. Finally, it is pointed out that the median angle and average angle are not always the same, and it is suggested to check the number of angles above and below 60 degrees to confirm the uniform distribution.
  • #1
Centrefuge
2
0
Hello,
I'm trying to write a monte carlo simulation for an optical analysis.

Half the area of a sphere is within 60 degrees of the poles. Hence, I'm assuming half of randomly directed radiation should fall within 60 degrees of the poles, when radiation is generated at the center of the sphere.

I have tried 3 algorithms so far for generating a random angle, and I test each one by averaging all of the angles. It seems to me that the average angle of a truly random distribution should be 60 degrees because half the angles will fall below 60 degrees and half above 60 degrees in a uniform distribution. So far all 3 algorithms give me the same value ~57.3 when averaged over hundreds of millions of runs.

So I'm thinking, either the pseudo-random number generator on python is making the same mistake in each algorithm, or I'm not correct that the average will be 60 degrees. Could someone please confirm that the average of a hemispherical distribution of angles would be 60? THANKS!
 
Mathematics news on Phys.org
  • #2
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 [itex]\pi r^2[/itex], so the total area within 60 degrees of the poles is [itex]2 \pi r^2[/itex]. Since the area of a sphere is [itex]4 \pi r^2[/itex], the probability of a point's landing within the spherical caps is [itex]\frac{2 \pi r^2}{4 \pi r^2} = \frac{1}{2}[/itex].

[Edit] 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]
 
Last edited:
  • #3
As awkward states, the distribution of points on a sphere does not uniform have a uniform distribution in polar angle theta. What's more, the "average angle" of points uniformly distributed on a sphere does not have a 2D answer since a spherical surface has no center. (In 3D, of course, the average is the origin at the center of the sphere.)

There are many ways to compute samples on a sphere--there's even a method based on Archimedes' observation in 200 BC that the area of cylinder (neglecting endcaps) is the same as that of an inscribed sphere. In practice, some work better than others when considering finite precision of computational systems. My favorite approach, which is pretty foolproof, is this:
Muller, M.E., “A Note on a Method For Generating Points Uniformly on N-Dimensional Spheres,” Comm. of the ACM, vol. 2, p. 19-20 (1959).
 
  • #4
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 [itex]\phi[/itex] is zero at the "north pole" and you are generating points uniformly distributed on the hemisphere where [itex]0 \leq \phi \leq \pi/2[/itex]. If so, then the joint pdf of [itex](\theta, \phi)[/itex] is $$f(\theta, \phi) = \frac{1}{2 \pi} \sin \phi$$ for [itex]0 \leq \theta \leq 2 \pi[/itex] and [itex]0 \leq \phi \leq \pi / 2[/itex], so the expected value of [itex]\phi[/itex] 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.
 
  • #5
This just boils down to "the median (here: 60°) is not always the same as the average (here: 57.3°)".

Why don't you check how many angles are below / above 60°? This should give 1/2 as answer.
 

FAQ: What is the average of a random hemispherical distribution

What is the average of a random hemispherical distribution?

The average of a random hemispherical distribution is the sum of all values in the distribution divided by the total number of values. In other words, it is the central tendency or the middle value of the distribution.

How is the average calculated for a random hemispherical distribution?

To calculate the average of a random hemispherical distribution, you need to add up all the values in the distribution and then divide the sum by the total number of values. This will give you the average or mean value of the distribution.

Why is the average important in a random hemispherical distribution?

The average is important in a random hemispherical distribution because it provides a measure of central tendency, which can help us understand the overall behavior and characteristics of the distribution. It can also be used to make comparisons between different distributions.

Can the average be affected by outliers in a random hemispherical distribution?

Yes, the average of a random hemispherical distribution can be affected by outliers or extreme values. Outliers can greatly impact the calculation of the average, making it a less reliable measure of central tendency. It is important to identify and handle outliers appropriately when calculating the average.

How does the average differ from the median and mode in a random hemispherical distribution?

The average, median, and mode are all measures of central tendency, but they differ in how they are calculated and what they represent. The average is the sum of all values divided by the total number of values, while the median is the middle value in a sorted distribution, and the mode is the most frequently occurring value. In a symmetrical distribution, these three measures will be the same, but in a skewed distribution, they may differ.

Similar threads

Back
Top