# Question: Bayesâ€™ Theorem

There is a city which hosts two taxi-cab companies, the Blue Cab Co. and the Green Cab Co. Blue cabs are blue and Green cabs are green; they are otherwise identical. 70 percent of the cabs in the city are Blue cabs, and 30 percent of the cabs in the city are Green cabs. Moreover, historically speaking, Blue cabs have been involved in 70% of all traffic accidents in the city that involved cabs, and Green cabs have been involved in 30% of all traffic accidents in the city that involved cabs. One night, there is a traffic accident involving a taxi-cab in the city, to which there is one witness. Authorities perform extensive tests on the witness, and determine that his ability to recognize cabs by their color at night is approximately 80 percent accurate and 20 percent inaccurate (meaning that when he is wrong he does not say he doesn't know, but rather misidentifies it as being of the other color). The witness says the taxi-cab involved in the accident was 'blue.' On these facts, and strictly assuming the taxi-cab was not from some other city, what is the approximate probability that the taxi-cab involved in the accident belonged to the Blue Cab Co.

Let P(R) be the probability of witness being accurate. Then P(R) = 0.8 which implies P(W) = 0.2 i.e. probability of witness being wrong

Let P(B/R) = Probability of accident by a blue car, conditional on the fact that the statement is a right statement

Then P(B/R) = 0.7 Also P(B/W)=0.3, Similarly P(G/R) = 0.3

Here we need to find P(R/B) i.e. If the witness has said that it was a blue car, then what's the probability that it was actually blue

Applying Bayes Theorem now:

P(R/B) = P(B/R) * P(R)/P(B)

Here we know all except P(B):

P(B) = P(B/R)*P(R) +P(B/W)*P(W)

= 0.7*0.8 + 0.3*0.2

= 0.56 + 0.06

Therefore: P(R/B) = 0.7*0.8/0.62 = 0.903