Algorithms for randomness in the behavioral sciences: A tutorial

  • Marc Brysbaert
Computer Technology


Simulations and experiments frequently demand the generation of random numbers that have specific distributions. This article describes which distributions should be used for. the most common problems and gives algorithms to generate the numbers. It is also shown that a commonly used permutation algorithm (Nilsson, 1978) is deficient.


  1. Afflerbach, L. (1985). The pseudo-random number generators in Commodore and Apple microcomputers.Statistische Hefte,26, 321–333.CrossRefGoogle Scholar
  2. Aldridge, J. W. (1987). Cautions regarding random number generation on the Apple II.Behavior Research Methods, Instruments, & Computers,19, 397–399.Google Scholar
  3. Atkinson, A. C. (1980). Tests of pseudo-random numbers.Applied Statistics,29, 164–171.CrossRefGoogle Scholar
  4. Best, D. J. (1979). Some easily programmed pseudo-random normal generators.Australian Computer Journal,11, 60–62.Google Scholar
  5. Bissell, A. F. (1986). Ordered random selection without replacement.Applied Statistics,35, 73–75.CrossRefGoogle Scholar
  6. Box, G. E. P., &Jenkins, G. M. (1976).Time series analysis: Fore-casting and control. San Francisco’. Holden-Day.Google Scholar
  7. Box, G. E. P., &Muller, M. E. (1958). A note on the generation of random normal deviates.Annals of Mathematical Statistics,29, 610–611.CrossRefGoogle Scholar
  8. Bradley, D. R. (1988).DATASIM. Lewiston, ME: Desktop Press.Google Scholar
  9. Bradley, D. R., Senko, M. W., &Stewart, F. A. (1990). Statistical simulation on microcomputers.Behavior Research Methods, Instruments, & Computers,22, 236–246.Google Scholar
  10. Brophy, A. L. (1985). Approximation of the inverse normal distribution function.Behavior Research Methods, Instruments, & Computers,17, 415–417.CrossRefGoogle Scholar
  11. Dreger, R. M. (1989). A BASIC program for the Shell-Metzner sort algorithm.Educational & Psychological Measurement,49, 619–622.CrossRefGoogle Scholar
  12. Dudewicz, E. 3., &Ralley, T. G. (1981).The handbook of random number generation and testing with TESTRAND computer code. Columbus, OH: American Sciences Press.Google Scholar
  13. Dwyer, T., &Critchfield, M. (1978).BASIC and the Personalcomputer. Reading, MA: Addison-Wesley.Google Scholar
  14. Edgell, S. E. (1979). A statistical check of the DECsystem-10 FORTRAN pseudorandom number generator.Behavior Research Methods & Instrumentation,11, 529–530.Google Scholar
  15. Ellis, J. K. (1985). Distribution counting as a method for sorting test scores.Behavior Research Methods, Instruments, & Computers,17, 419–420.CrossRefGoogle Scholar
  16. Fishman, G. S., &Moore, L. R., Ill (1986). An exhaustive analysis of multiplicative congruential random number generators with modulus 231 - 1.SIAM Journal on Scientific & Statistical Computing,7, 24–45.CrossRefGoogle Scholar
  17. Green, B. F. (1963).Digital computers in research: An introduction for behavioral and social scientists. New York: McGraw-Hill.Google Scholar
  18. Gruenberger, F., &Jaffray, G. (1965).Problems for computer solution. New York: Wiley.Google Scholar
  19. Hays, W. L. (1988).Statistics. New York: Holt, Rinehart and Winston.Google Scholar
  20. Kennedy, W. J., &Gentle, J. E. (1980).Statistical computing. New York: Marcel Dekker.Google Scholar
  21. Knuth, D. E. (1973).The art of computer programming: Vol. 3. Sorting and searching. Reading, MA: Addison-Wesley.Google Scholar
  22. Knuth, D. E. (1981).The art of computer programming: Vol. 2. Semi-numerical algorithms. Reading, MA: Addison-Wesley.Google Scholar
  23. Kraner, H. C, Mohanty, S. G., &Lyons, J. C. (1980). Critical values of the Kolmogorov-Smirnoy one-sample test.Psychological Bulletin,88, 498–501.CrossRefGoogle Scholar
  24. Lordahl, D. S. (1988). Repairing the Microsoft BASIC RND function.Behavior Research Methods, Instruments, & Computers,20, 221–223.Google Scholar
  25. Luce, R. D. (1986).Response times. New York: Oxford University Press.Google Scholar
  26. MacLaren, N. M. (1989). The generation of multiple independent sequences of pseudorandom numbers.Applied Statistics,38, 351–359.CrossRefGoogle Scholar
  27. McLeod, A. I. (1985). A remark on Algorithm AS183: An efficient and portable pseudo-random number generator.Applied Statistics,34, 198–200.CrossRefGoogle Scholar
  28. Malmi, R. A. (1986). Intuitive covariation estimation.Memory & Cognition,14, 501–508.Google Scholar
  29. Marsaglia, G. (1962). Random variables and computers. In J. Kozesnik (Ed.),Information theory, statistical decision functions, random processes: Transactions of the Third Prague Conference (pp. 499–510). Prague: Czechoslovak Academy of Sciences.Google Scholar
  30. Marsagua, G., &Bray, T. A. (1964). A convenient method for generating normal variables.SIAM Review,6, 260–264.CrossRefGoogle Scholar
  31. Modianos, D. T., Scott, R. C., &Cornwell, L. W. (1987). Testing intrinsic random-number generators.Byte,12, 175–178.Google Scholar
  32. Moses, L. E., &Oakford, R. V. (1963).Tables of random permutations. Stanford, CA: Stanford University Press.Google Scholar
  33. Nance, R. E., &Overstreet, C. L. (1972). A bibliography on random number generators.Computer Review,13, 495–508.Google Scholar
  34. Nilsson, T. H. (1978). Randomization without replacement using replacement without losing your place.Behavior Research Methods & Instrumentation,10, 419.Google Scholar
  35. Press, W. H., Flannery, B. P., Teukolsky, S. A., &Vetterling, W. T. (1986).Numerical recipes: The art of scientific computing. Cambridge, U.K.: Cambridge University Press.Google Scholar
  36. Ripley, B. D. (1983). Computer generation of random variables: A tutorial.International Statistical Review,51, 301–319.CrossRefGoogle Scholar
  37. Ripley, B. D. (1987).Stochastic simulation. New York: Wiley.CrossRefGoogle Scholar
  38. Sahai, H. (1979). A supplement to Sowey’s bibliography on random number generation and related topics.Journal of Statistical Computation & Simulation,10, 31–52.CrossRefGoogle Scholar
  39. Sowey, E. R. (1972). A chronological and classified bibliography on random number generation and testing.International Statistical Review,40, 355–371.Google Scholar
  40. Sowey, E. R. (1978). A second classified bibliography on random number generation and testing.International Statistical Review,46, 355–371.Google Scholar
  41. Sowey, E. R. (1986). A third classified bibliography on random number generation and testing.Journal of the Royal Statistical Society,149A, 83–107.Google Scholar
  42. Strube, M. J. (1983). Tests of randomness for pseudorandom number generators.Behavior Research Methods & Instrumentation,15, 536–537.Google Scholar
  43. von Neumann, J. (1951). Various techniques in connection with random digits.NBS Applied Mathematics Series,12, 36–38.Google Scholar
  44. Wichmann, B. A., &Hill, J. D. (1982). Algorithm AS183: An efficient and portable pseudo random number generator.Applied Statistics,31, 188–190.CrossRefGoogle Scholar
  45. Wichmann, B. A., &Hill, J. D. (1984). An efficient and portable pseudo random number generator: Correction.Applied Statistics,33, 123.CrossRefGoogle Scholar
  46. Zeisel, H. (1986). A remark on Algorithm AS183: An efficient and portable pseudo-random number generator.Applied Statistics,35, 89.Google Scholar
  47. Zelen, M., &Severo, N. C. (1964). Probability functions. In M. Abramowitz & I. A. Stegun (Eds.),Handbook of mathematical functions (pp. 925–995). New York: Dover.Google Scholar

Copyright information

© Psychonomic Society, Inc. 1991

Authors and Affiliations

  • Marc Brysbaert
    • 1
  1. 1.University of LeuvenLeuvenBelgium

Personalised recommendations