¿How can I get a posterior distribution about the uniform distribution?

93 Views Asked by At

Image of the problem in spanish I need to get the posterior distribution for theta parameter: The translate of the image: let $p(x|\theta)=unif(x|0,\theta)$ with unknown theta and a priori distribution on theta given by:

$p_1(\theta)=2(\theta-1)$.

I have tried it but I can't find the correct answer because when I integrate the posterior distribution that I obtain, does not give me 1. Thanks.

EDIT: I tried this: with the Bayes' rule: $$\begin{align}p_2(\theta\mid x)&=\dfrac{p_1(\theta)~p(x\mid\theta)}{\displaystyle\int_\Bbb R p_1(\tau)~p(x\mid\tau)~\mathrm d \tau}\end{align}$$

where $$p(x|\theta) = L(\theta|x_{1},...,x_{n})$$ and then $$L(\theta|x_{1},...,x_{n})=\frac{1}{\theta^{n}}$$

therefore $$p_2(\theta\mid x)=\frac{ 2(\theta-1)\theta^{-n} } {\int_{1}^{2} {2(\tau-1)\tau^{-n}} d\tau} $$

but when I integrate $p_{2}(\theta|x)$ between 1 and 2 the result is different one

1

There are 1 best solutions below

3
On

Just use Bayes' Rule.

$$\begin{align}p_2(\theta\mid x)&=\dfrac{p_1(\theta)~p(x\mid\theta)}{\displaystyle\int_\Bbb R p_1(\tau)~p(x\mid\tau)~\mathrm d \tau}\end{align}$$

Where $$\begin{align}p(x\mid\theta)&=\theta^{-1}~\mathbf 1_{x\in[0;\theta],\theta\in[1;2]}\\[2ex]p_1(\theta)&=2(\theta-1)~\mathbf 1_{\theta\in[1;2]} \end{align}$$

So...

$$\begin{align}p_2(\theta\mid x)&=\dfrac{(1-1/\theta)~\mathbf 1_{\theta\in[1;2],x\in[0;\theta]}}{\int_1^2 (1-1/\tau)~\mathrm d \tau}\\[1ex]&~~\vdots\end{align}$$