Baye’s Theorem explained

8 Bayes’ Theorem

…in no other branch of mathematics is it so easy for experts to blunder as in probability theory.
—Martin Gardner

In a famous psychology experiment, subjects were asked to solve the following problem. The experiment was first published in 1971. It was performed by Daniel Kahneman and Amos Tversky. Their work on human reasoning reshaped the field of psychology, and eventually won a Nobel prize in 2002.

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 same 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 green?

Source: https://jonathanweisberg.org/vip/chbayes.html