Posterior distribution of $\theta$ for density $f(x|\theta) = \theta x^{\theta - 1}$ and prior $Gamma(a,b)$

1.2k Views Asked by At

I'm having trouble solving the following problem:

Suppose $x$ is a random variable with distribution $f(x|\theta) = \theta x^{\theta - 1}$, you observe a sample of $x$ with size $n$ and $\theta$ have a prior distribution $Gamma(a,b)$. Find the posterior distribution of $\theta | x$.

These are my results:

$p(\theta|x) \propto p(X_1,...,X_{n}|\theta)p(\theta) \propto \theta^{a-1}e^{-b\theta}\theta^{n} \prod_{i=1}^{n}x_{i}^{\theta - 1} =\theta^{n+a-1}e^{-b\theta}\prod_{i=1}^{n}x_{i}^{\theta - 1} $

My doubt is:

How does the last equation from right become a $Gamma(n+a,b \sum^{n}_{i=1}\log x_{i})$?

2

There are 2 best solutions below

0
On BEST ANSWER

Simply note that $$\theta^{n+a-1}e^{-b\theta}\prod\limits_{i=1}^{n}x_{i}^{\theta-1} = \theta^{n+a-1}e^{-b\theta}\exp\left(\ln\left(\prod\limits_{i=1}^{n}x_{i}^{\theta-1}\right)\right)= \theta^{n+a-1}\exp\left(-b\theta+\sum\limits_{i=1}^{n}\ln(x_{i}^{\theta-1})\right)\propto \theta^{\alpha-1}e^{-\theta\beta}$$ with $$ \alpha=a+n,\qquad\beta=b-\sum\limits_{i=1}^n\ln(x_{i}). $$

2
On

Tip: write $$ \prod_{i=1}^{n} ... $$ as $$ \exp \log \left( \prod_{i=1}^{n} ... \right). $$ And remember $$\log \left( \prod_{i=1}^{n} ... \right) = \sum_{i=1}^{n} \log(...)$$