home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / sci / math / stat / 1524 < prev    next >
Encoding:
Internet Message Format  |  1992-07-27  |  2.4 KB

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