Probability and Statistics — Lecture 2
Conditional Probability and Bayes' Rule a
This lecture focuses on:
- Conditional probability
- Multiplication rule
- Law of total probability
- Bayes' rule
- Independence of events
It also briefly reviews permutations and combinations. :contentReference[oaicite:0]
1. Permutations and Combinations
Permutations
For a permutation, the order matters.
If we arrange all
Example
25 students are placed in a queue:
If 3 of the 25 students sit on three different chairs:
because there are:
- 25 choices for the first chair
- 24 choices for the second chair
- 23 choices for the third chair
Combinations
For a combination, the order does not matter.
The number of ways to choose
Example
3 out of 25 students are allowed to enter the museum shop:
Permutation: who goes where → order matters
Combination: who is selected → order does not matter
2. Probability of an Intersection
For two events
This follows from the sum rule:
However,
is not always true.
It is only true when
3. Conditional Probability
Definition
The probability of
provided that:
Interpretation
Knowing that
The conditional probability is then the probability of
"the probability of
Example: Throwing a Die
A die is thrown twice.
Without any extra information:
Now suppose we are told that:
The possible outcomes are:
Only one of these has first throw equal to 5.
Therefore:
The extra information changes the relevant sample space.
4. The Difference Between and
In general:
The lecture illustrates this using teachers and park rangers.
Even if:
this does not imply:
because there may be many more teachers than park rangers.
Never confuse:
with
5. Multiplication Rule
Starting from the definition:
we obtain:
Equivalently:
Example: Pebbles
A box contains:
- 10 pebbles
- 3 granite pebbles
Two pebbles are selected without replacement.
Let:
first pebble is granite second pebble is granite
Then:
After one granite pebble has been selected:
- 9 pebbles remain
- 2 granite pebbles remain
so:
Using the multiplication rule:
6. Summary of Probability Rules
Sample Space
Sum Rule
Complement Rule
Multiplication Rule
De Morgan's Laws
Therefore:
and:
7. Law of Total Probability
Suppose the sample space is split into:
Then event
Therefore:
Using the multiplication rule:
General Form
Suppose:
are disjoint and fill the whole sample space:
and:
Then:
Example: Production Machines
Three machines produce resistors:
| Machine | Accuracy | Production share |
|---|---|---|
| 80% | 30% | |
| 90% | 50% | |
| 60% | 20% |
Let:
Then:
So a randomly selected resistor has an 81% probability of being accurate.
8. Bayes' Rule
Bayes' rule is used when we want to reverse the direction of a conditional probability.
For example, we may know:
but want:
From:
and:
we get:
Using the law of total probability:
9. Bayes' Rule for Multiple Causes
If:
form a partition of the sample space, then:
The numerator is:
which represents the probability that:
- cause
occurs - and observation
is observed
The denominator is the total probability:
10. Example: Medical Test
Let:
and:
The test satisfies:
95% of non-infected people test negative:
therefore:
Also:
and:
We want:
Using Bayes' rule:
Substituting:
Therefore:
Even though 90% of infected people test positive, a positive test does not mean there is a 90% probability of being infected.
The base probability of infection,
11. Independence
Definition
An event
In other words, knowing that
Equivalent Condition
From the multiplication rule:
If
so:
This is often the easiest condition to use when checking independence.
Symmetry
If
12. Independence of More Than Two Events
For events:
independence must hold for every subset.
For three events, for example, we need:
and also:
Pairwise independence does not automatically imply full independence.
Three events may be independent in every pair while not being jointly independent.
This is explicitly highlighted as an exam-style pitfall in the lecture. :contentReference[oaicite:1]
13. Independent vs Disjoint
These concepts are very different.
Disjoint Events
Events are disjoint when:
Therefore:
They cannot happen at the same time.
Independent Events
Events are independent when:
If
while:
so they cannot be independent.
For events with positive probability:
disjoint
If
14. Which Rule Should I Use?
| Situation | Rule |
|---|---|
| Probability of |
Conditional probability |
| Probability of both |
Multiplication rule |
| Several possible causes can produce |
Law of total probability |
| Observation is known and cause is unknown | Bayes' rule |
| Check whether events affect each other | Independence |
| Probability of |
Sum rule |
| Probability of not |
Complement rule |
15. Formula Overview
or equivalently:
16. Common Pitfalls
1. Reversing conditional probabilities
2. Ignoring the base probability
A highly accurate medical test can still give a relatively low
when the infection is rare.
3. Using automatically
This is only valid when the events are independent.
4. Confusing pairwise and full independence
For three or more events, the larger intersections must also be checked.
5. Confusing disjoint with independent
Disjoint events with positive probability are actually dependent.
17. What You Should Be Able to Do
According to the lecture wrap-up, you should be able to:
- compute and interpret conditional probabilities
- apply the different probability rules
- compute conditional probabilities using Bayes' rule
- check whether events are independent :contentReference[oaicite:2]
Core Idea
The most important starting point of the lecture is:
From this follows the multiplication rule:
and together with the law of total probability, we obtain Bayes' rule: