# Calc-Based Stats, Prove a Conditional Distribution is Gamma Distributed

1. Apr 13, 2012

### aleph_0

1. The problem statement, all variables and given/known data

An image of the assigned problem is here: http://imgur.com/aYkaM

2. Relevant equations

The formula for being exponential, gamma, and probably Bayes's Law. They'd take a while to type out, and presumably anyone who can help me with this already knows the formulas or will understand them by looking at my solution thus far.

3. The attempt at a solution

$P(X_{1}=x_{1}, ..., X_{n}=x_{n}|W=w)P(W=w) \quad = \\\\ P(W=w|X_{1}=x_{1}, ..., X_{n}=x_{n})P(X_{1}=x_{1}, ..., X_{n}=x_{n}) \quad \Longrightarrow \\\\ P(W=w|X_{1}=x_{1}, ..., X_{n}=x_{n}) \quad = \quad \frac{P(X_{1}=x_{1}, ..., X_{n}=x_{n}|W=w)P(W=w)}{P(X_{1}=x_{1}, ..., X_{n}=x_{n})} \quad = \\\\ \frac{w^{n}e^{-w(x_{1}+...+x_{n})}\frac{\beta^{t}}{\Gamma (t)}w^{t-1}e^{-\beta w}}{P(X_{1}=x_{1}, ..., X_{n}=x_{n})} \quad = \quad \frac{\beta^{t}}{\Gamma (t) P(X_{1}=x_{1}, ..., X_{n}=x_{n})}{w^{t+n-1}e^{-w(\beta + \sum_{i=1}^{n}x_{i})}}$

Now at this point I feel like I've gone most of the way, but the only thing is the "coefficient". For this to be a true gamma distribution with the said parameters, that front factor needs to be $\frac{(\beta+\sum x_{i})^{t+n}}{\Gamma(t+n)}$ and I just can't see how to make that happen.
1. The problem statement, all variables and given/known data

2. Relevant equations

3. The attempt at a solution

2. Apr 13, 2012

### Ray Vickson

$$P(X_1=x_1,\ldots,X_n=x_n) = \int P(X_1=x_1,\ldots,X_n=x_n|w) f_W(w) \, dw.$$ Just do the integral.

RGV