From: Georg Brandl Date: Sat, 17 Sep 2011 18:36:28 +0000 (+0200) Subject: Add info from the docstring for random.gammavariate() to the docs. X-Git-Tag: v3.3.0a1~1528^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=73dd7c71f69b234fb1f3944efa1f08969b3ae3cc;p=python Add info from the docstring for random.gammavariate() to the docs. --- diff --git a/Doc/library/random.rst b/Doc/library/random.rst index f0c4add61a..31cb945bd3 100644 --- a/Doc/library/random.rst +++ b/Doc/library/random.rst @@ -163,6 +163,7 @@ be found in any statistics text. The end-point value ``b`` may or may not be included in the range depending on floating-point rounding in the equation ``a + (b-a) * random()``. + .. function:: triangular(low, high, mode) Return a random floating point number *N* such that ``low <= N <= high`` and @@ -191,6 +192,12 @@ be found in any statistics text. Gamma distribution. (*Not* the gamma function!) Conditions on the parameters are ``alpha > 0`` and ``beta > 0``. + The probability distribution function is:: + + x ** (alpha - 1) * math.exp(-x / beta) + pdf(x) = -------------------------------------- + math.gamma(alpha) * beta ** alpha + .. function:: gauss(mu, sigma)