Calculating Bayesian posterior with uniform prior

74 Views Asked by At

I am looking to calculate the posterior probability of a pdf with

$$f(x|\theta) = \frac{1}{\theta}I_{0,\theta}(x)$$

and prior $$\pi(\theta) = \frac{3}{5}(\frac{5}{\theta})^4 I_{(5,\infty)}(\theta)$$

The result is supposedly $$\pi(\theta|x) = \begin{cases} \frac{8}{14} (\frac{14}{\theta})^9 & \theta>14\\ 0 & otherwise \end{cases} $$

With prior data as 2,3,9,10,14. Could anyone explain how to get there?

1

There are 1 best solutions below

2
On BEST ANSWER

Let $\mathbf{x}=[2,3,9,10,14]$. The likelihood is $$f(\mathbf{x}|\theta)=\frac{1}{\theta^5}\prod_{k=1}^5\mathbb{I}_{[0,\theta)}(x_k)= \begin{cases} \frac{1}{\theta^5} & \textrm{if } \ \ \theta > 14 \\ 0 & \textrm{if } \ \ \theta \leq 14 \end{cases} $$ This is because if $\theta$ is $14$ or less, at least one indicator is zero so the term becomes zero. $$f(\mathbf{x}|\theta)\pi(\theta)= \begin{cases} \frac{5^3\cdot 3}{\theta^9}\mathbb{I}_{(5,\infty)}(\theta) & \textrm{if } \ \ \theta > 14 \\ 0 & \textrm{if } \ \ \theta \leq 14 \end{cases} $$ The normalizing constant is $$(5^3\cdot 3)\int_{14}^\infty y^{-9}dy=(5^3\cdot 3)\frac{1}{8}14^{-8}=C$$ So we get $$\pi(\theta|\mathbf{x})= \begin{cases} \frac{1}{C}\frac{5^3\cdot 3}{\theta^9}\mathbb{I}_{(5,\infty)}(\theta)=(8\cdot 14^8)\frac{1}{\theta^9}=\frac{8}{14}\frac{14^9}{\theta^9} & \textrm{if } \ \ \theta > 14 \\ 0 & \textrm{if } \ \ \theta \leq 14 \end{cases}$$ We can ignore the indicator because we have a stronger condition with the $\theta > 14.$