Find the posterior density and compute the posterior mean.

304 Views Asked by At

Exercise: Let $X|\Theta = \theta$ have density $\dfrac{2x}{\theta^2}\mathbb{1}_{(0,\theta)}(x)$ and let $\Theta$ have a uniform distribution on $(0,c)$, where $c$ is a (fixed) known positive number. Find the posterior density of $\Theta$ and compute the posterior mean.

What I've tried: The posterior mean is equal to $f_{\Theta|X}(\theta|x) \propto f_{X|\Theta}(x|\theta)\,f(\theta)$. So in this exercise we have that $f_{\Theta|X} \propto \dfrac{2x}{\theta^2}\mathbb{1}_{(0,\theta)}(x) \,\dfrac{1}{c}\mathbb{1}_{(0,c)}(\theta)$. Know that I know the posterior density I can compute the posterior mean which is given by $$\operatorname{E}[\Theta|X] = \displaystyle\int\theta\,f_{\Theta|X}(\theta|x)d\theta = \int\theta\dfrac{2x}{\theta^2}\mathbb{1}_{(0,\theta)}(x) \,\dfrac{1}{c}\mathbb{1}_{(0,c)}(\theta)d\theta = \int\dfrac{2x}{\theta}\mathbb{1}_{(0,\theta)}(x) \,\dfrac{1}{c}\mathbb{1}_{(0,c)}(\theta)d\theta.$$ As you can probably see this doesn't get me very far; when you integrate over $\theta$ you end up with $2x\mathbb{1}_{(0,\theta)}(x)\bigg(\dfrac{1}{c}\log(c) - \dfrac{1}{c}\log(0)\bigg)$, which is undefined because of the $\log(0)$ part.

EDIT: Question: Why doesn't my approach work? I am using all the correct formulas, right?

Thanks in advance!

2

There are 2 best solutions below

2
On BEST ANSWER

$\def\d{\mathrm{d}}$Your expression for $E({\mit Θ} \mid X)$ is correct except for normalization, but the integration goes wrong. In fact, $I_{(0, θ)}(x)$ is neglected when integrating with respect to $θ$, which requires that $θ > x$.

Full answer: First, because $0 < X < {\mit Θ} < c$, then\begin{align*} f_X(x) &= \int_{\mathbb{R}} f_{X \mid {\mit Θ}}(x \mid θ) f_{\mit Θ}(θ) \,\d θ = \int_{\mathbb{R}} \frac{2x}{θ^2} I_{(0, θ)}(x) \cdot \frac{1}{c} I_{(0, c)}(θ) \,\d θ\\ &= \int_{\mathbb{R}} \frac{2x}{θ^2} I_{(x, +\infty)}(θ) \cdot \frac{1}{c} I_{(0, c)}(θ) \,\d θ = \frac{2x}{c} \int_x^c \frac{\d θ}{θ^2}\\ &= \frac{2x}{c} \left( \frac{1}{x} - \frac{1}{c} \right) = \frac{2}{c^2} (c - x). \end{align*} Thus,\begin{align*} E({\mit Θ} \mid X) &= \int_{\mathbb{R}} θ f_{{\mit Θ} \mid X}(θ \mid x) \,\d θ = \frac{1}{f_X(x)} \int_{\mathbb{R}} θ f_{X \mid {\mit Θ}}(x \mid θ) f_{\mit Θ}(θ) \,\d θ\\ &= \frac{c^2}{2(c - x)} \int_{\mathbb{R}} θ \cdot \frac{2x}{θ^2} I_{(0, θ)}(x) \cdot \frac{1}{c} I_{(0, c)}(θ) \,\d θ\\ &= \frac{c^2}{2(c - x)} \int_{\mathbb{R}} θ \cdot \frac{2x}{θ^2} I_{(x, +\infty)}(θ) \cdot \frac{1}{c} I_{(0, c)}(θ) \,\d θ\\ &= \frac{cx}{c - x} \int_x^c \frac{\d θ}{θ} = \frac{cx}{c - x} (\ln c - \ln x). \end{align*}

2
On

$1_{(0,\theta)}(x)$ is non-zero only if $\theta \geq x$. So the integral needs to be done for $\int_x^c$. You would get $\frac{2x}{c}\ln(c/x)$.

You should also normalize the density $f_{\Theta|x}$ so that $\int f_{\theta|x}d\theta = 1$. The details are:

$$f_{\Theta|x} = \frac{\frac{2x}{\theta^2}1_{(0,\theta)}(x)\frac{1}{c}1_{(0,c)}(\theta)}{\int \frac{2x}{\theta^2}1_{(0,\theta)}(x)\frac{1}{c}1_{(0,c)}(\theta) d\theta} = \frac{\frac{2x}{\theta^2}1_{(0,\theta)}(x)\frac{1}{c}1_{(0,c)}(\theta)}{\int_x^c \frac{2x}{c\theta^2} d\theta}= \frac{\frac{2x}{\theta^2}1_{(0,\theta)}(x)\frac{1}{c}1_{(0,c)}(\theta)}{\frac{2(c-x)}{c^2} }.$$ Now, $$\int f_{\Theta|x}d\theta = \frac{\int \theta\frac{2x}{\theta^2}1_{(0,\theta)}(x)\frac{1}{c}1_{(0,c)}(\theta)d\theta}{\frac{2(c-x)}{c^2} } = \frac{\int_x^c \frac{2x}{\theta}d\theta}{\frac{2(c-x)}{c^2} }= \frac{ 2x\ln(c/x)}{\frac{2(c-x)}{c^2} }.$$