Free preview
88 lessons
Essential Probability & Statistics for ML
Free preview
Essential Probability & Statistics for ML · 88 lessons
No surprise gaps
Actually remember it
Skip what you know
One subscription. All learning paths included.
Our content is best on a larger screen
The odds form of Bayes' rule
We've seen that the likelihood ratio compares how probable the evidence is under and under . What we usually want is the conditional probability the other way round: , the posterior probability of once is observed.
Bayes' rule gives , but it needs the denominator , which usually takes the law of total probability to find. Written in terms of odds, Bayes' rule becomes simpler: cancels, and the evidence enters through a single multiplication by the likelihood ratio.
To write Bayes' rule in terms of odds, we need the odds of before and after is observed.
Definition
For a hypothesis and evidence , the prior odds of are its odds before is observed:
The posterior odds are its odds after is observed:
Bayes' rule gives both posterior probabilities with the same denominator, :
Dividing the first by the second cancels :
Theorem
For a hypothesis with and evidence with ,
In words, the posterior odds are the prior odds times the likelihood ratio. Before is observed, the odds of are the prior odds. Observing updates them by multiplying by the likelihood ratio: evidence that favours has a ratio above and raises the odds, and evidence against has a ratio below and lowers them.
A machine part is faulty with probability . A quality check flags of faulty parts and of parts that work. Find the odds that a flagged part is faulty.
Solution
We name the hypothesis and the evidence:
The prior is , so and the prior odds are
Each figure is a likelihood, and , so the likelihood ratio is
Multiplying the prior odds by it gives the posterior odds:
The odds that a flagged part is faulty are to .
Practice questions
4 questions
The odds that a delivery van breaks down this month are to . Its warning light comes on times as often in months when the van breaks down as in months when it does not.
Given that the warning light comes on, what are the odds that the van breaks down this month?
Select the correct answer:
+ 3 more questions
From posterior odds to a posterior probability
The odds form of Bayes' rule gives the posterior odds of , but often what we want is the posterior probability .
Recall that when the odds of an event are a single number , its probability is . So once we have the posterior odds, , the posterior probability is
Of a bank's transactions, are fraudulent. An alert is raised times as often on fraudulent transactions as on genuine ones. Find the probability that an alerted transaction is fraudulent.
Solution
We name the hypothesis and the evidence:
The prior is , so and the prior odds are
An alert is raised times as often when holds as when it does not, so the likelihood ratio is . Multiplying the prior odds by it gives the posterior odds:
We convert the posterior odds to a probability with :
An alerted transaction is fraudulent with probability .
Practice questions
4 questions
Given that a patient tests positive, the odds that they have the condition are to .
What is the probability that a patient who tests positive has the condition?
Select the correct answer:
+ 3 more questions