Sphere Probability: Understanding Joint Distribution

  • Context: Undergrad 
  • Thread starter Thread starter rabbed
  • Start date Start date
  • Tags Tags
    Probability Sphere
Click For Summary

Discussion Overview

The discussion revolves around the joint distribution of random variables representing points inside a sphere, specifically focusing on the probability density functions (PDFs) associated with spherical coordinates and their transformation into Cartesian coordinates. Participants explore the implications of uniform distributions in this context, as well as the relationships between different coordinate systems and their respective distributions.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant proposes a method for generating points inside a sphere using specific transformations and questions the resulting joint distribution of the variables S, V, and O.
  • Another participant suggests that the volume element of the sphere influences the distribution, indicating a need to consider the uniformity of the radial distribution.
  • There is a discussion about whether the PDF for S should be adjusted based on the joint distribution, with some participants questioning the uniformity of the resulting distribution.
  • A participant expresses confusion regarding the terminology and mathematical conventions used in the discussion, indicating a different intuitive approach based on coding experience.
  • Several participants explore the implications of different PDFs and transformations on achieving a uniform distribution of points within the sphere.
  • One participant mentions the goal of deriving the standard normal distribution and its connection to the Maxwell-Boltzmann distribution, suggesting a relationship between the distributions being discussed.
  • Another participant discusses the Jacobian determinant related to the transformations and its implications for the uniformity of the distribution.
  • There are multiple attempts to reconcile the differences in coordinate systems and their effects on the resulting distributions.

Areas of Agreement / Disagreement

Participants express differing views on the correct approach to achieving a uniform distribution within the sphere, with no consensus reached on the appropriate PDFs or transformations. The discussion remains unresolved regarding the implications of the various proposed methods and their outcomes.

Contextual Notes

Participants highlight limitations in their understanding of the mathematical conventions and the implications of their chosen coordinate systems. There are unresolved questions regarding the normalization of the distributions and the relationship between different coordinate representations.

Who May Find This Useful

This discussion may be of interest to those exploring probability distributions in geometric contexts, particularly in relation to spherical coordinates and their applications in physics and machine learning.

rabbed
Messages
241
Reaction score
3
Hi

If I'm using this method to generate points inside a sphere with radius K:
X = S^(1/3)*sqrt(1-V^2)*sin(O)
Y = S^(1/3)*V
Z = -S^(1/3)*sqrt(1-V^2)*cos(O)

where (0 < s < K^3), (-1 < v < 1) and (0 < o < 2*pi), i guess that:
S_PDF(s) = 1/(K^3)
V_PDF(v) = 1/2
O_PDF(o) = 1/(2*pi)

How come the joint distribution of S, V and O is 1/(4*pi*K^3)?
Shouldn't it be 1/(4*pi*K^3/3) because the volume of the sphere is 4*pi*K^3/3?
 
Physics news on Phys.org
A volume element of the sphere is ##dV = r^2 \sin\theta \,dr\, d\theta\, d\phi## so I think it's because you distribute ##r^3## evenly ...
 
Should S_PDF(s) actually be 3/(K^3) or is really SVO_PDF(s,v,o) = 1/(4*pi*K^3) in this case?
 
I don't speak the jargon. But I guessed you generate a uniform distribution of ##s = r^3## and I think it should be a uniform distribution of ##s = r^2## .
 
