# $E[\frac{1}{X}]$ for $X\sim\Gamma(n,\theta)$

Consider iid random varibales $$(X_i)_{1\le i\le n}$$ with $$X_i\sim Exp(\theta)$$ for $$1\le i\le n$$ and $$\theta\in(0,\infty)$$. Then we have $$\sum_{i=1}^nX_i\sim \Gamma(n,\theta)$$ with density function

$$f(x)=\frac{\theta^n}{(n-1)!}x^{n-1}e^{-\theta x}\mathbb{1}_{[0,\infty)}(x).$$

Now I want to calculate

\begin{align}E\Bigg[\frac{1}{\frac{1}{n}\sum_{i=1}^nX_i}\Bigg]=n\cdot E\Bigg[\frac{1}{\sum_{i=1}^nX_i}\Bigg]&=n\cdot\int_{0}^\infty \frac{1}{x}\frac{\theta^n}{(n-1)!}x^{n-1}e^{-\theta x} dx\\ &=\frac{n\theta^n}{(n-1)!}\cdot\int_{0}^\infty x^{n-2}e^{-\theta x} dx,\end{align}

but I do not know where I have to go from here.

I know the antiderivate of $$x^{n-2}e^{-x}$$, but I do not know how to deal with $$x^{n-2}e^{-\theta x}$$. Can someone give me a hint?

• Change of variables? $\theta x = y$. – d.k.o. Nov 5 '18 at 23:33
• Yes, that's what I was looking for. Thank you! – user408858 Nov 5 '18 at 23:54

Use the fact that $$\int_0^\infty x^m e^{-ax}\,dx=\frac{\Gamma(m+1)}{a^{m+1}}$$ In your case, you would get \begin{align}\frac{n\theta^n}{(n-1)!}\int_0^\infty x^{n-2} e^{-\theta x}\,dx& =\frac{n\theta^n}{(n-1)!}\frac{\Gamma(n-1)}{\theta^{n-1}} \\ &= \frac{n\theta}{(n-1)!}(n-2)! \\ &= \frac{n\theta}{n-1} \end{align}
You don't need to go into calculus for this one. We will use the Gamma pdf instead. I'll continue from where you stopped: $$\frac{n\theta^n}{(n-1)!}\cdot\int_{0}^\infty x^{n-2}e^{-\theta x} dx=\frac{n\theta}{(n-1)}\frac{\theta^{n-1}}{((n-1)-1)!}\cdot\int_{0}^\infty x^{(n-1)-1}e^{-\theta x} dx=\frac{n\theta}{(n-1)}$$ Since the $$\frac{\theta^{n-1}}{((n-1)-1)!}\cdot\int_{0}^\infty x^{(n-1)-1}e^{-\theta x} dx$$ part is also a Gamma pdf, just with the parameter $$n-1$$ instead of $$n$$, basically specifically $$\Gamma (n-1,\theta)$$, it reduces to just $$1$$
Set $$Y=X_1+\dots+X_n$$.
1. Use the identity $$\frac{1}{y} = \int_0^\infty e^{-s y} ds$$ to obtain \begin{align*} E [ 1/Y] &= E [\int_0^\infty e^{-s Y} ds] \\ & = \int_0^\infty E[e^{-s Y}] ds \\ & = \int_0^\infty E[e^{-s X_1}]^n ds\\ & =\int_0^\infty (\frac{\theta}{\theta+s})^n ds \\ & = \theta^n \int_\theta^\infty u^{-n} du \\ & = \frac{\theta}{n-1} \end{align*}
2. Differentiation under integral sign. \begin{align*} E[1/Y] &= \frac{\theta^n}{(n-1)!} \int_0^\infty \frac{1}{y} y^{n-1} e^{-\theta y} dy\\ & = \frac{\theta^n}{(n-1)!} (-1)^{n-2}\frac{d^{n-2}}{d \theta^{n-2}}\int_0^\infty e^{-\theta y} dy\\ & = \frac{\theta^n}{(n-1)!} (n-2)! \theta^{-(n-1)}\\ & = \frac{\theta}{n-1} \end{align*}