Joint distribution of gamma and exponential distributed rv

expected valueprobabilityprobability distributions

I am trying to solve this:

The variable $\alpha$ has a $\Gamma(\gamma,\beta)$ distribution, i. e. density
$$ f(x) = \frac{\beta^\gamma}{ \Gamma(γ)} x^{\gamma−1}e^{−\beta x} \, \mathbb{I}_{x>0} \, \text{and} \, \gamma,\beta > 0 . $$

Remember that the gamma function $\Gamma(\gamma) = \int_{0}^{\infty} x^{\gamma-1}e^{-x} dx$ has the property $\Gamma(\gamma + 1) = \gammaΓ(\gamma)$. Given $\alpha$, the variable $X$ is exponentially distributed with parameter $\alpha$, i. e. density $\alpha e^{-\alpha x} \, \mathbb{I}_{x>0}$.

a) Determine the boundary distribution of $X$ and calculate the mean and variance of $X$.

b) $X = x$ is observed. Determine the conditional Distribution of $\alpha$ given $X = x$.

I try to compute a) the hint is, that the mean is $\frac{\beta}{\gamma -1}$

I started to calculate the boundary Distribution aof $X$:
$$ f_{X} = \int_{0}^{\infty}\frac{\beta^{\gamma}}{\Gamma(\gamma)} \alpha^{\gamma} e^{-\alpha(\beta+x)} d\alpha = \int_{0}^{\infty} \frac{\beta^{\gamma}}{\Gamma(\gamma)} \frac{\Gamma(\gamma+1)}{\Gamma(\gamma+1)}
\frac{(x+\beta)^{\gamma+1}}{(x+\beta)^{\gamma+1}} \alpha^{\gamma} e^{-\alpha(\beta+x)} d\alpha = \frac{\beta^\gamma}{\Gamma(\gamma)} \frac{\Gamma(\gamma+1)}{(x+\beta)^{\gamma+1}} \int_{0}^{\infty} \frac{(x+\beta)^{\gamma+1}}{\Gamma(\gamma+1)} \alpha^\gamma e^{-\alpha(x+\beta)} d\alpha = \frac{\beta^\gamma}{\Gamma(\gamma)} \frac{\gamma\Gamma(\gamma)}{(x+\beta)^{\gamma+1}} = \gamma\beta^\gamma (x+\beta)^{-(\gamma+1)}$$

Now wehn i start to calculate the mean i get:

$$ \mathbb{E}[X] = \int_{0}^{\infty} x \gamma\beta^\gamma (x+\beta)^{-(\gamma+1)} dx = \gamma \beta^\gamma \bigg[ -x(\beta+x)^{-\gamma} \bigg\vert_{0}^{\infty} + \int_{0}^{\infty} (x+\beta)^{-\gamma} dx \bigg] =-\frac{\gamma \beta^\gamma}{(\gamma-1)\beta^{\gamma-1}} = -\frac{\gamma\beta}{(\gamma-1)}$$

something went wrong and i dont know where my mistake is. Does someone see my mistake and could explain me, how the mean could be $\frac{\beta}{\gamma-1}$?

And Maybe someone has a idea for b). I would try to put it in the Definition of the conditional Distribution but i am really sure, that i would have problems doing it.

Thank you in Advance!

Best Answer

Integration by parts with the choice $$u = x, \quad du = dx, \\ dv = (x+\beta)^{-(\gamma+1)} \, dx, \quad v = -\frac{(x+\beta)^{-\gamma}}{\color{red}{\gamma}},$$ shows where you have an extra factor of $\gamma$. Your sign error occurs from the integration of the remaining part: $$\int_{x=0}^\infty (x+\beta)^{-\gamma} \, dx = \int_{x=\beta}^\infty x^{-\gamma} \, dx = \left[\frac{x^{-\gamma+1}}{-\gamma+1}\right]_{x=\beta}^\infty = 0 - \frac{\beta^{-\gamma+1}}{-\gamma+1} = \frac{\beta^{-\gamma} \beta}{\gamma - 1}, \quad \gamma > 1.$$

It is worth noting that your use of integration by parts is unnecessary: knowing that your answer to the first part $$f_X(x) = \frac{\gamma \beta^\gamma}{(x+\beta)^{\gamma+1}}$$ is a density for parameters $\gamma, \beta > 0$, then the expectation $$\operatorname{E}[X+\beta] = \int_{x=0}^\infty (x+\beta) f_X(x) \, dx = \frac{\gamma \beta}{\gamma-1} \cdot\int_{x=0}^\infty \frac{(\gamma-1) \beta^{\gamma-1}}{(x+\beta)^\gamma} \, dx = \frac{\gamma \beta}{\gamma - 1}.$$ Then since $$\operatorname{E}[X + \beta] = \operatorname{E}[X] + \beta,$$ we subtract and obtain $$\operatorname{E}[X] = \left( \frac{\gamma}{\gamma - 1} - 1 \right) \beta = \frac{\beta}{\gamma - 1}.$$

For part (b), use Bayes' rule: $$f_{A \mid X}(\alpha) = \frac{f_{X \mid A}(x) f_X(x)}{f_A(\alpha)}.$$ The numerator is simply the joint density $$f_{X,A}(x,\alpha).$$ The denominator you already have. The point is that you only need to recognize the kernel of the joint density.

Related Question