thisted@gargoyle.UUCP (Ronald Thisted) (08/09/85)
A reference that includes detailed algorithms both for computing p-values and for generating random variates from a wide variety of distributions (as well as *lots* of other useful stuff) is _Statistical Computing_, by William Kennedy and James Gentle, published by Marcel Dekker (1980). Knuth volume 2 (for random number generation) is not so complete, and translating MIX code into something useful isn't always so easy, but his discussions are lucid and thorough. One of the major things to look out for (especially on 16- or 8-bit machines) is that the random number generator supplied by the manufacturer can be criminally terrible. Since the uniform random number generator is at the heart of all of the other generators (for the normal, exponential, chi-squared, etc...) it is essential that you KNOW what you are using to get uniforms. An easily programmed, highly portable uniform random number generator which implements a fairly well-understood generator (the Lewis-Goodman-Miller linear congruential generator) can be found in Bratley, Fox, and Schrage, _A_Guide_to_Simulation_ (approximately), published by Springer. This particular generator is adequate for most applications, certainly for programming a quick simulation to see how (or if) something works. For really critical simulation work, it is advisable to consult an expert on random number generation who is up on the literature and who can advise you whether a simple congruential generator such as the LGM generator is likely to cause difficulty in your applications. Ron Thisted Dept of Statistics, The Univerity of Chicago ...ihnp4!gargoyle!galton!thisted OR thisted@UChicago.CSNET