Before you readA test catches 90% of people with a disease and wrongly flags 5% of healthy people. One person in a hundred has the disease. You test positive. How likely is it that you have it?
Watch: Bayes theorem, the geometry of changing beliefs · 3Blue1Brown
The conditional probability of A given B is the share of B in which A also happens:
Rearranged, it is the product rule Summing the joint probability over every case of A gives the sum rule,
Write the product rule both ways round and divide to get Bayes’ rule, which turns a hypothesis H and evidence E around:
is the prior, the likelihood, the evidence and the posterior. When the prior is small, most positives come from the large group without H, even if the test is good. That is the answer to the question above.
A and B are independent when which is the same as knowing B tells you nothing about A.
In machine learning, H is a class label and E is the input. A classifier estimates and generative models get it from Bayes’ rule.
P(H, E) = 0.090P(E) = 0.180P(H | E) = 0.500
Recall
State Bayes' rule for a hypothesis and evidence Recall
How do you compute the evidence in Bayes' rule?Recall
What does it mean for and to be independent?Exercise
Answer the question at the top: with and find to two decimal places.Exercise
Machine A makes 70% of a factory's parts and 2% of them are faulty. Machine B makes the rest and 5% of them are faulty. Give and then each to three decimal places.Exercise
Roll a fair die. Let be 'even' and be 'at most 4'. Are and independent?