Re: [math-fun] Statistics for a class of random solids, a drunkard's walkthrough
"Keith F. Lynch" <kfl@KeithLynch.net> wrote:
Do you mean that the values of the three coordinates are independently normally distributed, or that the distance from the origin is? It's not obvious to me that these would give the same distribution.
Allan Wechsler <acwacw@gmail.com> answered this on 3/10, but I didn't find his answer searching for "do you mean," and also there are some extra quirks in the following response: Ignoring constants, the normal distribution is like 1/exp(x^2). Independent distributions for the three axes combine by multiplying: 1 / (exp(x^2) exp(y^2) exp(z^2) )= 1/exp(x^2 + y^2 + z^2) Say r is the distance from the origin, r^2 = x^2 + y^2 + z^2. So the distribution is like 1/exp(r^2). Except for constants. And I think the converse has to be true too. Reminds me that a random walk of 2D grid steps gives a distribution whose contours approach circles. Two semi-related entries in HAKMEM: ITEM 26 (? via Salamin): (typos from scanning?) Let x be uniform on [0, 1], y be uniform on [0, 2ir], x and y independent. (2pi?) Calculate r = /-log x. (sqrt(-log x))?) Then r cos y and r sin y are two independent Gaussian distributed random numbers. ITEM 27 (Salamin): PROBLEM: Generate random unit vectors in N-space uniform on the unit sphere. SOLUTION: Generate N Gaussian random numbers and normalize to unit length. --Steve
On Wed, Mar 13, 2019 at 5:11 PM Steve Witham <sw@tiac.net> wrote:
ITEM 26 (? via Salamin): (typos from scanning?)
Let x be uniform on [0, 1], y be uniform on [0, 2ir], x and y independent. (2pi?) Calculate r = /-log x. (sqrt(-log x))?)
You guessed right in both cases: https://www.inwap.com/pdp10/hbaker/hakmem/random.html#item26 -- Mike Stay - metaweta@gmail.com http://math.ucr.edu/~mike https://reperiendi.wordpress.com
If I'm not mistaken, the Gaussian distribution is unique (up to scale) in that if X and Y are *independently* Gaussian, then every combination cos(theta) X + sin(theta) Y is also Gaussian. (Equivalently,, it's the only axisymmetric product distribution.)
Sent: Thursday, March 14, 2019 at 12:10 AM From: "Steve Witham" <sw@tiac.net> To: math-fun@mailman.xmission.com Subject: Re: [math-fun] Statistics for a class of random solids, a drunkard's walkthrough
"Keith F. Lynch" <kfl@KeithLynch.net> wrote:
Do you mean that the values of the three coordinates are independently normally distributed, or that the distance from the origin is? It's not obvious to me that these would give the same distribution.
Allan Wechsler <acwacw@gmail.com> answered this on 3/10, but I didn't find his answer searching for "do you mean," and also there are some extra quirks in the following response:
Ignoring constants, the normal distribution is like 1/exp(x^2).
Independent distributions for the three axes combine by multiplying:
1 / (exp(x^2) exp(y^2) exp(z^2) )= 1/exp(x^2 + y^2 + z^2)
Say r is the distance from the origin, r^2 = x^2 + y^2 + z^2.
So the distribution is like 1/exp(r^2). Except for constants. And I think the converse has to be true too.
Reminds me that a random walk of 2D grid steps gives a distribution whose contours approach circles.
Two semi-related entries in HAKMEM:
ITEM 26 (? via Salamin): (typos from scanning?)
Let x be uniform on [0, 1], y be uniform on [0, 2ir], x and y independent. (2pi?) Calculate r = /-log x. (sqrt(-log x))?) Then r cos y and r sin y are two independent Gaussian distributed random numbers.
ITEM 27 (Salamin):
PROBLEM: Generate random unit vectors in N-space uniform on the unit sphere. SOLUTION: Generate N Gaussian random numbers and normalize to unit length.
--Steve
_______________________________________________ math-fun mailing list math-fun@mailman.xmission.com https://mailman.xmission.com/cgi-bin/mailman/listinfo/math-fun
participants (3)
-
Adam P. Goucher -
Mike Stay -
Steve Witham