An algorithm for generating a Gaussian random variable from two independent uniform random variables is easily derived.

Question:

An algorithm for generating a Gaussian random variable from two independent uniform random variables is easily derived.

(a) Let U and V be two statistically independent random numbers uniformly distributed in [0, 1]. Show that the following transformation generates two statistically independent Gaussian random numbers with unit variance and zero mean:

X = R cos (2πU)

Y = R sin (2πU)

where

R = √-2 in (V)

First show that R is Rayleigh.

(b) Generate 1000 random variable pairs according to the above algorithm. Plot histograms for each set (i.e., X and Y), and compare with Gaussian pdfs after properly scaling the histograms (i.e., divide each cell by the total number of counts times the cell width so that the histogram approximates a probability-density function). Use the hist function of MATLAB.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: