7

This isn't exactly a homework problem but rather a self-selected problem I'm doing to prepare for a midterm.

I can see from Wikipedia that it is an inverse gamma but I am unable to reach the posterior suggested by the parameter updates.

The Weibull as given on Wikipedia is:

$f(x_1,..,x_n|\lambda, k)=\frac{k}{\lambda}\left(\frac{x}{\lambda}\right)^{k-1}\text{exp}\left\{-\left(\frac{x}{\lambda}\right)^k\right\}$

Then

$L(\lambda|x_1,\dots, x_n)\propto \prod_x \lambda^{-k}\text{exp}\left\{-\frac{x^k}{\lambda^{k}}\right\}\\ =\lambda^{-nk}\text{exp}\left\{-\frac{\sum_x {x^k}}{\lambda^{k}}\right\}$

The inverse gamma prior is

$P(\lambda|\alpha,\beta)=\frac{\beta^\alpha}{\Gamma(\alpha)}\lambda^{-\alpha-1}\text{exp}\left\{-\frac{\beta}{\lambda}\right\}$

The posterior then is

$P(\lambda|x_1,\dots,x_n)\propto L(\lambda|x_1,\dots, x_n) P(\lambda|\alpha,\beta)\\ =\lambda^{-nk}\text{exp}\left\{-\sum_x {x^k}\lambda^{-k}\right\}\lambda^{-\alpha-1}\text{exp}\left\{-\frac{\beta}{\lambda}\right\}\\ =\lambda^{-nk-\alpha-1}\text{exp}\left\{-\frac{\sum_x {x^k}}{\lambda^{k}}-\frac{\beta}{\lambda}\right\}$

The problem that I am left with is to coerce an update for the $\beta$ hyperparameter that does not contain $\lambda$. The $\alpha$ also looks different from Wikipedia but I am going with explaining that as the difference between the posterior with observations and without, though honestly I'm confused about that as well. Wikipedia simply has the summation, $\sum_x {x^k}$ as the update for $\beta$ and $n$ for the update of $\alpha$ (not $nk$).

All of my efforts so far to coerce that $\beta$ update have failed.

Meadowlark Bradsher
  • 1,003
  • 10
  • 23
  • 4
    The inverse gamma conjugate prior is given for $\lambda^k$, not for $\lambda$. This is, you have to use a different parameterisation: $f(x\vert \lambda, k)=\dfrac{k}{\lambda}x^{k-1}\exp\left(-\dfrac{x^k}{\lambda}\right)$. Please, have a look at page 20 of [this document](http://www.johndcook.com/CompendiumOfConjugatePriors.pdf) by [John D. Cook](http://stats.stackexchange.com/users/319/john-d-cook). –  Oct 02 '12 at 15:30
  • 1
    Thanks that explains everything! Midterm went well incidentally. – Meadowlark Bradsher Oct 04 '12 at 02:39
  • Maybe is too late, but I have a cuestion about pdf's "A compendium..." by John D. Cook, there says that priori distribution is a normal distribution, but I don't think so... could you please tell me if posterior distribution is a normal distribution or a Inverse gamma distribution? Please! :) And thanks! –  Nov 14 '13 at 18:06

0 Answers0