Here’s the statement of the problem.
"A cab was involved in a hit-and-run accident at night. Two cab companies, the Green and the Blue, operate in the city. You are given the following data: 85% of the cabs in the city are Green and 15% are Blue. A witness identified the cab as Blue. The court tested the reliability of the witness under the circumstances that existed on the night of the accident and concluded that the witness correctly identified each one of the two colors 80% of the time and failed 20% of the time. What is the probability that the cab involved in the accident was Blue rather than Green?"
Let $B_A$ be the event that a blue cab caused the accident, and $B_O$ the event that a blue cab was observed to have caused the accident. The desired probability is $P(B_A|B_O)$. According to the solution, I made the mistake of letting $P(B_O) = .15$, while it’s actually $P(B_A) = .15$.
When I read “85% of the cabs in the city are Green and 15% are Blue”, my reasoning was that, if a witness was to see a random cab, there’d be a 85% chance that it’s green, and 15% that it’s blue. Why is this not correct, and why is the same reasoning correct when applied to the probability $P(B_A)$?
First see conditional probability.
Let $~R~$ denote the event that the cab was blue.
Let $~S~$ denote the event that the witness said the cab was blue.
Then
$$p(R|S) = \frac{p(R\cap S)}{p(S)} = \frac{(0.15 \times 0.8)}{(0.15 \times 0.8) + (0.85 \times 0.2)}.$$