- #1

evinda

Gold Member

MHB

- 3,836

- 0

Suppose that $X$ has the uniform distribution on the interval $[0,2]$ and $Y$ has the uniform distribution on the interval $[2,4]$. If $X,Y$ are independent, I want to find the probability that the difference $Y-X$ is $\leq 1$.

I have thought the following.The density function of $X$ is

$$p_1(x)=\left\{\begin{matrix}

\frac{1}{2} &, 0 \leq x \leq 2 \\

0 & , \text{ otherwise}

\end{matrix}\right.$$

while the density function of $Y$ is

$$p_2(x)=\left\{\begin{matrix}

\frac{1}{2} &, 2 \leq x \leq 4 \\

0 & , \text{ otherwise}

\end{matrix}\right.$$How can we find the probability that the difference $Y-X$ is $\leq 1$ ? Do we use the above density functions? (Thinking)