Week1
Week1
Jeffrey Kwan
Term 2, 2023
1/40
Introduction to Probability
2/40
Experiment, Sample Space, Event
3/40
Experiment, Sample Space, Event
4/40
Experiment, Sample Space, Event
An event occurs if the result of the experiment is one of the outcomes in that event.
Example
When tossing a coin twice, the event A:"At least one tail" corresponds to the set
{HT , TH, TT }.
5/40
Event relations
The event Ā (right) defines the complement of A: the elements in Ω that are not in A.
A A
6/40
Event relations
The set A ∩ B (left) is the intersection of A and B: it occcurs if both A and B occur.
A B A B
7/40
Event relations
Example
We roll a dice once.
Define the events A = {1, 3} and B = {2, 3, 5}. Then
• A ∩ B = {3}
• A ∪ B = {1, 2, 3, 5}
8/40
Mutual exclusivity
Events are mutually exclusive (disjoint) if they have no outcomes in common; that is, if
they cannot both occur.
If A and B are mutually exclusive, we can say that A ∩ B = ∅, where ∅ denotes the
empty set.
Example
We toss a coin 3 times and let H denote "head", T denote "tail".
The sample space is S = {HHH, HHT , HTH, THH, TTH, THT , HTT , TTT }.
Let A be the event ‘at least one head’:
A = {HHH, HHT , HTH, THH, TTH, THT , HTT }.
Let B be the event ‘exactly two heads’: B = {HHT , HTH, THH}.
Let C be the event ‘at least two tails’: C = {TTH, THT , HTT , TTT }.
9/40
Mutual exclusivity
Example
Which of A, B, and C are mutually exclusive?
• We have that B ⊂ A thus A ∩ B = B. So if B occurs then A must occur.
• Next we have A ∩ C = {TTH, THT , HTT } =
6 ∅.
• Last B and C cannot both occur, so they are mutually exclusive.
(Video explanation)
Example
Let’s say {HTT } is the result of the experiment. Which of A, B and C have occurred?
A and C have occurred, but not B.
(Video explanation)
10/40
Axioms of Probability
To each event A ⊂ Ω, we assign a number P(A), the probability that A occurs, defined
by
#(basic outcomes in A)
P(A) =
#(basic outcomes in Ω)
1. P(A) ≥ 0,
2. P(Ω) = 1,
It follows that
2. P(∅) = 0,
12/40
Axioms of Probability
13/40
Counting Rules
VARIATIONS
• Every group of i elements chosen from a set of n elements in which the ordering of
elements matters is called a variation of the i-th order of n elements.
• If there are k experiments with ni possible outcomes in the i-th (i = 1, . . . , k), then
the total number of possible outcomes for the k experiments is
i=1 ni = n1 × · · · × nk .
Qk
14/40
Counting Rules
Example
We toss a 6-sided die three times. What is the number of outcomes in the sample
space (Find k and nj )?
Here there are k = 3 experiments each having six possible outcomes, hence
n1 = n2 = n3 = 6. The sample space contains 216 possible outcomes.
(Video explanation)
Example
An urn contains a black (B), a red (R) and a green (G) ball. We draw two balls with
repetition. What is the number of outcomes in the sample space?
This is a variation of the 2nd order of 3 elements with repetition. There are 32 = 9
possible outcomes: {B, B}, {B, R}, {B, G}, {R, B}, {R, R, {R, G}, {G, B}, {G, R}
and {G, G}.
15/40
Counting Rules
PERMUTATIONS
## [1] 12
16/40
Counting Rules
Example
A particular committee has four members labeled as a, b, c and d. One member must
chair the committee, and a different committee member must take minutes from
meetings.
How many different ways are there of choosing a Chair and a Minute-taker for this
committee?
There are n = 4 members and we need to choose r = 2 of them. Here the order
matters. Hence the number of possible ways to select a Chair and a Minute-taker is
4 P = 12. These are {a, b}, {a, c}, {a, d}, {b, a}, {b, c}, {b, d}, {c, a}, {c, b}, {c, d},
2
{d, a}, {d, b} and {d, c}
(Video explanation)
COMBINATIONS
Example
A particular committee has four members labeled as a, b, c and d. Two committee
members will need to present the committee’s recommendations to the board of
directors.
How many ways are there of choosing two committee members to report to the board
of directors?
We choose r = 2 members and ignore order. The number of possibilities is C (4, 2) = 6.
Indeed the possibilities are: {ab}, {ac}, {ad}, {bc}, {bd} and {cd}.
(Video explanation)
19/40
Conditional Probability
The conditional probability that an event A occurs, given that an event B has occurred is
P(A ∩ B)
P(A|B) = for P(B) > 0.
P(B)
Given that B has occurred, the total probability for possible results of the experiment
equals P(B), so that the probability that A occurs equals the total probability for
outcomes in A (only those in A ∩ B) divided by the total probability, P(B).
In other words, by assuming that B has occurred, we have defined a new sample space
Ω = B and a new probability P(A|B).
20/40
Conditional Probability
Lemma
Proof:
If the probability of A remains the same, whether or not B has occurred, we say that the
two events are statistically independent.
21/40
Independent Events
For any two events A and B, P(A ∩ B) = P(A|B)P(B), so A and B are independent
implies that P(A|B) = P(A). By the previous Lemma it also implies P(B|A) = P(B).
Example
We toss a two fair dice and let:
• A be the event "4 on first die"
• B be the event "sum of numbers is 7"
• C be the event "sum of numbers is 8".
Show that A and B are independent.
Show that A and C are dependent.
22/40
1.5. INDEPENDENT
Independent Events EVENTS 7
Example
We can write S as
We can write the sample space as
S = {(1, 1), (1, 2), . . . , (1, 6), (2, 1), . . . , (2, 6), . . . , (6, 6)}
Ω = {(1, 1), (1, 2), . . . , (1, 6), (2, 1), . . . , (2, 6), . . . , (6, 6)}.
or display it as follows;
It contains 36 possible outcomes, each with probability 1/36.
2nd die
1 2 3 4 5 6
1 · · · · ·
2 · · · · ·
1st die 3 · · · · · A ⇥
4 ⇥ ⇥ ⌦ ⇥ ⇥ ⇥ B
5 · · · · · C ⇤
6 · · · · ·
23/40
Independent Events
Example
• P(A) = 36
6
= 16 , P(B) = 36
6
= 16 , P(A ∩ B) = 1
36 and 1
36 = P(A ∩ B) = P(A)P(B).
Thus A and B are independent.
• P(C ) = 36
5
,P(A ∩ C ) = 36 ,
1
so 1
36 = P(A ∩ C ) 6= P(A)P(C ) = 1
6 × 36 .
5
Thus A and
C are not independent.
P(A ∩ C ) 1/36 1
• Also, P(A|C ) = = = 6= P(A), again confirming A and C are
P(C ) 5/36 5
not independent.
(Video explanation)
24/40
Independent Events
For a countable sequence of events {Ai }, the events are pairwise independent if
and the events are (mutually) independent if for any collection Ai1 , Ai2 , . . . , Ain ,
Clearly, independence implies pairwise independence, but not vice versa, as in the
following example.
25/40
Independent Events
Example
A coin is tossed twice and let
• A be the event "head on the first toss"
• B the event "head on the second toss"
• C the event "exactly one head turned up".
The events A, B and C are pairwise independent (can you show this?), but
1
3
P(A ∩ B ∩ C ) = 0 6= P(A)P(B)P(C ) = ,
2
so A, B and C are not independent.
(Video explanation)
26/40
Independent Events
Example
A ball is drawn at random from an urn containing 4 balls numbered 1,2,3 and 4. Let
• A be the event "ball 1 or ball 2 is drawn" =⇒ A = {1, 2}
• B the event "ball 1 or ball 3 is drawn" =⇒ B = {1, 3}
• C the event "ball 1 or ball 4 is drawn" =⇒ C = {1, 4}.
Show that A, B, and C are pairwise independent but not independent.
We have P(A ∩ B) = P({1}) = 14 = P(A)P(B) so A and B are (pairwise) independent.
Similarly, A and C , and B and C are independent.
On the other hand, P(A ∩ B ∩ C ) = P({1}) = 1
4 6= P(A)P(B)P(C ) = 18 , so A, B and
C are not independent.
(Video explanation)
27/40
Some Probability Laws
MULTIPLICATIVE LAW
For events A1 , A2
P(A1 ∩ A2 ) = P(A2 ∩ A1 )
= P(A2 |A1 )P(A1 ).
For events A1 , A2 , A3
P(A1 ∩ A2 ∩ A3 ) = P(A3 ∩ A2 ∩ A1 )
= P(A3 |A2 ∩ A1 )P(A2 ∩ A1 )
= P(A3 |A1 ∩ A2 )P(A2 |A1 )P(A1 ).
Example
To gain entry to a selective high school students must pass 3 tests.
• 20% fail the first test and are excluded.
• Of the 80% who pass the first, 30% fail the second and are excluded.
• Of those who pass the second, 60% pass the third.
Let Ai be the event "pass i-th test", i = 1, 2, 3.
Question 1: What proportion of students pass the first two tests?
29/40
Some Probability Laws
Example
Question 2: What proportion of students gain entry to the selective high school?
Question 3: What proportion pass the first two tests, but fail the third?
ADDITIVE LAW
A B A B A B A B
A B A B A B
B A B A B
32/40
Some Probability Laws
Example
Three letters are placed at random into three addressed envelopes.
What is the probability that none is in the correct envelope?
Let A, B, C be the events that envelopes 1, 2 and 3 contain the correct letters.
Then P(A) = P(B) = P(C ) = 31 and P(A ∩ B) = P(A ∩ C ) = P(B ∩ C ) = 1
6 since,
for example, P(A ∩ B) = P(B|A)P(A) = 12 × 13 .
Also, P(A ∩ B ∩ C ) = 16 since all 3 envelopes must contain the correct letters if any 2
envelopes contain the correct letters.
This means that P(A ∩ B ∩ C ) = P(A ∩ B) = P(A ∩ C ) = P(B ∩ C ).
33/40
Some Probability Laws
Example
Thus,
34/40
Some Probability Laws
k
P(B) = P(B|Ai )P(Ai ).
X
i=1
Proof: B = ki=1 (B ∩ Ai ) (disjoint union since the Ai ’s are disjoint). By axiom 3 (in
S
35/40
Some Probability Laws
Example
Urn I contains 3 red and 4 white balls. Urn II contains 2 red balls and 4 white. A ball
is drawn from Urn I and placed unseen into Urn II. A ball is now drawn at random
from Urn II.
What is the probability that this second ball is red?
Let A1 be the event "1st ball drawn red", A2 be the event "1st ball drawn white" and
B be the event "2nd ball drawn red". A1 and A2 are mutually exclusive (they cannot
both occur) and exhaustive (one of them must occur) and so
36/40
Bayes’ formula
P(A ∩ B) P(B|A)P(A)
P(A|B) = = .
P(B) P(B)
37/40
Bayes’ formula
Example
Recall the previous example.
Given that the second ball is red, what is the probability that the first ball was white?
P(B|A2 )P(A2 ) 2
× 4
8
P(A2 |B) = = 7 7
= .
P(B) 17
49
17
(Video explanation)
38/40
Bayes’ formula
Example
A diagnostic test for a certain disease is claimed to be 90% accurate because, if a
person has the disease, the test will show a positive result with probability 0.9 while if
a person does not have the disease the test will show a negative result with probability
0.9. Only 1% of the population has the disease.
If a person is chosen at random from the population and tests positive for the disease,
what is the probability that the person does in fact have the disease?
39/40
Bayes’ formula
Example
Let A be the event "person has disease" and B be the event "person tests positive".
P(A ∩ B) P(B|A)P(A)
P(A|B) = =
P(B) P(B|A)P(A) + P(B|Ā)P(Ā)
since A and Ā form a partition (they are mutually exclusive and exhaustive).
Now P(B|A) = 0.9, P(A) = 0.01, P(B|Ā) = 0.1 andP(Ā) = 0.99 therefore
0.9 × 0.01 1
P(A|B) = = .
0.9 × 0.01 + 0.1 × 0.99 12
This means that, given that the person’s test result is positive the probability that a
person has the disease is 12
1
.
(Video explanation)
40/40