home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!bu.edu!jade.tufts.edu!news.tufts.edu!sage.hnrc.tufts.edu!jerry
- From: jerry@ginger.hnrc.tufts.edu (Jerry Dallal)
- Newsgroups: sci.math.stat
- Subject: Re: random number generator
- Message-ID: <1992Jul27.132508.217@ginger.hnrc.tufts.edu>
- Date: 27 Jul 92 18:25:07 GMT
- References: <1992Jul27.103659.11820@kth.se> <1992Jul27.124120.29511@cl.cam.ac.uk>
- Organization: USDA HNRC at Tufts University
- Lines: 48
-
- In article <1992Jul27.124120.29511@cl.cam.ac.uk>, nmm@cl.cam.ac.uk (Nick Maclaren) writes:
- > In article <1992Jul27.103659.11820@kth.se>, md87-mpe@hemul.nada.kth.se
- > (Magnus Pettersson) writes:
- >
- > |> 3. G.E.P.Box and M.E.Mueller
- > |> A Note on the Generation of Random Normal Deviates
- > |> Ann.Math.Stat. (1958) 29, 610-611
- >
- > Don't use this method in single precision - it has a very serious
- > flaw. While it is OK in double precision, there are faster and simpler
- > methods available (e.g. the Polar Method as described in Knuth). The
- > reference for the flaw is by H.R. Neave round about 1970.
- >
- >
- > Nick Maclaren
- > University of Cambridge Computer Laboratory,
- > New Museums Site, Pembroke Street,
- > Cambridge CB2 3QG, England.
-
-
- Wait! . . . Stop! . . . Hold on a moment! . . .
-
- There is nothing wrong with the Box-Muller method. It is theoretically sound
- and changing from single precision to double precision isn't going to affect
- anything. (For that matter, it isn't going to effect anything, either!)
-
- The Box-Muller transformation is based on the simple fact of distribution
- functions that if U and V are iid U(0,1), then
-
- sqrt(-2 log U) sin (2 pi V)
- sqrt(-2 log U) cos (2 pi V)
-
- are iid N(0,1).
-
- I don't have the article in front of me but I recall that (as explained in a
- followup letter) Neave's argument was flawed. The problem was with a
- uniform random number generator that used too small a modulus and didn't "kick
- over" fast enough.
-
- I agree with Mclaren that the Neave article was published in the 70's. I
- can add that it appeared in Applied Statistics. The followup letter appear
- within the next year or two. I'll leave it to someone else to look up the
- exact references.
-
- (As a practical matter, I prefer to use the inverse of the standard normal
- distribution to generate my random numbers. I know it is computationally
- intensive, but it relieves you from having to worry (as much)
- about the joint distribution of values in your pseudo-random number stream.)
-