3
$\begingroup$

I'm now learning Bayesian inference.This is one of the questions I'm doing.

Suppose we have R.V.s $X_1,X_2,\ldots,X_n$ each have an Exponential distribution with parameter $\theta$. and prior for $\theta$ is an Exponential distribution with parameter $\lambda$. So what would you do to find posterior?

Attempts: Prior should be PDF of exponential with parameter $\lambda$. Likelihood should be product of PDF of exponential of each $X_i$, with parameter $\theta$.

Then what would you do next?

Many thanks.

$\endgroup$
1
$\begingroup$

By definition, for every $x=(x_1,\ldots,x_n)$, $$f(\theta\mid x)\propto f(x\mid\theta)f(\theta)=\theta^n\mathrm e^{-s\theta}\cdot\lambda\mathrm e^{-\lambda\theta}\propto\theta^n\mathrm e^{-(s+\lambda)\theta},$$ where $s=x_1+\cdots+x_n$. For every positive $z$, $$ \int_0^{+\infty}\theta^n\mathrm e^{-z\theta}\mathrm d\theta=\frac{n!}{z^{n+1}}, $$ hence $$ f(\theta\mid x)=\frac1{n!}(s+\lambda)^{n+1}\theta^n\mathrm e^{-(s+\lambda)\theta}, $$ that is, $f(\ \mid x)$ is the Gamma $(n+1,s+\lambda)$ distribution.

$\endgroup$
  • $\begingroup$ Thanks,great explanations! by the way, as all those Xi are random variables, how could "s" make sense in the gamma distribution? or the xi here in fact means observed xis? $\endgroup$ – user122010 Mar 5 '13 at 17:59
  • $\begingroup$ Indeed $x$ is the observed sample. $\endgroup$ – Did Mar 5 '13 at 18:01
0
$\begingroup$

Use the fact that: $$ f(\theta|x_1,...,x_n)=\frac{L(\theta)*p(\theta)}{\int_{-\infty}^\infty L(\theta)*p(\theta)d\theta}$$ Where $L(\theta)$ is the likelihood function, $p(\theta)$ is the prior, and $f(\theta|x_1,...,x_n)$ is the posterior distribution.

In this case, you have that: $$ f(\theta|x_1,...,x_n)=\frac{\theta^ne^{-\theta \sum_{i=1}^nX_i}*\lambda e^{-\lambda\theta}}{\int_0^\infty \theta^ne^{-\theta \sum_{i=1}^nX_i}*\lambda e^{-\lambda\theta} d\theta}$$

$\endgroup$

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.