# Finding a posterior distribution of an exponential distribution parameter theta

Suppose that $X_1, ... , X_n$ each have an exponential distribution with parameter $\theta$, and suppose that the prior for $\theta$ is an exponential distribution with parameter $\lambda$. Find the posterior distribution of $\theta$.

I have to solve the above problem but I'm getting stuck. I've calculated the likelihood function $f(x|\theta)$ to be $\theta^nexp(-\theta r)$ where $r$ is the sum of the $x_is$. Then the prior has pdf $\pi (\theta) = \lambda exp(-\lambda\theta)$.

Then I'm getting a posterior which is proportional to $\lambda \theta^n exp(-\theta (\lambda + r))$, but I don't see where to go from here. Usually the posterior looks like a distribution I recognise but here, I'm not sure how to find the normalisation constant.

Any help would be greatly appreciated. Thanks

## 1 Answer

The function you calculated can be written as $$λθ^ne^{-(λ+r)θ}=λθ^{(n+1)-1}e^{-(λ+r)θ}$$ which is (if I am not mistaken) a gamma distribution with shape parameter $n+1$ and scale parameter $θ=(λ+r)^{-1}$.