Was this useful ? I see you follow a multiple-track approach with loosely coupled threads (which is fine, it's just that I find it an interesting subject :smile:).
 
Yeah, this is a very interesting subject :)
I haven't studied any of this in school so I'm just picking up bits and pieces from the net trying to make sense of it.
My goal at the moment is to derive the standard normal distribution in the most simple, concrete way possible while heading for the maxwell Boltzmann distribution as a part of understanding machine learning.
With this thread I was thinking that since I started with formulas giving cartesian coordinates from spherical coordinates, then calculated the formulas above (giving uniform surface distribution), maybe I need to use these new formulas to fill in the constants of the "unknown" distribution N(n) = C*e^(-K*n^2) which satisfies N(x)*N(y)*N(z) = N(sqrt(x^2+y^2+z^2)), since uniform direction is needed for isotropy which is a requirement of the maxwell Boltzmann distribution.
But after I posted this thread I thought that just because the joint distribution of the XYZ-components from spherical coordinates is 1/(4*pi*K^3/3) doesn't mean that the joint SVO distribution need to be the same, since they are in different coordinate systems. So maybe it was a stupid thread to begin with anyway?
Hope it made any sense :) Feel free to push me in any direction if you have experience with this.
 
rabbed said:
derive the standard normal distribution in the most simple, concrete way possible
There's plenty of ways to get a Gaussian distribution (which can then be properly normalized to standard). A few I remember:
  • as the sum limit of uniformly distributed numbers (*)
  • as a limit of the binomial distribution
I think that even when they are not all that uniformly distributed you still get the gauss function, provided there are no correlations.
 
Last edited:
Thanks, I can use those ways also to get a feel for what this distribution is.

I still think there should be a way to derive this N(n) from the formulas and PDF's involved in random vectors.
Maybe I should try some more with these formulas of (X,Y,Z) = f(S,V,O):
X = S^(1/3)*sqrt(1-V^2)*sin(O)
Y = S^(1/3)*V
Z = -S^(1/3)*sqrt(1-V^2)*cos(O)
I'm not sure how to get (S,V,O) = f^-1(X,Y,Z) though.
I know I need to substitute this in that etc., but it was a while since I did it. Do you know?

Hm, on second thought maybe it's enough if I use something like:
X = R*sqrt(1-V^2)*sin(O)
Y = R*V
Z = -R*sqrt(1-V^2)*cos(O)
Since it's the uniform direction I need and the radial distribution I want?
 
Last edited:
  • #10
Hey

This was pretty interesting, if I got the jacobian right for these formulas:
X = s^(1/3)*sqrt(1-v^2)*sin(o)
Y = s^(1/3)*v
Z = -s^(1/3)*sqrt(1-v^2)*cos(o)
I get |J| = (v^2-v-1)/3 which has roots v = (1+/-sqrt(5))/2, the golden ratio?
Not sure what that means if it's correct. But cool :)
 
  • #11
Using that Jacobian I get:

XYZ_PDF(o,v,s) = O_PDF(o) * V_PDF(v) * S_PDF(s) / | d(XYZ) / d(OVS) | = 1/(4*pi*K^3) / ((v^2-v-1)/3) = 1/(4*pi*K^3/3) * 1/(v^2-v-1)

So does that mean that it's still not uniform? XYZ_PDF(o,v,s) = 1/(volume of sphere) * 1/(v^2-v-1)
In that case, is it possible to change V_PDF(v) = 1/2 into something which accounts for 1/(v^2-v-1) so that XYZ_PDF(o,v,s) becomes uniform?
 
  • #12
