We use cookies to personalise content and advertisements and to analyse access to our website. Furthermore, our partners for online advertising receive pseudonymised information about your use of our website.
Please click on "Accept cookies" if you agree to the setting of cookies. Cookies that do not require consent remain unaffected by this, see
cookie policy and privacy policy.
DECLINE COOKIES

Select the probability that you will encounter two red lights in a row out of five traffic signal lights. Assume red, green, and yellow are equally likely occurrences.

Guest Apr 27, 2015

#5**+5 **

I interpreted it as "at least two red lights in a row".

When I tackled the problem first I came up with some reasoning that produced a value of 0.309. However, when I checked with a Monte-Carlo simulation I consistently got higher values close to 0.325. When I repeated the problem with just 4 lights I got consistent answers for both methods! However, I tend to believe my Monte-Carlo approach, because it was very simple (see my explanation below), so I modified my "reasoning" to give the result I came to above, matching the MC approach (there was no real "reasoning" involved, I just adjusted it to get 0.325).

Monte-Carlo approach.

1. I randomly selected 5 numbers between 0 and 1 to represent the signals of the five traffic lights. If the value was less than 1/3 I designated this as a red light.

2. I then went from traffic light to traffic light in order to see if there were two consecutive lights that were red. If there were I incremented a counter (c, say) If there weren't I left the counter unchanged (the counter started at 0).

3. I only incremented the counter after the first two consecutive red lights and ignored any further consecutive red lights, because I was looking for "at least two". (So, for example, sequences like "red, red, red, green, yellow" and "red, red, green, red, red" only counted once not twice.)

4. I repeated that process thousands of times, n times, say (a hundred thousand times, in fact).

5. I then divided the value of the counter by the number of times I did it to get the probability (= c/n).

Needless to say, I wrote a simple program in Mathcad to do this, and ran it several times, always getting a value close to 0.325.

There is no guarantee my MC calculation is right though!

.

Alan Apr 29, 2015

#2**+5 **

A Monte-Carlo simulation suggests the probability is:

(1 + 2/3 + 2/3 + (4/3)*(2/3)^{2})*(1/3)^{2} = 79/243 ≈ 0.325

.

Alan Apr 27, 2015

#3**+5 **

I am not familiar with the monte-carlo simulations.

And like many of these questions this is open to different interpretations.

Note: this answer has been changed so has my interpretation :)

I am going to interprete it to mean - Exactly 2 red lights in a row and none of the others are red

now they can be

1&2 or 2&3 or 3&4 or 4&5 So that is 4 ways

the number of ways that the 2 reds can come first is 1*1*2*2*2 = 8

So altogether there are 8*4 = 32 ways the you can get exactly 2 red lights in a rowand no other red lights

Now the total number of possibilities is $${{\mathtt{3}}}^{{\mathtt{5}}} = {\mathtt{243}}$$

So I think that the answer is $${\frac{{\mathtt{32}}}{{\mathtt{243}}}} = {\mathtt{0.131\: \!687\: \!242\: \!798\: \!353\: \!9}}$$

.Melody Apr 29, 2015

#4**+5 **

now my original interpretation was 2 red lights in a row and the others can be anything, including red.

I am going to have another go at this one.

If exactly 2 red ones there is 32 posibilities.

If there are 3 red ones then it gets harder Mmm

I don't know - I'll think about it later

**Alan, what interpretation have you answered?**

Melody Apr 29, 2015

#5**+5 **

Best Answer

I interpreted it as "at least two red lights in a row".

When I tackled the problem first I came up with some reasoning that produced a value of 0.309. However, when I checked with a Monte-Carlo simulation I consistently got higher values close to 0.325. When I repeated the problem with just 4 lights I got consistent answers for both methods! However, I tend to believe my Monte-Carlo approach, because it was very simple (see my explanation below), so I modified my "reasoning" to give the result I came to above, matching the MC approach (there was no real "reasoning" involved, I just adjusted it to get 0.325).

Monte-Carlo approach.

1. I randomly selected 5 numbers between 0 and 1 to represent the signals of the five traffic lights. If the value was less than 1/3 I designated this as a red light.

2. I then went from traffic light to traffic light in order to see if there were two consecutive lights that were red. If there were I incremented a counter (c, say) If there weren't I left the counter unchanged (the counter started at 0).

3. I only incremented the counter after the first two consecutive red lights and ignored any further consecutive red lights, because I was looking for "at least two". (So, for example, sequences like "red, red, red, green, yellow" and "red, red, green, red, red" only counted once not twice.)

4. I repeated that process thousands of times, n times, say (a hundred thousand times, in fact).

5. I then divided the value of the counter by the number of times I did it to get the probability (= c/n).

Needless to say, I wrote a simple program in Mathcad to do this, and ran it several times, always getting a value close to 0.325.

There is no guarantee my MC calculation is right though!

.

Alan Apr 29, 2015