I wish to double check my methodlogy for this practice problem I'm doing.
$P(|X-Y|\leq1) = P(-1\leq X-Y \leq 1) = \int_{-2}^{-1}\int_{-2}^{1+y}\cfrac{1}{16}dxdy + \int_{-1}^{1}\int_{y-1}^{1+y}\cfrac{1}{16}dxdy + \int_{1}^{2}\int_{y-1}^{2}\cfrac{1}{16}dxdy = \cfrac{1}{16}\int_{-2}^{-1}(1+y)dy + \cfrac{1}{16}\int_{-1}^{1}2dy + \cfrac{1}{16}\int_{1}^2 (3-y)dy = \cfrac{3}{32}+\cfrac{1}{4}+\cfrac{3}{32} = \cfrac{7}{16}$
Is my final answer right and if not, where did I go wrong in my methodlogy? Also is there an easier way to calculate the probability if I am right.
Thank You
EDIT: Fixed typos
Your final answer is correct but there are a few typos / errors. I have mentioned in comments. Here is an alternate solution.
Region $(|X-Y| \leq 1) \cap (-2 \leq X \leq 2) \cap (-2 \leq Y \leq 2)$ is the shaded region in the diagram.
So $P(|X-Y| \leq 1) = 1 - \frac{1}{16}(\triangle ABC + \triangle DEF) = 1 - \frac{9}{16} = \frac{7}{16}$.
or using integral,
$P(|X-Y| \leq 1) = 1 - \displaystyle \frac{1}{16} \bigg(\int_{-1}^2 \int_{-2}^{x-1} dy \ dx + \displaystyle \int_{-2}^1 \int_{x+1}^{2} dy \ dx \bigg)$