Conditional waiting time We got the following problem last week...
A person waiting for the traffic light to turn green. There are two kinds of traffic lights in the city, one that switches color (there is no amber color, just green and red) every 1 minute and one that switches every 2 minutes. We assume it's 50-50% chance it is either one. The person has waited 20 seconds at the traffic light already, and the light is still red. What is the probability that he needs to wait at least another 20 seconds?
I sent in 2 different solutions. One of them was clearly  wrong, but I can't see the problem in my latest solution, which is the following:
For the sake of simplicity, let me assume the waiting times are uniformly distributed. First, we have to calculate the $p_{1}$ probability, that the person stands in front of the 1-minute traffic light, and the $p_{2}$ probability, that he stands in front of the 2-minutes traffic light. Since he has waited already 20 seconds, it is more probable that he stands in front of the 2 minutes long traffic light, than he stands in front of the 1 minute long traffic light (and the 50-50% chances are not applicable anymore). Using Bayes' theorem we get
$$\begin{align*}
p_{1} & =\frac{\int_{20}^{60}\frac{1}{60}dx}{\int_{20}^{60}\frac{1}{60}dx+\int_{20}^{120}\frac{1}{120}dy}=\frac{5}{11},\\
p_{2} & =\frac{\int_{20}^{120}\frac{1}{120}dy}{\int_{20}^{60}\frac{1}{60}dx+\int_{20}^{120}\frac{1}{120}dy}=\frac{6}{11}.
\end{align*}$$
Now we can calculate the asked probability using the law of total probability:
$$\int_{20}^{60-20}\frac{1}{60-20}dx\cdot p_{1}+\int_{20}^{120-20}\frac{1}{120-20}dy\cdot p_{2}=\frac{73}{110}.$$
 A: Let $W$ the total amount of time you have to wait for the light to switch; you are interested in the probability
$$
\begin{align}
\mathbf P[W > 40 \, |\,  W > 20] &= \frac{\mathbf P[W > 40,\, W>20]}{\mathbf P[W>20]}\\
& = \frac{\mathbf P[W > 40]}{\mathbf P[W>20]}.
\end{align}
$$
So it willl suffice to calculate $\mathbf{P}[W > t]$ for general values values $t > 0$.
Let $L \in \{1,2\}$ denote the type of light, which switches after 1 or 2 minutes respectively. Then by the law of total probability, and the fact that you're given $\mathbf P[L = 1] = \mathbf P[L=2] = \frac12$,
$$ \mathbf P[W > t] = \frac12 \bigg( \mathbf P[W>t |L=1] + \mathbf P[W>t |L=2]\bigg).$$
As you suppose that you arrive at a uniform time through the cycle, the probability that you have to wait more than $t$ seconds is
$$ P[W > t |L=l] = \max \left(0, \frac{60l - t}{60l}\right).$$
Combining the above:
$$\mathbf P[W > 40] = \frac12 \left(\frac{60-40}{60} + \frac{120-40}{120}\right) = \frac{1}{2}$$
$$\mathbf P[W > 20] = \frac12 \left(\frac{60-20}{60} + \frac{120-20}{120}\right) = \frac{3}{4}$$
And so
$$\mathbf P[W > 40 \, |\,  W > 20] =\frac{2}{3}$$
