1
$\begingroup$

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})$?

$\endgroup$
  • 2
    $\begingroup$ The second parameter of the gamma distribution should be $b-\sum\log x_i$. $\endgroup$ – Did Apr 28 '13 at 8:29
1
$\begingroup$

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}). $$

$\endgroup$
0
$\begingroup$

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(...)$$

$\endgroup$
  • 1
    $\begingroup$ This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. $\endgroup$ – hardmath Apr 28 '13 at 1:54
  • 1
    $\begingroup$ It does provide the answer if the author is willing to give in some effort on his own. And I believe he is, since he provided his partial results. $\endgroup$ – Ferdinand.kraft Apr 28 '13 at 13:53

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.