Here's a joint density function for you:
$f(x,y) = \begin{cases} \frac23(x+2y): &0\le x \le 1, 0 \le y \le 1 \\ 0: &\text{otherwise} \end{cases}$
I want to calculate the probability that $X + Y \gt 1$, given that $|X-Y| = 0.2$. The solution provided in my textbook is as follows:
$P(X+Y>1\,\mid\, |X-Y|=0.2) = \cfrac{P(X+Y>1 \bigcap |X-Y| = 0.2)}{P(|X-Y|=0.2)} = \cfrac{\int_{0.6}^1(x+2(x-0.2)dx + \int_{0.4}^{0.8}(3x-0.4)dx}{\int_{0.2}^1(x+2(x-0.2)dx + \int_0^{0.8}(3x-0.4)dx}=0.7$
Fine. This involves integrating over a line, which I had to remind myself how to do. Not the prettiest solution, but maybe that's called for. My question to you is why this solution of mine produces a wrong answer:
$P(X+Y>1\,\mid\,|X-Y|=0.2)=P(X+Y>1\,\mid\, X-Y = 0.2) +P(X+Y>1\,\mid\, X-Y=-0.2)=P(Y>1-X\,\mid\, X=0.2+Y)+P(Y>1-X\,\mid\, X=-0.2+Y)=P(Y>1-0.2-Y)+P(Y>1+0.2-Y)=P(2Y>0.8)+P(2Y>1.2)=P(Y>0.4)+P(Y>0.6)$
So now I have to find my marginal density function for Y,
$f_Y(y) = \int_0^1(\frac23x+\frac43y)dx = \begin{cases} \frac13+\frac43y: &0\le y \le 1 \\ 0: &\text{otherwise} \end{cases}$
Then
$P(Y>0.4) + P(Y>0.6) = \int_{0.4}^1(\frac13+\frac43y)dy + \int_{0.6}^1(\frac13+\frac43y)dy = 0.76 + 0.56 = 1.32$
Perhaps you can see why I am not satisfied with such an answer! Thanks in advance for the help.
First wrong equality is $$ P(X+Y>1\,\mid\,|X-Y|=0.2)=P(X+Y>1\,\mid\, X-Y = 0.2) +P(X+Y>1\,\mid\, X-Y=-0.2). $$ If $B=B_1\cup B_2$ where $B_1,B_2$ are disjoint, it is not true that $$ \mathbb P(A \mid B) = \mathbb P(A \mid B_1)+\mathbb P(A \mid B_2). $$ And it is true that $$ \mathbb P(A \mid B) = \frac{\mathbb P(A \cap B_1)+\mathbb P(A \cap B_2)}{\mathbb P(B_1)+\mathbb P(B_2)}. $$
Next, the equality $$ P(Y>1-X\mid X=0.2+Y)+P(Y>1-X\mid X=-0.2+Y)=P(Y>1-0.2-Y)+P(Y>1+0.2-Y) $$ in your solution is wrong too. Right equality should be $$ P(Y>1-X\mid X=0.2+Y)+P(Y>1-X\mid X=-0.2+Y)=P(Y>1-0.2-Y\mid X=0.2+Y)+P(Y>1+0.2-Y\mid X=-0.2+Y). $$ $Y$ is not independent of $X-Y$, so we cannot remove condition.