Gamma distribution¶
Story¶
The amount of time we have to wait for \(\alpha\) arrivals of a Poisson process. More concretely, if we have events, \(X_1, X_2, \ldots X_\alpha\) that are Exponentially distributed, \(X_1 + X_2 + \cdots X_\alpha\) is Gamma distributed.
Example¶
Any multistep process where each step happens at the same rate. This is common in molecular rearrangements. For example, the time it takes for three phosphorylation events have to happen, assuming all phosphorylation events happen at the same rate, is Gamma distributed.
Parameters¶
The number of arrivals, \(\alpha\), and the rate of arrivals, \(\beta\).
Support¶
The Gamma distribution is supported on the set of positive real numbers.
Probability density function¶
Moments¶
Mean: \(\displaystyle{\frac{\alpha}{\beta}}\)
Variance: \(\displaystyle{\frac{\alpha}{\beta^2}}\)
Usage¶
Package 
Syntax 

NumPy 

SciPy 

Stan 

Notes¶
The Gamma distribution is useful as a prior for positive parameters. It imparts a heavier tail than the HalfNormal distribution (but not too heavy; it keeps parameters from growing too large), and allows the parameter value to come close to zero.
The SciPy implementation has a location parameter, which should be set to zero, with \(1/\beta\) being the scale parameter.