Cross Validated
2022-05-29 18:22 UTC
By Will Harris
AI-113-20220529-social-media-97e84b73
Posterior distribution with multiple parameters
The data are observations of, $x$ , the length of time in excess of $14$ days that it took for a random sample of $10$ grasshoppers infected with a fungal disease to die, where the times are measured from infection. It is believed that a gamma distribution may be a good model here, so that the p.d.f. of $x$ is $$ f(x) = \frac{\beta^\alpha}{(\alpha-1)!}x^{\alpha-1}e^{-x\beta}\quad x>0. $$ In this case the parameter $\beta$ could be any positive real number, but $\alpha$ can only take positive integer values. Show that a gamma prior for $\beta$ is conjugate. That is, show that if $\beta$ has a gamma prior, then the posterior for $\beta$ is also a gamma distribution. I looked at the solution and I do not understand how the did the very first line. The first line of the solution simply says $$ f(\beta|x)\propto f(x|\beta,\alpha)\pi(\beta).\tag{1} $$ I have tried to see why ( $1$ ) is true and I get nowhere. My first attempt was to do $$ \begin{align*} f(\beta|x)&=\int f(\alpha,\beta|x) d\alpha\\ &= \int \frac{f(x|\alpha,\beta)f(\alpha,\beta)}{f(x)} d\alpha\\ &\propto\int f(x|\alpha,\beta)f(\alpha,\beta) d\alpha\\ &=\int f(x|\alpha,\beta)f(\alpha)f(\beta) d\alpha\\ &=f(\beta)\int f(x|\alpha,\beta)f(\alpha) d\alpha. \end{align*} $$ This doesn't seem to help at all, so I am stuck on how we can get to $(1)$ . Any help would be much appreciated; I am very much struggling with this topic!
The data are observations of, $x$ , the length of time in excess of $14$ days that it took for a random sample of $10$ grasshoppers infected with a fungal disease to die, where the times are measured from infection. It is believed that a gamma distribution may be a good model here, so that the p.d.f. of $x$ is $$ f(x) = \frac{\beta^\alpha}{(\alpha-1)!}x^{\alpha-1}e^{-x\beta}\quad x>0. $$ In this case the parameter $\beta$ could be any positive real number, but $\alpha$ can only take positive integer values. Show that a gamma prior for $\beta$ is conjugate. That is, show that if $\beta$ has a gamma prior, then the posterior for $\beta$ is also a gamma distribution. I looked at the solution and I do not understand how the did the very first line. The first line of the solution simply says $$ f(\beta|x)\propto f(x|\beta,\alpha)\pi(\beta).\tag{1} $$ I have tried to see why ( $1$ ) is true and I get nowhere. My first attempt was to do $$ \begin{align*} f(\beta|x)&=\int f(\alpha,\beta|x) d\alpha\\ &= \int \frac{f(x|\alpha,\beta)f(\alpha,\beta)}{f(x)} d\alpha\\ &\propto\int f(x|\alpha,\beta)f(\alpha,\beta) d\alpha\\ &=\int f(x|\alpha,\beta)f(\alpha)f(\beta) d\alpha\\ &=f(\beta)\int f(x|\alpha,\beta)f(\alpha) d\alpha. \end{align*} $$ This doesn't seem to help at all, so I am stuck on how we can get to $(1)$ . Any help would be much appreciated; I am very much struggling with this topic!
Full article content could not be extracted automatically. Read the original below.
Source:
Cross Validated
· stats.stackexchange.com