# Finding which distribution the posterior is

I'm trying to teach myself Bayesian statistics and am currently trying find the posterior distribution on the following problem:

Suppose $$X_1,...,X_n$$ are iid exponential random variables, with density $$f(x;\theta) =\theta e^{-\theta x}$$ ,and let us suppose that we have a prior on $$\theta$$ with density $$\theta^{\alpha -1}e^{-\beta \theta}$$

Now, to find the posterior, we do Likelihood times Prior. The likelihood is given by

$$\theta^n e^{-n^2\theta \bar{x}}$$

So that we have

$$\theta^{\alpha -1}e^{-\beta \theta}\theta^n e^{-n^2\theta \bar{x}}=\theta^{n+\alpha-1}e^{-n^2 \theta \bar{x} - \beta \theta}$$

And in the textbook I am reading, from here you are meant to deduce the posterior distribution, but I cannot see an obvious distribution. Have I made an error? Can the posterior density function contain the random variable (x in this case)?

• The posterior on $\theta$ is the conditional on $x$, so it is natural to find $x$ in the density. Oct 18, 2020 at 5:57
• @Xi'an do we still treat $x$ as a random variable in this case? Has it been observed as the posterior is conditional on $x$?
– Bill
Oct 18, 2020 at 9:06

Your likelihood should have $$n$$ instead of $$n^2$$. Anyway, the function you found is proportional to the pdf of a Gamma Distribution.