Skip to main content

gammaNoise

gammaNoise (a [,b ])

The gammaNoise function returns a pseudo-random value from the gamma distribution

f(x)=xa1exp(xb)baΓ(a),x>0,a>0,b>0,\displaystyle f(x)=\frac{x^{a-1} \exp \left(-\frac{x}{b}\right)}{b^{a} \Gamma(a)}, \quad x>0, a>0, b>0,

whose mean is ab and variance is ab2. For backward compatibility you can omit the parameter b in which case its value is set to 1. When a→1 gammaNoise reduces to expNoise.

The random number generator initializes using the system clock when Igor Pro starts. This almost guarantees that you will never repeat a sequence. For repeatable "random" numbers, use SetRandomSeed. The algorithm uses the Mersenne Twister random number generator.

References

Marsaglia, G., and W. W. Tsang, ACM, 26, 363-372, 2000.

See Also

SetRandomSeed, Noise Functions, Statistical Analysis