18. Traffic Light (from 10th grade. 2 points). A traffic light at a pedestrian crossing allows pedestrians to cross the street for one minute and prohibits crossing for two minutes. Find the average waiting time for the green light for a pedestrian who approaches the intersection.

![](https://cdn.mathpix.com/cropped/2024_05_06_677ee29ca0a1bca903d6g-13.jpg?height=314&width=331&top_left_y=1308&top_left_x=291)
Solution. With probability $\frac{1}{3}$, the pedestrian falls into the interval when the green light is on (event $G$), and therefore the conditional expected waiting time $T$ in this case is 0: $\mathrm{E}(T \mid G)=0$. With probability $\frac{2}{3}$, the pedestrian falls on the red signal and has to wait (event $\bar{G}$). In this case, the waiting time is uniformly distributed over the interval from 0 to 2 minutes, so the conditional expected value of $T$ given $\bar{G}$ is one minute: $\mathrm{E}(T \mid G)=\frac{0+2}{2}=1$ (min).

We get:

$$
\mathrm{E}(T)=\mathrm{E}(T \mid G) \cdot \mathrm{P}(G)+\mathrm{E}(T \mid \bar{G}) \cdot \mathrm{P}(\bar{G})=\frac{1}{3} \cdot 0+\frac{2}{3} \cdot 1=\frac{2}{3}(\text { min })
$$

Answer: 40 seconds.