Distribution of Uniform Random Variable When Bounds Are Uniform

351 Views Asked by At

Let $X|_{Y=y} \sim U(-y,y)$ and let $Y\sim U(a, b),\space\space a,b\in\mathbb{R_{\ge0}},b>a$. What is the cumulative density function of $X$ when $Y$ is not known?

I know:

$$P(X|_{Y=y}\le x)=\frac{x+y}{2y}$$ $$P(Y\le y)=\frac{y-a}{b-a}$$

but I'm not sure how to get

$$P(X\le x)$$

2

There are 2 best solutions below

6
On BEST ANSWER

Note first that we have $$ P(X\le x \vert \; Y=y) = \begin{cases} 0 &:& x < -y\\ \frac{x+y}{2y} &:& x \in [-y, y)\\ 1 &:& otherwise \end{cases} $$ and $$ f_Y(y) = \begin{cases} \frac{1}{b-a} &:& y \in [a,b]\\ 0 &:& otherwise \end{cases} $$

Then, using the law of total probability we get:

$$\begin{split}P(X\le x) &= \int_{-\infty}^{\infty} P(X\le x \vert \; Y=y)\, f_Y(y)\, dy \\ &= \frac{1}{b-a} \Big( \int_{a}^{b} \mathbb{1}_{x < (- b)} \cdot 0 \;dy + \int_a^b \mathbb{1}_{x \geq b} \; dy \\ &+ \int_a^b \mathbb{1}_{-a \leq x < a} \; \frac{x+y}{2y} \; dy + \int_{-x}^b \mathbb{1}_{-b \leq x < - a} \; \frac{x+y}{2y} \; dy \\ &+ \int_x^b \mathbb{1}_{a \leq x < b} \; \frac{x+y}{2y} \; dy + \int_a^x \mathbb{1}_{a \leq x < b} \; dy \Big) \\\\ &= \frac{1}{b-a} \begin{cases} 0 &:& x < -b \\ F_1(x) &:& -b \leq x < -a \\ F_2(x) &:& -a \leq x < a \\ F_3(x) + F_4(x) &:& a \leq x < b \\ (b-a) &:& b \leq x \end{cases} \end{split}$$ where $$ F_1(x) = \frac{1}{2} (x (ln\vert b \vert - ln\vert x \vert) + b + x) $$ $$ F_2(x) = \frac{1}{2} (x (ln\vert b \vert - ln\vert a \vert) + b - a) $$

$$ F_3(x) = \frac{1}{2} (x (ln\vert b \vert - ln\vert x \vert) + b - x) $$ and $$ F_4(x) = (x-a). $$

0
On

$X\mid Y=y\sim\mathcal U(-y..y)$ and $Y\sim\mathcal U(a..b)$ means that the joint support is: $$\{\langle x,y\rangle:(-b\lt -y\leqslant x\lt -a)\vee(-a\leqslant x\lt a\leqslant y\lt b)\vee(a\leqslant x\leqslant y\lt b)\}$$

Thus: $$\begin{align}f_{X,Y}(x,y) &= \dfrac{1}{2y\,(b-a)}\mathbf 1_{(-b\lt -y\leqslant x\lt -a)\vee(-a\leqslant x\lt a\leqslant y\lt b)\vee(a\leqslant x\leqslant y\lt b)}\\[2ex] f_X(x) &= \int_{-x}^b \dfrac{\mathbf 1_{-b\leqslant x<-a}}{2y\,(b-a)}\mathrm d y+\int_{a}^b \dfrac{\mathbf 1_{-a\leqslant x<a}}{2y\,(b-a)}\mathrm d y+\int_{x}^b \dfrac{\mathbf 1_{a\leqslant x\leqslant b}}{2y\,(b-a)}\mathrm d y \\&=\dfrac{(\ln b-\ln\lvert x\rvert)\mathbf 1_{-b\leqslant x< -a}+(\ln b-\ln a)\mathbf 1_{-a\leqslant x< a}+(\ln b-\ln x)\mathbf 1_{a\leqslant x\leqslant b}}{2(b-a)}\end{align}$$

So therefore $$\begin{align}\mathsf P(X\leqslant x) &=\dfrac{1}{2(b-a)}\begin{cases}0 &:& x < -b\\ F_1(x) &:& -b\leqslant x< -a\\ F_1(-a)+F_2(x) &:& -a\leqslant x< a\\ F_1(-a)+F_2(a)+F_3(x) &:& a\leqslant x < a\\1&:& a\leqslant x \end{cases}\\F_1 (x)&=\int_{-b}^x (\ln b-\ln\lvert s\rvert)\,\mathrm d s\\ F_2(x)&=\int_{-a}^x (\ln b-\ln a)\,\mathrm d s\\F_3(x)&=\int_a^x (\ln b-\ln x)\,\mathrm d s\end{align}$$