Find the probability of the following event You witness a nighttime hit-and-run accident involving a taxi in a city in which 9 out of 10 taxis are green, and all other taxis are blue. Discrimination between the two colours is 80% reliable under the dim lighting conditions at the scene. You are sure that the taxi was blue. What is the most likely colour of the taxi, and what is the probability that your impression is correct?
I think the most likely colour of the taxi is blue because is not affected by how well you see, while I am having a hard time computing the probability that the impression is correct. I know it is some kind of conditional probability but I am not sure what to do.
 A: A priori (that is, without seeing the taxi's colour), we would assume that the most likely colour is green with probability $0.9$ and that the taxi is unlikely to be coloured blue (its probability is only $0.1$). But now we obtain a new piece of information: we seem to "see" a blue taxi. Given this knowledge, the new probability that the taxi is blue becomes:
\begin{align*}
&\text{Pr}[\text{actually B} \mid \text{seems B}] \\
&= \frac{\text{Pr}[\text{actually B}] \cdot \text{Pr}[\text{seems B} \mid \text{actually B}]}{\text{Pr}[\text{actually B}] \cdot \text{Pr}[\text{seems B} \mid \text{actually B}] + \text{Pr}[\text{actually G}] \cdot \text{Pr}[\text{seems B} \mid \text{actually G}]} \\
&= \frac{0.1 \cdot 0.8}{0.1 \cdot 0.8 + 0.9 \cdot 0.2} \\
&= \frac{8}{8 + 18} \\
&= \frac{4}{13} \\
&= 0.3076\ldots
\end{align*}
Hence, the new probability of being blue increased from $0.1$ to $\approx 0.3$, but it is still more likely that the taxi is green.
A: Let's define the following Events:
$$G = \text{"Green":the car actually was green}$$
$$B = \text{"Blue":the car actually was blue}$$
$$SG = \text{"Seen green": the car was identified as green}$$
$$SB = \text{"Seen blue": the car was identified as blue}$$
and assume there are no other colored cars and all cars are identified as green or blue, too. We have the following probabilities:
$$P(G) = 0.9$$
$$P(B) = 0.1$$
$$P(SG|G) = 0.8, P(SG|B) = 0.2$$
$$P(SB|B) = 0.8, P(SB|G) = 0.2$$
From the law of total probability we can derive
$$P(SB) = P(SB|B)P(B) + P(SB|G)P(G) = 0.8*0.1 + 0.2*0.9 = 0.26$$
Now, applying Bayes, we get:
$$P(B|SB) = \frac{P(SB|B)P(B)}{P(SB)} = \frac{0.8*0.1}{0.26} \approx 0.3077$$
and
$$P(G|SB) = \frac{P(SB|G)P(G)}{P(SB)} = \frac{0.2*0.9}{0.26} \approx 0.6923$$
As you can see, the most likely color is actually green.
