Statistics/ Probability: Alice and Bob go to lunch and arrive at a random time uniformly between noon and 1pm. Question: Alice and Bob plan to go to lunch. Without any means to communicate to each other, they each arrive at a random time uniformly between noon and 1pm. Suppose X and Y , the arrival time of Alice and Bob respectively, are uniformly distributed over the square $[0, 1]^{2}$.
Suppose both Alice and Bob are willing to wait for each other for at most 20 minutes, that is, whoever arrives the first will leave if the other person does not show up in 20 minutes. Conditioned on the event that the lunch takes place, on average how long does one need to be wait for the other?
I know that X~Unif(0,1) and Y~Unif(0,1), and that the P(lunch takes place) = 5/9.
If W = |Y-X|, then W = Y-X if Y>X, and W=X-Y if X>Y.
I'm trying to find E(W | W<⅓), but I'm not exactly sure how to proceed by finding the PDF and integrating.
Could someone explain how I would find the PDF? How does the conditional aspect play into this?
Thanks!
 A: Judging by your calculations, it appears that you have the correct region in mind: it is the intersection of the region bounded by the lines $y=x+\frac{1}{3}$ and $y=x-\frac{1}{3}$ and the unit square with vertices at $(0,0)$, $(0,1)$, $(1,0)$, and $(1,1)$. 
To figure out the density, I first figure out the CDF. This is done in much the similar way as your computation of the probability that there is a lunch (I used triangles instead of integrals). Note that $w\in[0,\frac{1}{3}]$:
\begin{align}
\mathbb{P}(W<w)&=\frac{1-(1-w)^2}{\frac{5}{9}}\tag{1}\\
&=\frac{18w-9w^2}{5}
\end{align}
This gives us our pdf:
\begin{equation*}
f(w)=\frac{18-18w}{5}
\end{equation*}
We can compute the expectation:
\begin{align*}
\mathbb{E}[W]=\int_0^{\frac{1}{3}}wf(w)\mathrm{d}w&=\frac{9w^2-6w^3}{5}\Big|_0^{\frac{1}{3}}\\
\mathbb{E}[W]&=\frac{7}{45}
\end{align*}
In other words, the expected wait time is $\frac{7}{45}\cdot 60=\frac{28}{3}$ minutes.
$(1)$ In calculating this step, I observed that this probability is achieved as a distance away from the line $Y=X$. Thus the value $\mathbb{P}(W<x)$ is the region bounded by the lines $Y=X-w$ and $Y=X+w$ and the unit square. The complement of this region is two triangles of equal areas of $\frac{(1-w)^2}{2}$. Using complements gets us the probability that I gave with little explanation.
