0

I need to generate random numbers following Normal distribution. If X is a radius, and Y is an angle, how I can transform it into Descartes coordinates, and are they normally distributed?

gung - Reinstate Monica
  • 132,789
  • 81
  • 357
  • 650

1 Answers1

1

Generate Y Uniform 0 to $2\pi$. Generate X from the exponential distribution.

Edit: you then may want to transform to Cartesian coordinates in the standard way. $$ A = X\sin(Y) \\ B = X\cos(Y) $$

Now A and B are distributed bivariate normal in the Cartesian coordinate system.

Ian Fellows
  • 156
  • 3
  • 2
    You're half way there. The OP wants normally distributed numbers. Right now you have 2 pseudorandom variates, neither of which are normal. Can you get the OP the rest of the way there? – gung - Reinstate Monica Dec 14 '15 at 21:04
  • 1
    Actually, (X,Y) is 1 bivariate random variable distributed normally and represented in the polar coordinate system. But I get your point and have amended the answer – Ian Fellows Dec 14 '15 at 23:55