Gamma Distribution and Life of Component? I came across an old exam question as follows:
If the life of one computer component (in years) has Gamma distribution with mean $6$ and variance $18$, how can we find the probability that this component has a lifetime of at least $9$ years? 
What is the method of solving such question? 
The last answer is $4e^{-3}$. I think my book is wrong, any hint or idea? 
 A: Your translation looks correct. 
As you know, the Gamma distribution has two parameters and may be parameterized in two different ways. I believe the most prevalent one is the scale parameterization and indeed, this gives the required answer for your question.
Now you are given the values of the mean and the variance. These values are functions of the parameters and two equations is all we need to recover them. It is an easy exercise to show that for the scale parameterization $\mu=k \theta$ and $\sigma^2=k\theta^2$. 
Solving simultaneously, one gets $k=2$ and $\theta=3$. And now you have you all you need to compute the required probability. Inserting these values into the density 
$$f_X(x)=\begin{cases} \frac{x^{k-1}}{\Gamma(k) \theta^{k}} e^{-\frac{x}{\theta}} & 0<x<\infty \\ 0 & \text{otherwise} \end{cases} $$
the required probability turns out to be 
$$P\left(X\geq 9 \right)=\int_{9}^{\infty} f_X (x) \mathrm{dx}=\int_{9}^{\infty} \frac{x}{9} e^{-\frac{x}{3}}\mathrm{dx}=\frac{1}{9} \int_{9}^{\infty} x e^{-\frac{x}{3}} \mathrm{dx} $$
We will use integration by parts to evaluate this integral. If we let $u=x$ and $dv=e^{-\frac{x}{3}}$ and for now leaving out the $\frac{1}{9}$ factor what we get is $$\int_{9}^{\infty} x e^{-\frac{x}{3}} \mathrm{dx}=-3 xe^{-\frac{x}{3}} \Big|^{\infty}_{9}+3\int_{9}^{\infty} e^{-\frac{x}{3}}\mathrm{dx}=27e^{-3}-3e^{-\frac{x}{3}} \Big|_{9}^{\infty}=36 e^{-3}$$
And multiplying by $\frac{1}{9}$ we get $4e^{-3}$ or $0.199$, as required.
R can help you with the calculations 
1-pgamma(9,shape=2,scale=3)
[1] 0.1991483

but be sure to specify the scale argument, otherwise it defaults to rate and the answer is misleading.
Hope this helps!
