Radially distributed Cartesian coordinates

Click For Summary

Discussion Overview

The discussion revolves around the generation of a spherically symmetric cloud of points in Cartesian coordinates using random variables from a standard normal distribution. Participants explore the transformation of these coordinates into a radial distribution and the associated probability density functions (PDFs), focusing on the implications of using spherical coordinates and the Jacobian in the context of probability distributions.

Discussion Character

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

Main Points Raised

  • One participant describes a method to create a spherically symmetric cloud of points using a function f(R) and asks for the probability distribution function R_PDF(r).
  • Another participant suggests using the change of variables/PDF method and questions the derivation of a specific PDF from a document they found.
  • A participant inquires about the joint probability density function p(x,y,z) and its conversion to spherical coordinates, seeking clarification on the implications of this transformation.
  • There is a discussion on the density function for a random point in a specific volume and how to integrate the density function over that volume.
  • One participant expresses uncertainty about the treatment of the error function and the Box-Muller method in three dimensions, indicating a need for further exploration of covariance matrices.
  • Another participant raises a question about the notation used in a referenced document, seeking clarification on the derivation of a PDF for a transformed variable.
  • There is a suggestion that the derived radial distribution may be valid, but concerns are raised about the implications of the Jacobian and the need for further formulas to visualize the cloud radially.
  • One participant proposes that sampling from the derived radial distribution may involve the lower incomplete gamma function, indicating a potential method for generating samples.

Areas of Agreement / Disagreement

Participants express various viewpoints and uncertainties regarding the derivation of probability distributions and the implications of transformations between coordinate systems. No consensus is reached on the correct approach or interpretation of the mathematical concepts discussed.

Contextual Notes

Participants highlight the complexity of deriving probability distributions from transformations and the potential dependencies between variables. The discussion includes references to specific mathematical methods and notations that may not be universally understood, indicating a need for clarity in definitions and approaches.

rabbed
Messages
241
Reaction score
3
Ok, so randomizing three random variables, X, Y and Z, each from a standard normal distribution, then plotting these in an ordinary cartesian coordinate system gets me a spherically symmetric cloud of points.

Now I want to create this cloud having the same probability distribution but by using a sphere formula having a uniform direction distribution and a radius of some function f(R) where R has some unknown distribution:
X = f(R)*sqrt(1-V^2)*sin(O)
Y = f(R)*V
Z = -f(R)*sqrt(1-V^2)*cos(O)
|J| = | d(XYZ) / d(OVR) | = f(r)^2*f'(r)
O_PDF(o) = 1/(2*pi) where (0 < o < 2*pi)
V_PDF(v) = 1/2 where (-1 < v < 1)
R_PDF(r) = ?

So I want to calculate R_PDF(r). I know that R^2 = X^2 + Y^2 + Z^2 so I use the CDF method to first
find the distribution of XS = X^2 knowing that X_PDF(x) = 1/sqrt(2*pi)*e^(-x^2/2).

This gets me XS_PDF(xs) = 1/sqrt(2*pi*xs)*e^(-xs/2) which is the same for YS_PDF and ZS_PDF

Then I want to calculate RS_PDF(rs) from RS = XS + YS + ZS, knowing XS_PDF(xs), YS_PDF(ys) and ZS_PDF(zs):

RS_PDF(rs) =
RS_CDF'(rs) =
( P(RS < rs) )' =
( P(XS + YS + ZS < rs) )' = ?

What to do here?
 
Last edited:
Physics news on Phys.org
Hi rabbed:

If you assume that the x, y, and z variable Gaussian distributions all have a zero mean as well as the same standard deviation, then what is the joint probability density p(x,y,z) at a point [x,y,z]? What do you get if you then convert p(x,y,z) to spherical coordinates, p(r,θ,φ)?

Hope this helps.

Regards,
Buzz
 
Hi Buzz

XYZ_PDF(x,y,z) =
X_PDF(x) * Y_PDF(y) * Z_PDF(z) =
1/sqrt(2*pi)*e^(-x^2/2) * 1/sqrt(2*pi)*e^(-y^2/2) * 1/sqrt(2*pi)*e^(-z^2/2) =
1/(2*pi)^(3/2)*e^(-(x^2+y^2+z^2)/2)

Substituting with these:
x = r*cos(a)*sin(o)
y = r*sin(a)
z = -r*cos(a)*cos(o)
Gives:
XYZ_PDF(x,y,z) =
1/(2*pi)^(3/2)*e^(-((r*cos(a)*sin(o))^2+(r*sin(a))^2+(-r*cos(a)*cos(o))^2)/2) =
1/(2*pi)^(3/2)*e^(-r^2/2)

Subtituting with these:
X = f(R)*sqrt(1-V^2)*sin(O)
Y = f(R)*V
Z = -f(R)*sqrt(1-V^2)*cos(O)
Gives:
XYZ_PDF(x,y,z) =
1/(2*pi)^(3/2)*e^(-((f(R)*sqrt(1-V^2)*sin(O))^2+(f(R)*V)^2+(-f(R)*sqrt(1-V^2)*cos(O))^2)/2) =
1/(2*pi)^(3/2)*e^(-f(R)^2/2)

