jaus tail said:
Homework Statement
Assume that in a traffic junction, the cycle of the traffic signal lights is 2 minutes of green
(vehicle does not stop) and 3 minutes of red (vehicle stops). Consider that the arrival time of
vehicles at the junction is uniformly distributed over 5 minute cycle. The expected waiting
time (in minutes) for the vehicle at the junction is __________.
Homework Equations
E(x) = summation of (x) * P(x) over all values of x
The Attempt at a Solution
View attachment 213533
Adding them all I get answer for expected value as 1 / 25 * (6 + 6 + 6 + 5 + 3 ) = 26/25
Correct answer is 0.9.
How do I solve this?
With probability 2/5 the car arrives in the 2-minute green-light period, so P(no wait) = 2/5. With probability 3/5 the car arrives somewhere in the 3-minute red-light period; the actual time of arrival in that 3-minute period is uniformly distributed over an interval of length 3, so the wait-time is uniformly distributed over the interval from 0 to 3. What is the mean of a uniformly-distributed quantity that can range from 0 to 3? Even if you have not had calculus yet, the answer is "intuitive" and goes along with common sense.
Now you just need to combine the two averages and their probabilities in an appropriate way.
Alternatively, you can assume that the car can arrive at any of N equally-spaced points in the interval from 0 to 5, but taking N = 5 is too small. Why? Well, suppose the first two minutes have a green light and the remaining 3 minutes have a red light. The car can arrive at any time from 0 to 5, but we approximate this by using equally-spaced discrete points, each being equally-likely. The problem is that 1 microsecond before t = 2 the light is green and so the car does not wait; 1 microsecond after t=2 the light is red and the car waits for 3 minutes. How should we characterize the point t = 2 exactly? If we just use the five points 1,2,3,4,5 or the 6 points 0,1,2,3,4,5, the single point t=2 can have a significant effect on the calculated answer. We need more points, so that the single point t = 2 does not affect the answer very much. So, doing the calculation where the arrival points are spaced apart by 30 seconds would give us an answer that is closer to the true value; having them spaced 15 seconds apart would be even better. A more accurate answer would be obtained by spacing the points closer together and increasing their number. Just make a table of the N equally-likely wait-time values {wait(1), wait(2), ... wait(N)}, then take their expectation; this is quite easy using a spreadsheet, for example. (Note that many of the wait-times in your table would be 0, and the others would range from near 0 to near 3.)
The true answer 0.9 would be obtained by having infinitely many points spaced 0 apart, which is the continuous situation, but using a large enough N should work well enough for practical purposes. Putting it all in a spreadsheet would be the easiest way to go.