rabbed said:
Since it's the uniform direction I need and the radial distribution I want
What is it you are trying to achieve ? (remember I don't speak the jargon, so I have to pass on #11 and #12 ).

Bear in mind that if theta is uniformly distributed you definitely don't get 'uniform direction' ! That of course requires a uniform ##\sin\theta##
 
Last edited:
  • #13
Sorry, I should have explained some more..
Instead of regular mathematical convention for coordinates, I'm using what I felt was intuitive from my 3D-coding background - a coordinate system where X is to the right, Y is up and Z is into the screen. For the 2D spherical coordinate system, I'm placing (0,0) at (0,0,-K) in the 3D coordinate system. From that point I wanted the positive longitude to increasing towards positive X before heading off into the screen (Z) and positive latitude to start increasing towards positive Y before heading off towards the north pole (at (0,K,0)). With that settled, this is what I've done so far:

Tried randomizing uniform points inside sphere of radius K using:
X = R*cos(A)*sin(O)
Y = R*sin(A)
Z = -R*cos(A)*cos(O)
(0 < o < 2*pi), (-pi/2 < a < pi/2), (0 < r < K)
The Jacobian | d(XYZ / d(OAR) | = r^2*cos(a) <- note that I get cos(a) instead of sin(a) because of the different coordinate convention.
O_PDF(o) = 1/(2pi)
A_PDF(a) = 1/pi
R_PDF(r) = 1/K

This didn't produce a uniform distribution of points inside the sphere:
XYZ_PDF(o,a,r) = O_PDF(o) * A_PDF(a) * R_PDF(r) / | d(XYZ) / d(OAR) | = 1/(2*pi^2*K) / (r^2*cos(a))

So I calculated new distributions for the variables in the volume element:
O_PDF(o) = 1/(2pi)
A_PDF(a) = cos(a)
R_PDF(r) = 3*r^2/K^3
Which gave me:
XYZ_PDF(o,a,r) = O_PDF(o) * A_PDF(a) * R_PDF(r) / | d(XYZ) / d(OAR) | = 3*r^2*cos(a)/(4*pi*K^3) / (r^2*cos(a)) = 1 / (the volume of the sphere)

So having the correct PDF's, I could use the inverse CDF method for A and R to create a new formula:
X = S^(1/3)*sqrt(1-V^2)*sin(O)
Y = S^(1/3)*V
Z = -S^(1/3)*sqrt(1-V^2)*cos(O)
(0 < o < 2*pi), (-1 < v < 1), (0 < s < K^3)
The Jacobian | d(XYZ) / d(OVS) | = (v^2-v-1)/3
O_PDF(o) = 1/(2*pi)
V_PDF(v) = 1/2
S_PDF(s) = 1/K^3

But now I get:
XYZ_PDF(o,v,s) = O_PDF(o) * V_PDF(v) * S_PDF(s) / | d(XYZ) / d(OVS) | = 1/(4*pi*K^3) / ((v^2-v-1)/3) = 1/(4*pi*K^3/3) * 1/(v^2-v-1) =
1 / (the volume of the sphere) * 1/(v^2-v-1)
So does that mean that I still don't get a uniform distribution, or is it just not uniform relative to this new OVS-space in some way?

I'm hoping that changing V_PDF(v) = 1/2 into something else will give me XYZ_PDF(o,v,s) = 1 / (the volume of the sphere) and that it'll will bring me closer to the standard normal distribution the way I explained before. There should be a connection here, since I've read that normalizing a 3D-vector of components coming from a standard normal distribution will give me uniform points on the surface of the sphere.

Does it make any sense?
 
  • #14
I calculated | d(XYZ) / d(OVS) | again in a program and came up with | d(XYZ) / d(OVS) | = 1/3, which is probably correct and gives XYZ_PDF(o,v,s) = 1 / (the volume of the sphere), so no luck there..

I think the best bet would be to investigate formulas where the direction is uniform and the radial distribution should be found, by setting up the different conditions of the radial distribution R_PDF(r):

X = R*sqrt(1-V^2)*sin(O)
Y = R*V
Z = -R*sqrt(1-V^2)*cos(O)
| d(XYZ) / d(OVR) | = r^2
O_PDF(o) = 1/(2*pi)
V_PDF(v) = 1/2
R_PDF(r) = N(r)

XYZ_PDF(o,v,r) =
O_PDF(o) * V_PDF(v) * R_PDF(r) / | d(XYZ) / d(OVR) | =
1/(2*pi) * 1/2 * N(r) / r^2 = N(r) = N(x)*N(y)*N(z)

N(n) = C*e^(-K*n^2)

The goal being to find C (and then K, somehow) without knowing about the normal distribution beforehand
 
Last edited:

Similar threads

  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K