# Find $P(Z>X+Y)$ where $X,Y,Z \sim U(0,1)$

I'm trying to follow a line in a derivation for $P(Z>X+Y)$ where $X,Y,Z$ are independent continuous random variables distributed uniformly on $(0,1)$.

I've already derived the pdf of $X+Y$ using the convolution theorem, but there's a line in the answer that says:

$P(Z>X+Y) = \mathbb{E}[\ P(Z>X+Y\ |\ X+Y )\ ]$ where $\mathbb{E}$ is the expectation.

I'm not familiar with this result. Could anyone give a pointer to a similar result if one exists?

Thanks.

-

$$\mathbb{P}(Z>X+Y)=\mathbb{E}[\mathbb{1}(Z>X+Y)]=\mathbb{E}[\mathbb{E}[\mathbb{1}(Z>X+Y)|X+Y]]=\mathbb{E}[\mathbb{P}(Z>X+Y|X+Y)],$$ where second equality is the following property of conditional expectation: $$\mathbb{E}[\mathbb{E}[X|Y]]=\mathbb{E}[X]$$ Intuitively, now that you know distribution of $X+Y$, you just need to "range"$^1$ through the values of $X+Y$, and find the probability of $Z>X+Y$ for each such value. This is exactly the expectation of the probability.

$^1$integrate against the density, i.e. $\int_0^2\mathbb{P}(Z>v)f_{X+Y}(v)\;dv$

-
I was puzzled by the first equality, but is the principle just that P(...) is some constant, and the expectation of a constant is a constant? If so that's a nice trick :) –  maliky0_o May 17 '12 at 19:44
No, I don't think you understand it properly. The first equality involves indicator function $\mathbb{1}(Z>X+Y)$, which is $1$ on the event $Z>X+Y$ and $0$ on the event $Z\leq X+Y$. Then expectation of such indicator is just the probability of the event $Z>X+Y$, by definition of expectation. –  Tom Artiom Fiodorov May 17 '12 at 19:48

This is not an answer to your question about the justification for the equation that is puzzling you, but I think the geometrical method described below for solving the problem that may give you a different insight into the calculation of the desired probability $P\{Z > X+Y\}$.

The random point $(X,Y,Z)$ is uniformly distributed in the interior of the unit cube with diagonally opposite vertices $(0,0,0)$ and $(1,1,1)$. The cube has unit volume and so the probability that $(X,Y,Z)$ is in some region is just the volume of that region. Thus, $P\{Z > X+Y\}$ is the volume of the tetrahedron with vertices $(0,0,0)$, $(1,0,1)$, $(0,1,1)$ and $(0,0,1)$. If we think of this as an inverted pyramid whose base is the right triangle with vertices $(1,0,1)$, $(0,1,1)$ and $(0,0,1)$ and apex $(0,0,0)$ is at altitude $1$ "above" the base, then since the base has area $\frac{1}{2}$, we get the volume as $$P\{Z > X+Y\} = \frac{1}{3}\times (\text{area of base})\times(\text{altitude}) = \frac{1}{3}\times \frac{{3}}{2}\times1 = \frac{1}{6}.$$ Of course, if you have already computed the density of $X+Y$, then it is straightforward to use the result given by Artiom Fiodorov to get $$P\{Z > X+Y\}= \int_0^2{P}(Z>v)f_{X+Y}(v)\;dv = \int_0^1(1-v)\cdot v\;dv = \left.\frac{v^2}{2}-\frac{v^3}{3}\right|_0^1 = \frac{1}{6}.$$

-

A partial justification can be found in the Wikipedia entry on the Law of Total Probability.

-

Replacing the question in a larger context might help. Here is a result:

For every event $A$ in $(\Omega,\mathcal F,\mathbb P)$ and every sigma-algebra $\mathcal G\subseteq\mathcal F$, $\mathbb P(A)=\mathbb E(\mathbb P(A\mid \mathcal G))$.

To see this, recall that $U=\mathbb P(A\mid \mathcal G)$ is the unique (up to null events) random variable such that $\mathbb E(U;B)=\mathbb P(A\cap B)$ for every $B$ in $\mathcal G$. In particular, $B=\Omega$ yields $\mathbb E(U)=\mathbb P(A)$, as claimed above.

In your setting, $A=[Z\gt X+Y]$ and $\mathcal G$ is the sigma-algera generated by the random variable $X+Y$ hence $\mathbb P(\ \mid \mathcal G)=\mathbb P(\ \mid X+Y)$ by definition.

-
This tries to address the question asked, which is to explain the identity written in the post, and not to compute $P(Z\gt X+Y)$ in the specific situation described in the post. –  Did Nov 24 '12 at 11:28
Michael, could you elaborate on how this differs from what Artiom Fiodorov wrote, namely $\int_0^2\mathbb{P}(Z>v)f_{X+Y}(v)\;dv$ –  Dilip Sarwate May 17 '12 at 23:20
The he who integrated over the entire 3D space and used tetrahedrons is me; the Artiom Fiodorov who explained that $$P(Z>X+Y)=E[\mathbb{1}(Z>X+Y)]=E[E[\mathbb{1}(Z>X+Y)|X+Y]]=E[P(Z>X+Y|X+Y)],$$ and then showed that this works out to $\int_0^2P(Z>v)f_{X+Y}(v)\;dv$ in his answer is different. The request was that you elaborate on how your answer differs from Artim's answer. –  Dilip Sarwate May 18 '12 at 13:09