$f_{X,Y} \left( x, y \right) = 1\quad \text{for}\quad 0≤x≤1,\ 0≤y≤1 $ and $0$ otherwise.
How to calculate $P \left( |X − Y | ≤ 1/6 \right)$?
$f_{X,Y} \left( x, y \right) = 1\quad \text{for}\quad 0≤x≤1,\ 0≤y≤1 $ and $0$ otherwise.
How to calculate $P \left( |X − Y | ≤ 1/6 \right)$?
You can solve it with some reformulations of your initial condition. At first, get rid off the absolute value and replace it with an interval. Then, take the probability for values up to $1/6$ and subtract the probability for values up to $-1/6$. In the next step, one needs to find the integrals. For this, you need to think for what points the inequalities are true. Hence, I split up $P[X-Y \le 1/6]$ into two integrals. Clearly, the inequality holds for all $x \in [0,1/6]$ and $y \in [0,1]$. However, it does not hold for all $x \in [1/6,1]$ but one can easily find the values by rearranging the inequality such that one finds an interval for $y$ depending on $x$. For the other term holds $P[X-Y < -1/6]=P[Y-X \ge 1/6]$. Now, one needs to consider again all values the inequality holds for but needs to take into account the domain of $y$ .
When all these steps are done, the only thing left is to solve the integrals, but that's easy since the density is 1.
$\quad P[\left|X-Y \right| \le 1/6] \\ = P[X-Y \in [ -1/6,1/6] ] \\ = P[X-Y \le 1/6] - P[X-Y < -1/6] \\ = \int_{0}^{1/6} \int_{0}^{1}dxdy + \int_{1/6}^{1} \int_{x-1/6}^{1}dxdy - \int_{0}^{5/6} \int_{x+1/6}^{1}dxdy \\ = 47/72 - 25/72 = 11/36.$
Edit: I updated this answer because in the first try I took wrong integrals. But now it's correct! :)
self-study
tag to your question because we treat these questions differently. More information here. $\endgroup$ – COOLSerdash Nov 21 '14 at 10:54