# 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. – Dilip Sarwate May 6 '12 at 21:32
• sorry, you are correct. – edwin May 6 '12 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) – leonbloy May 6 '12 at 21:44
• @edwin So please edit your question to correct the expressions for mean and variance. – Dilip Sarwate May 6 '12 at 21:47
• @DilipSarwate edited! – edwin May 6 '12 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. – edwin May 6 '12 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. – Dilip Sarwate May 7 '12 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. – edwin May 7 '12 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. – Dilip Sarwate May 7 '12 at 1:51
• I am not referring to your link. – edwin May 7 '12 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}$).

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 '15 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. – Dilip Sarwate Aug 3 '15 at 12:19