Conditional Probability: Bayes' Theorem Is A Formula That Describes How To Update The Probabilities of Hypotheses When
Conditional Probability: Bayes' Theorem Is A Formula That Describes How To Update The Probabilities of Hypotheses When
Conditional Probability: Bayes' Theorem Is A Formula That Describes How To Update The Probabilities of Hypotheses When
given evidence. It follows simply from the axioms of conditional probability, but can be used to
powerfully reason about a wide range of problems involving belief updates.
Given a hypothesis HHH and evidence EEE, Bayes' theorem states that the relationship between
the probability of the hypothesis before getting the evidence P(H)P(H)P(H) and the probability
of the hypothesis after getting the evidence P(H∣E)P(H \mid E)P(H∣E) is
Many modern machine learning techniques rely on Bayes' theorem. For instance, spam filters use
Bayesian updating to determine whether an email is real or spam, given the words in the email.
Additionally, many specific techniques in statistics, such as calculating ppp-values or
interpreting medical results, are best described in terms of how they contribute to updating
hypotheses using Bayes' theorem.
Bayes’ Theorem is a way of finding a probability when we know certain other probabilities.
Which tells us: how often A happens given that B happens, written P(A|B),
When we know: how often B happens given that A happens, written P(B|A)
and how likely A is on its own, written P(A)
and how likely B is on its own, written P(B)
Let us say P(Fire) means how often there is fire, and P(Smoke) means how often we see smoke,
then:
P(Fire|Smoke) means how often there is fire when we can see smoke
P(Smoke|Fire) means how often we can see smoke when there is fire
So the formula kind of tells us "forwards" P(Fire|Smoke) when we know "backwards" P(Smoke|
Fire)
Example: If dangerous fires are rare (1%) but smoke is fairly common (10%)
due to barbecues, and 90% of dangerous fires make smoke then:
We will use Rain to mean rain during the day, and Cloud to mean cloudy morning.
Remembering
First think "AB AB AB" then remember to group it like: "AB = A BA / B"
Hunter says she is itchy. There is a test for Allergy to Cats, but this test is not always right:
For people that really do have the allergy, the test says "Yes" 80% of the time
For people that do not have the allergy, the test says "Yes" 10% of the time ("false
positive")
If 1% of the population have the allergy, and Hunter's test says "Yes", what are the chances
that Hunter really has the allergy?
We want to know the chance of having the allergy when test says "Yes", written P(Allergy|Yes)
Oh no! We don't know what the general chance of the test saying "Yes" is ...
... but we can calculate it by adding up those with, and those without the allergy:
1% have the allergy, and the test says "Yes" to 80% of them
99% do not have the allergy and the test says "Yes" to 10% of them
Which means that about 10.7% of the population will get a "Yes" result.
So now we can complete our formula:
P(Allergy|Yes) = about 7%
This is the same result we got on False Positives and False Negatives.
In fact we can write a special version of the Bayes' formula just for things like this:
When "A" has 3 or more cases we include them all in the bottom line:
Example: The Art Competition has entries from three painters: Pam, Pia and
Pablo
A good chance!
Pam isn't the most successful artist, but she did put in lots of entries.