Pseudo-random number sampling

Pseudo-random number sampling

Pseudo-random number sampling or non-uniform pseudo-random variate generation is the numerical practice of generating pseudo-random numbers that are distributed according to a given probability distribution.

Methods of sampling a non-uniform distribution are typically based on the availability of a pseudo-random number generator producing numbers X that are uniformly distributed. Computational algorithms are then used to manipulate a single random variate, X, or often several such variates, into a new random variate Y such that these values have the required distribution.

Historically, basic methods of pseudo-random number sampling were developed for Monte-Carlo simulations in the Manhattan project;[citation needed] they were first published by John von Neumann in the early 1950s.[citation needed]

Contents

Finite discrete distributions

For a discrete probability distribution with a finite number n of indices at which the probability mass function f takes non-zero values, the basic sampling algorithm is straightforward. The interval [0, 1) is divided in n intervals [0, f(1)) , [f(1), f(1) + f(2)), ... The width of interval i equals the probability f(i). One draws a uniformly distributed pseudo-random number X, and searches for the index i of the corresponding interval. The so determined i will have the distribution f(i).

Formalizing this idea becomes easier by using the cumulative distribution function

F(i)=\sum_{j=1}^i f(j).

It is convenient to set F(0) = 0. The n intervals are then simply [F(0), F(1)), [F(1), F(2)), ..., [F(n − 1), F(n)). The main computational task is then to determine i for which F(i − 1) ≤ X < F(i).

This can be done by different algorithms:

  • Linear search, computational time linear in n.
  • Binary search, computational time goes with log n.
  • Indexed search,[1] also called the cutpoint method.[2]
  • Alias method, computational time is constant, using some pre-computed tables.
  • There are other methods that cost constant time.[3]

Continuous distributions

Generic methods:

For generating a normal distribution:

For generating a Poisson distribution:

Footnotes

  1. ^ Ripley (1987)[page needed]
  2. ^ Fishman (1996)[page needed]
  3. ^ Fishman (1996)[page needed]

Literature

  • Devroye, L. (1986) Non-Uniform Random Variate Generation. New York: Springer
  • Fishman, G.S. (1996) Monte Carlo. Concepts, Algorithms, and Applications. New York: Springer
  • Hörmann, W.; J Leydold, G Derflinger (2004)Automatic Nonuniform Random Variate Generation. Berlin: Springer.
  • Knuth, D.E. (1997) The Art of Computer Programming, Vol. 2 Seminumerical Algorithms, Chapter 3.4.1 (3rd edition).
  • Ripley, B.D. (1987) Stochastic Simulation. Wiley.

Wikimedia Foundation. 2010.

Игры ⚽ Поможем решить контрольную работу

Look at other dictionaries:

  • Random number generation — A random number generator (often abbreviated as RNG) is a computational or physical device designed to generate a sequence of numbers or symbols that lack any pattern, i.e. appear random. Computer based systems for random number generation are… …   Wikipedia

  • Convolution random number generator — In statistics and computer software, a convolution random number generator is a pseudo random number sampling method that can be used to generate random variates from certain classes of probability distribution. The particular advantage of this… …   Wikipedia

  • Hardware random number generator — This SSL Accelerator computer card uses a hardware random number generator to generate cryptographic keys to encrypt data sent over computer networks. In computing, a hardware random number generator is an apparatus that generates random numbers… …   Wikipedia

  • Pseudorandom number generator — A pseudorandom number generator (PRNG), also known as a deterministic random bit generator (DRBG),[1] is an algorithm for generating a sequence of numbers that approximates the properties of random numbers. The sequence is not truly random in… …   Wikipedia

  • Inverse transform sampling — Inverse transform sampling, also known as the probability integral transform, is a method of generating sample numbers at random from any probability distribution given its cumulative distribution function (cdf). This method is generally… …   Wikipedia

  • Monte Carlo method — Not to be confused with Monte Carlo algorithm. Computational physics …   Wikipedia

  • Probability distribution — This article is about probability distribution. For generalized functions in mathematical analysis, see Distribution (mathematics). For other uses, see Distribution (disambiguation). In probability theory, a probability mass, probability density …   Wikipedia

  • Marsaglia polar method — The polar method (attributed to George Marsaglia, 1964[1]) is a pseudo random number sampling method for generating a pair of independent standard normal random variables. While it is superior to the Box–Muller transform[citation needed], the… …   Wikipedia

  • Indexed search — For the use of indices in search engines, see Index (search engine). Indexed search,[1] also called the cutpoint method,[2] is an algorithm for discrete distribution pseudo random number sampling, invented by Chen and Asau in 1974. Literature ^… …   Wikipedia

  • Applications of randomness — Randomness has many uses in gambling, divination, statistics, cryptography, art, etc.Note that these uses may have different requirements when it comes to statistical randomness or unpredictability, which in turn leads to different randomization… …   Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”