Understanding Random Vectors and Hypersphere Distributions

  • Context: Graduate 
  • Thread starter Thread starter rabbed
  • Start date Start date
  • Tags Tags
    Random Vectors
Click For Summary

Discussion Overview

The discussion revolves around the mathematical treatment of probability distributions for points uniformly distributed on the surface or inside a hypersphere in 2D and 3D. Participants explore the transition from polar coordinates in 2D to suitable coordinates in 3D, focusing on the formulation of probability density functions (PDFs) and cumulative distribution functions (CDFs) for radial and angular components.

Discussion Character

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

Main Points Raised

  • One participant expresses confusion over the various probability distributions related to hyperspheres and outlines a plan to derive a uniform distribution in 3D from 2D polar coordinates.
  • Another participant suggests that the radial PDF should be proportional to the area element, leading to a form of r^2 for normalization.
  • A participant attempts to derive the joint PDF and CDF for radial and angular components, questioning the normalization constant and the implications of their calculations.
  • There is a discussion about the correlation between X and Y coordinates when generating points, with suggestions for alternative methods to generate uniformly distributed points.
  • Participants debate the correct form of the radial PDF, with one asserting it should be proportional to r, while another agrees but emphasizes the need for proper normalization.
  • Some participants reference external sources to support their claims about generating random points within a circle, indicating ongoing research and exploration of the topic.
  • There is uncertainty expressed about the derivation of the radial PDF, with participants questioning their integration steps and the resulting forms of the PDFs and CDFs.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the exact form of the radial PDF or the normalization constants involved. Multiple competing views and methods for deriving the distributions remain present throughout the discussion.

Contextual Notes

Participants highlight potential errors in their calculations and the need for careful consideration of area elements in integration. There are unresolved questions regarding the normalization of the PDFs and the implications of correlations between generated coordinates.

rabbed
Messages
241
Reaction score
3
Hi

There are so many different kinds of probability distributions regarding a uniform distribution
of points on the surface or inside a hypersphere in 2D and 3D and it's hard to see the big picture
or any pattern between them. I'm confused and exhausted :)

The overall fuzzy plan is to go from 2D polar coordinates (integrating by r*dr*dθ) to 3D suitable
coordinates (integrating by whatever the equivalent might be).
In both cases, I want to multiply the independent components PDF's, get the CDF and invert it
to get the cartesian coordinates of a point that will be uniformly distributed inside the
hypersphere. I guess normalization after this will give me a random vector?
Then I want to show that independent standard normal distributed coordinates will also accomplish
this after normalization, in a more unified way.

Does that plan make sense from a mathematician point of view and have I got something wrong?

Right now I'm stuck at the 2D case, I guess I want to multiply V_PDF(v) = 1/(2*pi) with some R_PDF(r).
How do I get such an R_PDF(r)?
I should end up with (x,y) = r*sqrt(u)*e^(i*2*pi*v) with u and v ~ U(0,1).

/rabbed
 
Physics news on Phys.org
rabbed said:
How do I get such an R_PDF(r)?
Your area between r and r+dr is proportional to r, so the right pdf should have the same property. That leads to r^2 plus normalization for the cumulative probability distribution. Compare this to the area where the radial coordinate is smaller than r...
For low dimensions, suitable distributions for cartesian coordinates are so much easier.
 
First lame attempt:

R_PDF(r) = k
V_PDF(v) = 1/(2*pi)

RV_PDF(r,v) = R_PDF(r)*V_PDF(v) = k*r/(2*pi)

RV_CDF(r,v) =
P(R < r AND V < v) =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to x of RV_PDF(r,v) * r*dr*dv =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to x of k/(2*pi) * r*dr*dv =
integral wrt v from 0 to 2*pi of dv * [k*r^2/(2*pi)] wrt r from 0 to x =
integral wrt v from 0 to 2*pi of k*x^2/(2*pi) * dv =
[v*k*x^2/(2*pi)] wrt v from 0 to 2*pi =
k*x^2 = 1
so k = 1/(x^2) ?

Not sure what that means :)

Also, do I have to do this in two steps where the second step gives the cartesian coordinate Y using Y_PDF(y) calculated below, and also include R_PDF(r) to get the CDF and then invert it?

V_PDF(v) = 1/(2*pi)
Y = r*sin(V)

