4
$\begingroup$

Let $\{y_i:i=1,...n\}$ be a random sample from $Ga(\theta,2)$, and the prior for $\theta$ is also from a $Ga(\bar{\theta},\nu)$. I'm using the $scale=\theta$, $shape=2$ parametrization.

$f(y_i|\theta,2)=\frac{1}{\Gamma(2)\theta^2}y_i^{2-1}e^{-y_i/\theta}$, for $y_i>0$.

I'm trying to find the posterior density $f(\theta|y)$. However, what I get is $f(\theta|y) \propto \theta^{\nu -2n-1}\ e^{-\sum y_i /\theta - \theta/\bar{\theta}}$.

I know that this is supposed to be a gamma, but I do not see how I can work with the power of the exponential to get what we need for it to be a gamma...

EDIT: If I use the rate/shape parametrization, $f(y_i|\theta,2)=\frac{\theta^2}{\Gamma(2)}y_i^{2-1}e^{-y_i\theta}$, I can easily get a posterior gamma. This seems to be dependent on the parametrization ?!

$\endgroup$
5
  • 1
    $\begingroup$ Why do you think it should be another Gamma? According to wikipedia the Gamma distribution is the conjugate prior when you know the shape parameter, not the rate parameter. Here is a link to the wiki table: en.wikipedia.org/wiki/Conjugate_prior $\endgroup$ – RustyStatistician Feb 20 '16 at 16:22
  • $\begingroup$ So in your case, it wont be another Gamma distribution. Just some unknown distribution. $\endgroup$ – RustyStatistician Feb 20 '16 at 16:23
  • 1
    $\begingroup$ Sorry I just re-read your title. So you are assuming in the title that you know the shape parameter, however, the way you question in written indicates that you don't know the shape parameter, but rather, you know the rate parameter. I.e., in your problem, your rate is $\theta$ and the shape is 2. Maybe you have those switched? $\endgroup$ – RustyStatistician Feb 20 '16 at 16:26
  • $\begingroup$ @Xi'an Thanks for your comment. You speak of scale, but according to wiki you're writing the densities in the shape/rate parametrization. No? $\endgroup$ – An old man in the sea. Feb 20 '16 at 19:00
  • $\begingroup$ @RustyStatistician I've edited the question. I hope it's clearer. $\endgroup$ – An old man in the sea. Feb 20 '16 at 19:04
2
$\begingroup$

This issue is connected with the two ways of parametrising the second parameter θ of a Gamma $\mathcal{G}(\nu,\theta)$ distribution, scale versus rate.

If the rate θ is unknown, and if you have a sampling density of the form $$f(x|θ,ν)=\dfrac{θ^νx^{ν−1}}{Γ(ν)}\exp\{−θx\}\,,$$ the conjugate prior is $\theta\sim\mathcal{G}(\alpha,\beta)$ with posterior $$\theta|x\sim \mathcal{G}(\alpha+\nu,\beta+x)$$

Or the scale $\theta$ is unknown, with sampling density of the form $$f(x|θ,ν)=\dfrac{θ^{-ν}x^{ν−1}}{Γ(ν)}\exp\{−x/θ\}$$ then the conjugate prior is inverse Gamma, meaning that $\theta^{-1}$ is a $\mathcal{G}(\alpha,\beta)$ variable. The posterior is then again an inverse Gamma, with parameters $\alpha+\nu$ and $\beta+x$, exactly as above! Which makes perfect sense when realising this is just a matter of reparameterisation!

$\endgroup$
1
  • $\begingroup$ @Xian, thx for the answer. Just to make sure, in the posterior distribution you've mentioned $$ \theta|x \sim Gamma(\alpha + \nu, \beta+x) $$ $\beta$ is the #of samples, and $\alpha = \Sigma_i x_i$ correct? If so, what bothers me is that the hyper parameters of the posterior are growing indefinitely. Since I'm repeatedly calculating the posterior distribution for every evidence batch, I would like to normalize my hyper parameters. How do you I do that? Thx, Elior. $\endgroup$ – Elior Malul Oct 31 '18 at 7:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.