Gamma Distribution and Probability The lifetimes of batteries are independent exponential random variables, each having parameter λ. A flashlight needs 2 batteries to work. If one has a flashlight and a stockpile of n batteries, what is the distribution of time that the flashlight can operate?
My friend said this was a gamma distribution with parameters (n/2, λ). But what does that even mean? I honestly have no idea where to begin. I know the distribution for an exponential random variable, $λe^{-λx}$, but other than that, not much. Help
 A: If $X$ and $Y$ are independent $\mathrm{Exp}(\lambda)$ random variables, then for any $t>0$,
$$\mathbb P(X\wedge Y>t) = \mathbb P(X>t, Y>t) = \mathbb P(X>t)\mathbb P(Y>t)=e^{-2\lambda t}, $$
so $X\wedge Y$ has $\mathrm{Exp}(2\lambda)$ distribution (here $\wedge$ denotes $\min$). The time until the flashlight needs a replacement battery has this distribution. 
Since the flashlight requires two batteries, and one battery at a time fails, from the memoryless property of the exponential distribution, the total lifetime of the flashlight is the sum of $n-1$ $\mathrm{Exp}(2\lambda)$ random variables, i.e. follows the gamma distribution with parameters $n-1$ and $2\lambda$. The probability density would be
$$f(t) = \frac{(2\lambda)^{n-1}}{(n-2)!}t^{n-2}e^{-2\lambda t}, \quad t>0. $$
A: The exponential distribution is often used as a model for the waiting time until failure of a part.  If you replace the part with a new part with it fails, which has the same exponential distribution and fails independently of the first part, then the waiting time until failure of the two parts in succession is not exponentially distributed -- it is a sum of two independent identically distributed exponential variables.  Similarly, the waiting time until the failure of $n$ parts in succession is a sum of $n$ exponential variables.  The sum of $n$ such variables has a distribution function known as a gamma distribution.
The gamma distribution is determined by two parameters. In the most general case, these parameters can be positive real numbers, but then the density function for the gamma distribution is hard to describe.  In the case of successive waiting times, the first parameter $n$ is a positive whole number, and the density function is easier to describe: the gamma density function with parameters $n$ and $\lambda$ is
$\frac{\lambda^n}{(n-1)!} x^{n-1} e^{-\lambda x}, \quad x>0$
Note that when $n=1$, this is exactly the exponential density function you gave.  It is good to check consider the case $n=2$ to begin to understand the gamma density.  You should be able to check in that case, using integration by parts, that the integral of the density function is $1$.
Now if the time to expiration of a given pair of batteries was exponentially distributed with mean time to failure $1/\lambda$, then your friend would be right (in the case $n$ is even).  But because you will take out a dead battery and replace it while the other one is left in, this example is not gamma distributed with parameters $n/2$ and $\lambda$.
