[URGENT] Gaussian deviates


xxayisjeeves
10-12-2007, 02:51 AM
The Box-Muller transformation described in Chapter 7 deals with normal deviates N[0,1] . For my problem, I need to generate N[mu, sigma**2].

How do I go about it?

I have tried to retain the original algorithm, just doing the transformation gasdev= mu+sigma*gasdev in the end. Though the function does spread for sigma >1 in that case, the peak doesn't get reduced.

Please help me out.

Bill Press
10-15-2007, 08:37 PM
Your prescription mu+sigma*gasdev is correct.
By the way, the new NR Third Edition has a new algorithm for normal (Gaussian) deviates that is much faster.

xxayisjeeves
10-20-2007, 02:17 AM
Thanks a lot, Bill ...