# Sum of exponential random variables follows Gamma, confused by the parameters

I've learned sum of exponential random variables follows Gamma distribution.

But everywhere I read the parametrization is different. For instance, Wiki describes the relationship, but don't say what their parameters actually mean? Shape, scale, rate, 1/rate?

Exponential distribution: $x$~$exp(\lambda)$ $$f(x|\lambda )=\lambda {{e}^{-\lambda x}}$$ $$E[x]=1/ \lambda$$ $$var(x)=1/{{\lambda}^2}$$

Gamma distribution: $\Gamma(\text{shape}=\alpha, \text{scale}=\beta)$ $$f(x|\alpha ,\beta )=\frac{1}{{{\beta }^{\alpha }}}\frac{1}{\Gamma (\alpha )}{{x}^{\alpha -1}}{{e}^{-\frac{x}{\beta }}}$$ $$E[x]=\alpha\beta$$ $$var[x]=\alpha{\beta}^{2}$$

In this setting, what is $\sum\limits_{i=1}^{n}{{{x}_{i}}}$? What would the correct parametrization be? How about extending this to chi-square?

• As a rough-and-ready rule of thumb, probabilists tend to use $\Gamma(t,\lambda)$ to denote a Gamma distribution with mean $\frac{t}{\lambda}$ (that is, $f(x) = \frac{\lambda}{\Gamma(t)}\cdot (\lambda x)^{t-1}\exp(-\lambda x)\mathbf 1_{(0,\infty)}$ while statisticians tend to use $\Gamma(\alpha,\beta)$ to denote a Gamma random variable with mean $\alpha\beta$, not $\alpha/\beta$ the way you have it. Wikipedia describes both conventions. May 6, 2012 at 21:32
• sorry, you are correct. May 6, 2012 at 21:43
• Two hints: 1. remember to check by dimensionality consistency. (eg. does the parameter have the same dimensionality of $x$, or its recyprocal...?) 2. because here the parameter of the gamma is an integer, it might be slightly easier to use plain factorials, and the Erlang distribution (of course, it's the same) May 6, 2012 at 21:44
• @edwin So please edit your question to correct the expressions for mean and variance. May 6, 2012 at 21:47
• @DilipSarwate edited! May 6, 2012 at 21:52

The sum of $n$ independent Gamma random variables $\sim \Gamma(t_i, \lambda)$ is a Gamma random variable $\sim \Gamma\left(\sum_i t_i, \lambda\right)$. It does not matter what the second parameter means (scale or inverse of scale) as long as all $n$ random variable have the same second parameter. This idea extends readily to $\chi^2$ random variables which are a special case of Gamma random variables.

• The thing that confuses me is some books write $exp(\lambda)$ where $\lambda$ is the rate, while others meant 1/rate. Is there a consistent notation? Unless I see the pdf, I will not know what they mean. May 6, 2012 at 22:25
• If you think that is confusing, wait till you encounter normal random variables. There are at least three different interpretations of $X \sim N(\mu,s)$ that statisticians use. May 7, 2012 at 0:57
• lol, that is just ruining innocent souls that want to study the subject. I personally think that is just poorly written on the author's part, at the same time, I do agree that I need to adapt the ability to spot wrong things. But still, not when I am taking baby steps. May 7, 2012 at 1:42
• Oh well, as the author of the Answer to the other Question, I am disappointed that you think that that Answer is poorly written. Suggestions for improving it are most welcome. May 7, 2012 at 1:51
• I am not referring to your link. May 7, 2012 at 3:09

The sum of $n$ iid exponential distributions with scale $\theta$ (rate $\theta^{-1}$) is gamma-distributed with shape $n$ and scale $\theta$ (rate $\theta^{-1}$).

• So, if an event such as time for a webpage to process a hit request was exponentially distributed, Gamma might be used to model the time it takes to process x hit requests? (Assumes only 1 hit could be processed at a time, which is an illustrative assumption but not a practical/plausible one.) Oct 8, 2021 at 18:06
• @jbuddy_13 Yes. Oct 8, 2021 at 18:38
• So, a Gamma dist is both an rv and a process (collection of rvs indexed over time or space.) I always figured it was one or the other, but sounds like a process is a special type of rv. Oct 8, 2021 at 19:10

gamma distribution is made of exponential distribution that is exponential distribution is base for gamma distribution. then if $f(x|\lambda)=\lambda e^{−\lambda x}$ we have $\sum_n x_i \sim \text{Gamma}(n,\lambda)$, as long as all $X_i$ are independent.

$$f(x|\alpha,\beta)=\frac{\beta^α}{\Gamma(\alpha)} \cdot x^{\alpha−1} \cdot e^{−x\beta}$$

• I formatted the maths part of your answer. Please check if this is still what you wanted to express.
– Andy
Aug 3, 2015 at 8:42
• Your assertion $\sum x_i \sim \text{Gamma}(n,\lambda)$ is incorrect unless you qualify it by insisting that the $x_i$ are independent random variables. Aug 3, 2015 at 12:19