Free preview
74 lessons
Essential Probability & Statistics for ML
Free preview
Essential Probability & Statistics for ML · 74 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 formula from probabilities
We've seen that when outcomes are equally likely, we find by restricting to the known event and counting. Counting relies on every outcome being equally likely. When outcomes have different probabilities, we restrict to in the same way, but measure each region by its probability rather than by its number of outcomes.
The diagram below conditions on in steps, with the probability of each region written in.
Each region of
Restricting and rescaling work the same way for any events, so we take the result as the definition of conditional probability.
Definition
For events and with , the conditional probability of given is
We need because the formula divides by : an event that cannot happen can never be learned, so there is nothing to restrict to.
A die is loaded: faces to have probabilities , , , , and . Given that the roll is at most , find the probability that it is odd.
Solution
We name the two events. The roll being at most is what we know, so it is the known event:
We want . The table marks the faces in and those also in :
| Face | ||||||
|---|---|---|---|---|---|---|
| Probability | ||||||
| In | Yes | Yes | Yes | |||
| In | Yes | Yes |
Adding the marked probabilities:
We rescale by dividing by :
Given that the roll is at most , it is odd with probability .
Counting faces would give , since two of the three faces in are odd. That treats faces , and as equally likely, but face alone has probability , which is half of .
Practice questions
4 questions
On a weekday morning, it rains with probability and a commuter's bus is late with probability . The probability that it rains and the bus is late is .
Given that it rains, what is the probability that the bus is late?
Select the correct answer:
+ 3 more questions
Probability rules given an event
A probability function is any function that satisfies the two axioms of probability. If conditional probabilities given satisfy them as well, they are probabilities, and every rule that follows from the axioms holds for them too. We check each axiom in turn, using the conditional probability formula.
Axiom 1 says the impossible event has probability and the certain event has probability . Given , the impossible event still has no outcomes, so and
Once we know that happens, every outcome left is in , so and
So the probabilities given total , and axiom 1 holds.
Axiom 2, additivity, holds given as well. If two events and have no outcome in common, neither do their parts inside , and rescaling divides every probability by the same number, , so a sum of probabilities stays a sum:
This is additivity with written after every probability.
Details
So conditional probabilities given satisfy both axioms: they are probabilities. Every rule that follows from the axioms, such as the complement rule and the general addition rule, therefore holds given .
Theorem
For an event with , every rule of probability holds given . For example,
Key Point
To use a rule of probability given , we write the rule as usual and add after every probability in it. Nothing else changes: stays the known event in every term.
In a sports club, of members play tennis and play both tennis and squash. A member chosen at random plays tennis. Find the probability that they do not play squash.
Solution
We name the events. That the member plays tennis is what we know, so it is the known event:
We want . The complement rule holds given :
So we first find with the conditional probability formula:
Substituting into the complement rule:
A member who plays tennis does not play squash with probability .
Practice questions
5 questions
Among patients with a cough, the probability of flu is . Given that a patient has a cough, what is the probability that they do not have flu?
Select the correct answer:
+ 4 more questions