Revision as of 18:01, 20 October 2008 by Kdosenba (Talk)

We create variables :

A ~ exp(1/2)

w ~ unif[0, 2pi]

then let :

$ X = \sqrt(A)cos(w) $

$ Y = \sqrt(A)sin(w) $

Then you can go through the proof and show that the PDF of X and Y ~ N[0, 1]

so in c to produce a random variable with a gaussian distribution you simply do the following

$ \sqrt(A) cos(drand48()) $

where A is what you solved for from part b of problem 1

Alumni Liaison

Basic linear algebra uncovers and clarifies very important geometry and algebra.

Dr. Paul Garrett