I've been given a problem and I'm not entirely sure how to approach it, I'm aware of the basics like $Posterior ∝ Likelihood × Prior$ etc. but I'm not sure what steps to take here to solve the below problem.
Any help would be greatly appreciated,
Thanks,
MathewG
The exponential distribution is often used to model a continuous positive random variable measured on a time scale. Assume that the random variable $y$ follows an exponential distribution with rate parameter $θ$. Hence, $y ∼ Exp(θ)$ with probability density function
$$f (y|θ) = θ\exp(−θy),\ y > 0\, θ > 0.$$
In order to perform inference about $θ$ in the Bayesian framework, a researcher has adopted a Gamma prior distribution for $θ, θ ∼ Gamma(a, b)$, with probability density function
$$π(θ) = b^a/\Gamma(a)*θa−1exp (−b θ),\ θ > 0,$$
in which $a$ and $b$ are known positive constants and $Γ(a)$ is the Gamma function. It can be shown that $E [θ] = a/b$ and $Var [θ] = a/b^2$
Using this information how would you determine $π(θ | y)$, the posterior probability density function of θ and then show that $$θ | y ∼ Gamma(a + 1, b + y)$$
It is very simple.
That is all you have to do to finish your exercise:
$$\pi(\theta)\propto \theta^{a-1}e^{-b \theta}$$
$$p(y|\theta)=\theta e^{-\theta y}$$
$$\pi(\theta|y)\propto \theta^a e^{-\theta(b+y)}$$
where you immediately recognize the kernel of a $Gamma(a+1;b+y)$$
Just for the sake of completeness, you can write the exact posterior density, with the normalization constant required
$$\pi(\theta|y)=\frac{(b+y)^{a+1}}{\Gamma(a+1)}\theta^{(a+1)-1}e^{-\theta(b+y)}$$