Expected delay problem on expectation based on uniform distribution

1.8k Views Asked by At

At a traffic junction, the cycle of traffic light is 2 minutes of green and 3 minutes of red. What is the expected delay in the journey, if one arrives at the junction at a random time uniformly distributed over the whole 5 minute cycle ?

I think I need to calculate $E(x)=\displaystyle \int_a^b xf(x)\,dx$ where $f(x)=\dfrac{1}{b-a}$.

I am not sure of what b and a should be. There would be no delay in $[0,2]$.

Would they be 5 and 2 respectively ? Please help.

2

There are 2 best solutions below

0
On BEST ANSWER

Let $X$ be the time you arrive at the light (which has $\mathcal U(0,5)$ distribution), and $Y$ the amount of time you spend waiting. Then $$Y = \begin{cases} 0,& X< 2\\ 5-X,& X\geqslant 2\end{cases}. $$ Hence $$\mathbb E[Y] = \int_2^5 (5-x)\cdot\frac15\mathsf dx=\frac9{10}. $$

0
On

One way to think of this systematically: figure out how long you would have to wait if you arrived at time $x$. This is a somewhat complicated function: notice that if $0\le x \le 2$, then $f(x)$ is zero since you'll just blow right through the green. What happens for $x>2$?

Once you have that, then you need to compute $\mathbb E[f(X)]$ where $X$ is uniformly distributed in $[0,5]$...