A simple method for generating gamma variables

  title={A simple method for generating gamma variables},
  author={George Marsaglia and Wai Wan Tsang},
  journal={ACM Trans. Math. Softw.},
We offer a procedure for generating a gamma variate as the cube of a suitably scaled normal variate. It is fast and simple, assuming one has a fast way to generate normal variables. In brief: generate a normal variate <italic>x</italic> and a uniform variate <italic>U</italic> until In (<italic>U</italic>)<0.5<italic>x</italic><supscrpt>2</supscrpt> + <italic>d</italic> - <italic>dv</italic> + <italic>d</italic>ln(italic>v</italic>), then return <italic>dv</italic>. Here, the gamma parameter is… 

Figures and Tables from this paper

The double CFTP method

An algorithm that can be automated under the condition that it has a source capable of generating independent copies of<i>Y</i>, and that <i>V</i> has a density that can been evaluated in a black-box format is given.


The algorithm of Minh as in [Minh (1988)] was used to generate variates having a gamma distribution with shape parameter a>1 only. In this paper, a method, which is the improvement of the algorithm

Generalized Ziggurat Algorithm for Unimodal and Unbounded Probability Density Functions with Zest

A modified Ziggurat algorithm that could generate a random number from all unimodal and unbounded PDFs and a C++ implementation of a uniform floating-point random number generator (RNG) which is capable of producing all representable floating- point numbers in $[0,1)$ which will be used in the Ziggurat algorithms near unbounded peaks and tails.

A Simple Gamma Random Number Generator for Arbitrary Shape Parameters

This paper proposes a simple gamma random number generator with shape parameter alpha greater than zero, which is very simple and shows quite good performance.

A novel stochastic model and fast generation method for Nakagami fading channels

  • J. RitceyC. Polprasert
  • Business
    2007 Conference Record of the Forty-First Asilomar Conference on Signals, Systems and Computers
  • 2007
Nakagami fading channels are widely accepted to model a variety of wireless channels. They are parameterized by the m-factor, which can take on any value m > 0. The case m = 1 subsumes Rayleigh

Efficient and Accurate Parallel Inversion of the Gamma Distribution

  • T. Luu
  • Computer Science, Mathematics
    SIAM J. Sci. Comput.
  • 2015
A method for parallel inversion of the gamma distribution is described, which has accuracy close to a choice of single- or double-precision machine epsilon for random number generation in Monte Carlo simulations where gamma variates are required.

Fitting distributions using maximum likelihood: Methods and packages

The general approach to performing distribution fitting with maximum likelihood (ML) and a method based on quantiles (quantile maximum probability, QMP) are reviewed and it is shown that QMP has both small bias and good efficiency when used with common distribution functions.

Logarithmic Transformation-Based Gamma Random Number Generators

Developing efficient gamma variate generators is important for Monte Carlo methods. With a brief review of existing methods for generating gamma random numbers, this article proposes two simple gamma

Rejection Sampling for an Extended Gamma Distribution

We propose and analyze rejection samplers for simulating from an extended Gamma distribution. This distribution is supported on (0,∞) and has density proportional to tα−1 exp(−t − 2 √ tγ), where α

Simulating from a gamma distribution with small shape parameter

The gamma distribution with small shape parameter can be difficult to characterize. For this reason, standard algorithms for sampling from such a distribution are often unsatisfactory. In this paper,



Some Simple Gamma Variate Generators

SUMMARY Gamma variates with index a> 1 are produced by combining two adaptations of Kinderman and Monahan's technique for generating random variates by the use of the ratio of uniform variates.

The Monty Python Method for Generating Gamma Variables

The Monty Python Method for generating random variables takes a decreasing density, cuts it into three pieces, then, using area-preserving transformations, folds it into a rectangle of area 1. A

Non-Uniform Random Variate Generation

This chapter reviews the main methods for generating random variables, vectors and processes in non-uniform random variate generation, and provides information on the expected time complexity of various algorithms before addressing modern topics such as indirectly specified distributions, random processes, and Markov chain methods.

The Monty Python method for generating random variables

We suggest an interesting and fast method for generating normal, exponential, t, von Mises, and certain other important random variables used in Monte Carlo studies. The right half of a symmetric

Squeeze Methods for Generating Gamma Variates

Two algorithms are given for generating gamma distributed random variables, valid when the shape parameter is greater than one, which use a uniform majorizing function for the body of the distribution and exponential majorizing functions for the tails.

Generating gamma variates by a modified rejection technique

A modification of the rejection technique begins by sampling from the normal distribution, being able to accept and transform the initial normal observation quickly at least 85 percent of the time.

A Fast, Easily Implemented Method for Sampling from Decreasing or Symmetric Unimodal Density Functions

A new method is described, suitable for any decreasing or symmetric unimodal density, that is faster and more easily implemented, thereby providing a standard procedure for developing both the fast and the slow part for many given densities.

The exact-approximation method for generating random variables

Abstract A suitably chosen approximation to the inverse of a probability distribution can lead to exact and very fast methods for generating random variables, if the approximation is made exact by

The Ziggurat Method for Generating Random Variables

We provide a new version of our ziggurat method for generating a random variable from a given decreasing density. It is faster and simpler than the original, and will produce, for example, normal or

The squeeze method for generating gamma variates