So then I have
X = f(R)*sqrt(1-V^2)*sin(O)
Y = f(R)*V
Z = -f(R)*sqrt(1-V^2)*cos(O)
|J| = | d(XYZ) / d(OVR) | = f(r)^2*f'(r)
O_PDF(o) = 1/(2*pi) where (0 < o < 2*pi)
V_PDF(v) = 1/2 where (-1 < v < 1)
R_PDF(r) = 1/(2*pi)^(3/2)*e^(-f(r)^2/2)

But what is f(r)?

Is it now true that O_PDF(o) * V_PDF(v) * R_PDF(r) / |J| = X_PDF(x) * Y_PDF(y) * Z_PDF(z) or are the coordinates of either (O, V, R) or (X, Y, Z) statistically dependent?
 
Last edited:
rabbed said:
1/(2*pi)^(3/2)*e^(-r^2/2)
Hi rabbed:

Why is this not the radially symmetric distribution you want?

Regards,
Buzz
 
Hi Buzz

It probably is. But after learning about the jacobian and how the area/volume-element for a circle/sphere depends on the radius I'm a bit suspicious about radial distributions.. :)
I guess since I'm just substituting coordinates, it's ok and the first step I should make, so XYZ_PDF(r,a,o) = XYZ_PDF(r,v,o) = 1/(2*pi)^(3/2)*e^(-r^2/2)?
But for finding out this f(R) and formulas to visualize the cloud radially, i would need to continue as I did, right? Because of the Jacobian..
I think my last question is relevant in doing this? Or is it not possible to create such formulas?

Rgds
rabbed
 
rabbed said:
XYZ_PDF(r,a,o) = XYZ_PDF(r,v,o) = 1/(2*pi)^(3/2)*e^(-r^2/2)?
Hi rabbed:

The density function gives a value for a point in the domain of the distribution. To get the probability of a random point being in a specific volume, you would integrate the density function over the volume.
P = prob {random point is in V} = ∫ p dV .​
For Cartesian coordinates,
P = ∫ p(x,y,z) dx dy dz .​
For polar coordinates,
P = ∫ p(r) r2 dr dφ sin θ dθ .​

I think that is a ll you need.

Regards,
Buzz
 
Hi again Buzz

So to find f(R), I need to check out how to treat the error function? Or Box Muller in 3D? I've also seen something about covariance matrices..

I still think this link was interesting, because it will lead me into Gamma and Chi squared, which I've understood are important:
rabbed said:
Maybe the change of variables/PDF method is better..
I found this document: https://www2.stat.duke.edu/courses/Spring11/sta114/lec/114mvnorm.pdf

I don't understand how, on page 2, fY(y) = 2/sqrt(2*pi)*e^(-y/2) / |2*sqrt(y)|
shouldn't it be fY(y) = 1/sqrt(2*pi)*e^(-y/2) / |2*sqrt(y)| since fY(y) = fX(g^-1(y)) / g'(g^-(y)) ?

Can you answer that?
 
rabbed said:
Can you answer that?
Hi rabbed:

Sorry, but I can't help you with this. The notation for expressing problems used at the link you gave is different than the notations I learned many decades ago, and I am unable to make sense of it. The equations you quoted also use notations I don't understand. For example, what does fY(y) mean? If you wrote English defintions for all the notations, then perhaps I might be able to answer your question.

Regards,
Buzz
 
Last edited:
  • #10
Hi

Glad to see someone else having issues with notation.
fY(y) should be the wanted PDF of Y where Y is a random variable expressed as a function, g, of the random variable X.
Since Y = g(X) = X^2, the inverse of g gives us X = g^-1(Y) = +/- sqrt(Y)
I thought the PDF of X was 1/sqrt(2*pi)*e^(-x^2/2), but the X~No(0,1) and the sigma x:x^2=y makes me think now that what's being calculated is different from what I was trying to do in the first post of this thread.

Hope you or someone else can explain
 
Last edited:
  • #11
According to this page http://www.gamlss.org/wp-content/uploads/2014/10/distributions.pdf on page 225, NO(0,1) = 1/sqrt(2*pi)*e^(-x^2/2)
So that means maybe X_PDF(x) = 1/sqrt(2*pi)*e^(-x^2/2) in the other document, after all.

Maybe the sigma is summing X_PDF's so that we get:
Y_PDF(y) = (X_PDF(x) + X_PDF(x)) / g'(X) = 2*X_PDF(g^-1(y)) / g'(g^-1(y)) = 2*X_PDF(sqrt(y))) / g'(sqrt(y)) = 2/sqrt(2*pi)*e^(-y/2) / |2*sqrt(y)|
Instead of:
Y_PDF(y) = X_PDF(x) / g'(X) = X_PDF(g^-1(y)) / g'(g^-1(y)) = X_PDF(sqrt(y))) / g'(sqrt(y)) = 1/sqrt(2*pi)*e^(-y/2) / |2*sqrt(y)|
?

It could be tied to the fact that the Gamma function has one special case of parameters, (Ga(1/2,1/2) according to the document), which is why the Box Muller method can sample the normal distribution. I read something about that.

Can someone confirm?
 
  • #12
Hi again

If we skip the side track, is it possible to sample from the radial distribution 1/(2*pi)^(3/2)*e^(-r^2/2) that was derived?

According to this link:
http://mathematics.livejournal.com/1144375.html
I think I should sample the "lower incomplete gamma function", somehow..

Rgds
rabbed
 
Last edited:

Similar threads

  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 4 ·
Replies
4
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 25 ·
Replies
25
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K