Y_CDF(y) =
integral wrt v from pi-arcsin(y/r) to pi+arcsin(y/r) of V_PDF(v)*dv =
integral wrt v from pi-arcsin(y/r) to pi+arcsin(y/r) of 1/(2*pi)*dv =
[v/(2*pi)] wrt v from pi-arcsin(y/r) to pi+arcsin(y/r) =
(pi+arcsin(y/r))/(2*pi) - (pi-arcsin(y/r))/(2*pi) =
( (pi+arcsin(y/r)) - (pi-arcsin(y/r)) )/(2*pi) =
( pi+arcsin(y/r) - pi + arcsin(y/r) )/(2*pi) =
2*arcsin(y/r)/(2*pi) =
arcsin(y/r)/pi

Y_PDF(y) =
d[arcsin(y/r)/pi]/dy =
1/(pi*sqrt(r^2-y^2))
 
rabbed said:
so k = 1/(x^2) ?

Not sure what that means :)
If x is your radius, that prefactor will give the right normalization.
rabbed said:
Y_CDF(y) = [...] = arcsin(y/r)/pi
Y_PDF(y) = [...] = 1/(pi*sqrt(r^2-y^2))
Looks like a reasonable result. I don't think it is helpful if you want to generate points, however, as X and Y are correlated then.

A fast way if you have access to random numbers with uniform distribution: scale/shift the distribution so it goes from -r to r. Calculate a point (x,y), compare x^2+y^2 to r^2: if the point is in the circle, you are done, if it is outside, repeat the process. While it is not guaranteed to succeed, you have a pi/4 > 75% chance each time, so on average you just need ~2.6 random numbers and a few multiplications and additions.
 
Ok, thanks..
I spotted some errors and did some research and there is still something not adding up.
So if we have a disc with radius K on which we randomize points by using the random variables R (radius) and V (angle):

R_PDF(r) = c where (0 < r < K)
V_PDF(v) = 1/(2*pi) where (0 < v < 2*pi)

RV_PDF(r,v) = R_PDF(r)*V_PDF(v) = c/(2*pi)

RV_CDF(r,v) =
P(R < r AND V < v) =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to K of RV_PDF(r,v) * r*dr*dv =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to K of c/(2*pi) * r*dr*dv =
integral wrt v from 0 to 2*pi of dv * [c*r^2/(4*pi)] wrt r from 0 to K =
integral wrt v from 0 to 2*pi of c*K^2/(4*pi) * dv =
[v*c*K^2/(4*pi)] wrt v from 0 to 2*pi =
2*pi*c*K^2/(4*pi) =
c*K^2/2 = 1

so c = 2/(K^2) and we get:
R_PDF(r) = 2/(K^2)

but this should be proportional to r?

am I using the area element r*dr*dv wrong in the integration?
 
You forgot the factor r in R_PDF(r). It has to be proportional to r.
rabbed said:
am I using the area element r*dr*dv wrong in the integration?
No, that is fine.
 
But won't that give me the following?

R_PDF(r) = c*r where (0 < r < K)
V_PDF(v) = 1/(2*pi) where (0 < v < 2*pi)

RV_PDF(r,v) = R_PDF(r)*V_PDF(v) = c*r/(2*pi)

RV_CDF(r,v) =
P(R < r AND V < v) =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to K of RV_PDF(r,v) * r*dr*dv =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to K of c*r/(2*pi) * r*dr*dv =
integral wrt v from 0 to 2*pi of integral wrt r from 0 to K of c*r^2/(2*pi) * dr*dv =
integral wrt v from 0 to 2*pi of dv * [c*r^3/(6*pi)] wrt r from 0 to K =
integral wrt v from 0 to 2*pi of c*K^3/(6*pi) * dv =
[v*c*K^3/(6*pi)] wrt v from 0 to 2*pi =
2*pi*c*K^3/(6*pi) =
c*K^3/3 = 1
so c = 3/(K^3)

R_PDF(r) = r*3/(K^3)
 
  • #10
Can anyone explain this?

I'm pretty sure R_PDF(r) = 2*r/(K^2)

But how can it be derived?
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 15 ·
Replies
15
Views
2K
  • · Replies 3 ·
Replies
3
Views
787
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 11 ·
Replies
11
Views
4K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K