What is the Bayes Theorem and why is it useful?

646 views

What is the Bayes Theorem and why is it useful?

In: Mathematics

4 Answers

Anonymous 0 Comments

It’s about correlation, and reverse correlation.

Suppose you notice that 90% of people wearing hats are men. Is it therefore reasonable to assume that 90% of men wear hats?

Well of course not – that example seems obvious, but there are lots of examples that aren’t that clear.

Let’s say that 90% of cancer patients got a positive result in some blood test. If you take the test and get a positive result, does that mean there’s a 90% chance you have cancer?

Let’s say that 90% of terrorist acts are committed by people from a certain country. If you see someone from that country, is there a 90% chance they’re a terrorist?

You can’t just reverse the probability like that – it’s flat-out incorrect.

In maths terms, you write P(A|B) for the probability that A, given that B is true.

From my first example, we can say that P(is-man|wearing-hat) = 90%, or 0.9

Now we want to flip that around and get P(wearing-hat|is-man).

You can do this, but you need two more bits of information: the probability that *anybody, regardless of gender* is wearing a hat, and the probability that *anybody, regardless of hat-wearing*, is a man.

Let’s say that hat-wearers are 1% of the population, and men are 50% of the population.

Now we have enough information to work with.

* P(A) = P(is-man) = 0.5
* P(B) = P(wears-hat) = 0.01
* P(A|B) = P(is-man|wears-hat) = 0.9

Now, Bayes’ theorem says that P(B|A) = ( P(A|B) * P(B) ) / P(A)

* P(B|A) = (0.9 * 0.01) / (0.5) = 0.018

So there’s a 1.8% chance that someone will be wearing a hat if they’re a man. That’s one hell of a long way from the 90% that a naive approach might suggest.

Bayes’ theorem is useful in all *kinds* of fields, but I’ve found it’s super-good for yelling at racists with.

If you want to know *why* Bayes’ theorem works, take a look at https://oscarbonilla.com/2009/05/visualizing-bayes-theorem/

You are viewing 1 out of 4 answers, click here to view all answers.