Re: -- random points on the unit n-sphere



On 12 Jan 2008 22:01:16 -0500, hrubin@xxxxxxxxxxxxxxxxxxxx (Herman
Rubin) wrote:

In article <g4gio394fqlj4moq7uuqf2p3ipffmrkhd8@xxxxxxx>,
quasi <quasi@xxxxxxxx> wrote:
What is an efficient algorithm to find random points on the unit
n-sphere?

In the intended application, n will be moderately large, say n = 99.

By random I mean "uniformly random" with respect to "surface area".

Of course, it will only be pseudorandom, that's ok.

Also, the random point may have a norm slightly off from 1, due to
rounding, that's also expected.

Precision is reasonably important (about 10 decimal places or better),
but speed is most important since the program will need to generate
thousands of such points.

I came up with one algorithm on my own, and I implemented it in Maple.
The algorithm is mathematically correct (i.e., the distribution is
uniform with respect to surface area), and the implementation works as
intended, but I sense there are probably faster methods.

Suggested algorithms, links, possible packages are all welcome.

For a given (normal) PC, to benchmark the various methods, I'd be
interested in the time required by each method to generate 1000 random
points on the unit 99-sphere.

quasi

As there are avai\able fast methods to compute normal
random variables with mean 0 and variance 1 from a uniform
supply, it is unlikely that one can do better than dividing
a vector of n such normal random variables by its length.

Yes, the idea is so fundamentally simple -- essentially jjust
directional symmetry.

I wonder if a kind of converse holds.

In other words, what about the following question ...

If x_1,...,x_n are independent, identically distributed random
variables such that x/|x| is uniformly distributed on the unit
n-sphere (where x = (x_1,...,x_n)), must the variables x_1,...,x_n be
normally distributed?

quasi
.



Relevant Pages

  • Re: -- random points on the unit n-sphere
    ... quasi wrote: ... The algorithm is mathematically correct (i.e., the distribution is ... a vector of n such normal random variables by its length. ... for generating points on the n-sphere using normally distributed ...
    (sci.math)
  • Re: -- random points on the unit n-sphere
    ... quasi wrote: ... a vector of n such normal random variables by its length. ... for generating points on the n-sphere using normally distributed ... if we take the actual distribution for a single coordinate ...
    (sci.math)
  • Re: Random numbers
    ... is that the resulting distribution should be uniform. ... hence you can see a slight bias. ... random variables, each say uniformly distributed on the integers from ...
    (sci.math)
  • Re: Random numbers
    ... is that the resulting distribution should be uniform. ... bias or the lack of it, it's misleading to those unaware of the issue. ... random variables, each say uniformly distributed on the integers from ...
    (sci.math)
  • Re: Random numbers
    ... is that the resulting distribution should be uniform. ... hence you can see a slight bias. ... random variables, each say uniformly distributed on the integers from ...
    (sci.math)