Gamma ===== The gamma distribution has a probability density function defined by .. math:: :label: eqn-random-gamma-pdf f_X(x;\alpha,\beta) = \begin{cases} \frac{ x^{\alpha-1} }{ \Gamma(\alpha) \beta^\alpha } e^{-x / \beta} & x \ge 0 \\ 0 & \text{else}. \end{cases} .. qplot:: random random/random.c :args: -d gamma -A 4.5 -B 1 :width: 80% :name: fig-gamma :caption: Gamma distribution with :math:`\alpha=4.5` and :math:`\beta=1` Interface ~~~~~~~~~ Gamma random number generator interface: .. code-block:: c // generate gamma random variable float randgammaf(float _alpha, float _beta); // compute a gamma probability density float randgammaf_pdf(float _x, float _alpha, float _beta); // compute a gamma cumulative distribution float randgammaf_cdf(float _x, float _alpha, float _beta);