How many stoplights must a biker go through in order to see all 3 colors?

59 Views Asked by At

A biker drives through a street without ever stopping, and goes through a stoplight at the end of every block.

Upon arrival, each stoplight has probabilities $\mathbb{P}(green) = \mathbb{P}(red) = 0.45$ and $\mathbb{P}(yellow) = 0.10$.

We wish to know the expected amount of stoplights that the driver must go through in order to see all three colors.

Here's how far I've gotten:

The number of stoplights until each color has been seen at least once is $N = 1 + N_{1} + N_{2}$, where $1$ is the number of stoplights until any color is seen (any color works because we haven't seen anything yet), $N_{1}$ is the number of stoplights until any of the remaining two unseen colors is seen, and $N_{2}$ is the number of stoplights passed until the last unseen color is finally seen.

The answer to the problem will be: $$\mathbb{E}[N] = \mathbb{E}[1 + N_{1} + N_{2}] = \mathbb{E}[1] + \mathbb{E}[N_{1}] + \mathbb{E}[N_{2}] = 1 + \mathbb{E}[N_{1}] + \mathbb{E}[N_{2}]$$

I know that $N_{1}$ will be a geometric process:

If the first stoplight is green, $N_{1} \sim G(\mathbb{P}(red\space or\space yellow)) = G(0.55)$.

If the first stoplight is red, $N_{1} \sim G(\mathbb{P}(green\space or\space yellow)) = G(0.55)$.

If it is yellow, then $N_{1} \sim G(\mathbb{P}(red\space or\space green)) = G(0.9)$.

So $N_{1} \sim G(0.55)$ with $\mathbb{P}(green\space or\space red) = 0.9$ and $N_{1} \sim G(0.9)$ with $\mathbb{P}(yellow) = 0.1$.

Treating it as a mixture, we get $$\begin{align}\mathbb{E}[N_{1}] &= \mathbb{E}[G(0.55)\mathbb{I}\{green\space or\space red\} + G(0.9)\mathbb{I}\{yellow\}] \\&= \mathbb{E}[G(0.55)]\mathbb{P}(green\space or\space red) + \mathbb{E}[G(0.9)]\mathbb{P}(yellow) \\&= \frac{1}{0.55}0.9 + \frac{1}{0.9}0.1 = 1.74 \end{align}$$

We still need $\mathbb{E}[N_{2}]$, but I'm not sure about how I'm supposed to handle that.

I know that $N_{2}$ ends up being a geometric process. For example, if the first light was red and the second (distinct) light was green, then $N_{2} \sim G(yellow) = G(0.1)$.

In the notes I have, if the first light was red, the probability of $N_{1}$ ending with a green light is "$\frac{0.45}{0.55}$". I'm not sure where that comes from. Wouldn't it be simply $\mathbb{P}(green) = 0.45$? Similarly, if the first light was red, the notes I have say that the probability of $N_{1}$ ending with a yellow light is "$\frac{0.1}{0.55}$". Once again I'm not sure where that comes from.

In my notes (and I'm not sure if this is correct or there may be an error in the numbers), it says that $N_{2}$ is $G(0.45)$ with probability $0.26$, and $G(0.1)$ with probability $0.45 \frac{0.45}{0.55} + 0.45 \frac{0.45}{0.55} = 0.74$.

Thus, $\mathbb{E}[N_{2}] = 0.26 \frac{1}{0.45} + 0.74\frac{1}{0.1} = 7.98$ and so the expected number of stoplights is aproximately $11$.

What is the reasoning for obtaining these values and expressions and finally getting $\mathbb{E}[N_{2}]$?

Thanks.

1

There are 1 best solutions below

0
On BEST ANSWER

This is the number where the probability of 'not' getting all three colors drops below $0.5$.

There are three outcomes for this:

1) A mix of R and G

2) A mix of R and Y

3) A mix of G and Y

Avoid counting all one color twice.

1) $2^7\cdot .45^7 = .4782969$ .......which dips below $0.5$ so let's further evaluate $7$ lights.

2) and 3)

$.1^7 = .0000001$

$2\cdot 7\cdot .45\cdot .1^6 = .0000063$

$2\cdot 21\cdot .45^2\cdot .1^5 = .00008505$

$2\cdot 35\cdot .45^3\cdot .1^4 = .00063788$

$2\cdot 35\cdot .45^4\cdot .1^3 = .00287044$

$2\cdot 21\cdot .45^5\cdot .1^2 = .00775018$

$2\cdot 7\cdot .45^6\cdot .1 = .01162527$

1) + 2) + 3) $= .50127$......which is only slightly too big

Hence $8$ is the expected number to get one light of each color.