Professional Documents
Culture Documents
Mathematical Statistics
Lecture 2 - Probability
Akerke Zhailaubek
akerke.zhailaubek@astanait.edu.kz
Lecture overview:
1. Introduction to probability.
2. Independent and dependent events.
3. Classical probability. Conditional probability.
4. The law of total probability. Bayes' Theorem.
5. Tree and Venn diagrams.
2
We will review the vocabulary by considering the
action of repeatedly throwing a six-faced die and
recording the number displaying upwards.
3
The experiment is the action of repeatedly throwing
the die.
The outcome is the number displayed upwards.
Getting a ‘5’, say, is an event. Getting a ‘5 or 6’ is also
an event.
5
The probability of an event, e.g. the probability of
getting a ‘5’ when throwing a die, is the chance that the
event will occur as a result of an experiment.
6
Where outcomes are equally likely then probability of
an event is the number of outcomes in the event
divided by the total number of possible outcomes in
the sample space.
So, if the event were getting a ‘5 or 6’, then the
probability would be 2/6, i.e. 1/3.
7
• An impossible event has a probability of 0.
• A certain event has a probability of 1.
• So, all events have probabilities between 0 and 1.
• Probabilities can be written as fractions, decimals or
percentages.
8
Two fair spinners each have four faces numbered 1
to 4. The two spinners are thrown together and the
sum of the numbers indicated on each spinner is
recorded.
+ =?
1 2 1 2
4 3 4 3
9
10
See the notation used here. P for
probability, the event is in brackets.
11
Remember: a sample space is all possible
This is a Venn diagram outcomes and an event is a collection of
one or more outcomes.
Closed curves :
12
You can write the number of outcomes for each event
or the probabilities of the events in the Venn diagram.
13
Intersection: A and B both occur , A ⋂ B
14
Union: A or B or both occur, A ⋃ B
15
Complement: any outcome but not A occurs, A’
16
A survey of 79 families found that 22 owned cats , 27
owned dogs and 7 owned both cats and dogs.
17
Our Venn diagram needs to show the event ‘owns a cat’
and the event ‘owns a dog’.
19
S
C D
20
S
C D
79- (15+7+20)= 37
21
All that is really necessary for the Venn diagram is this:
C D
15 7 20 37
23
The addition rule
24
This is the addition rule:
25
• Consider a two event Venn diagram to see why this is
true.
• Let P(A) = a, P(B) = b and P(A ⋂ B) = i
• Let the sample space be S
A B S
a–i i b–i
26
A B S
a–i i b–i
Now, P(A ⋃ B) = a – i + i + b – i = a + b – i
Hence, P(A ⋃ B) = P(A) + P(B) – P(A ⋂ B)
27
Example
29
To answer parts c and d, we will use a Venn diagram.
A B S
0.2 0.4 0.3
From part a
0.1
30
Part c: P(A’ ⋃ B)
This means we want to be not in A or in B.
Find this area on the Venn diagram:
A B S
0.2 0.4 0.3
0.1
So, P(A’ ⋃ B) = 0.4 + 0.3 + 0.1 = 0.8
31
Part d: P(A’ ⋂ B)
Method 1
Using the formula:
P(A’ ⋂ B) = P(A’) + P(B) – P(A’ ⋃ B)
and P(A’) = 1 – P(A)
32
Part d: P(A’ ⋂ B)
Method 2
This means we want to be not in A and in B.
Find this area on the Venn diagram:
A B S
0.2 0.4 0.3
0.1
34
If the 3 events are A, B and C then we need eight
regions
35
A B
A only A and B
but not C B only
A and B
A and C and C
B and C
but not B
but not A
C only
Neither A or B or
C C
36
Example
A vet surveys 100 of her clients. She finds that
25 own dogs, 15 own dogs and cats, 11 own dogs and
tropical fish, 53 own cats, 10 own cats and tropical fish, 7
own dogs, cats and tropical fish, 40 own tropical fish.
38
• Since the question is asking about the probability of
owning the various animals, then each animal is one
event.
• There are three types of animals; dogs, cats and fish.
• So, we will have three circles (one for each event).
• Use the first letter for each animal as labels for the
events; D, C and F (we use capital letters for events).
39
D C S
40
• Now we must enter the numbers given in the
question into each section.
• Think about what each section represents.
• Firstly, fill in the numbers given in the question.
• Then work out any missing numbers.
41
Enter the easy numbers first.
F (40)
42
From the question: D ⋂ C = 15 (dog and cat)
F (40)
43
Continuing: C ꓵ F = 10 (cat and fish)
and D ꓵ F = 11 (dog and fish)
F (40)
44
Using the totals for D, C, F and S we can find the
missing numbers.
D C S
6 8 35
7
4 3
26
11
F
46
• Now we must answer the rest of the question.
• To find the probability of each section we simply
divide the section number by the total number of
animals, i.e. 100.
• Identify the correct section of the Venn diagram for
each part of the question.
47
P(owns dogs only)
= 6/100 = 3/50
D C S
6 8 35
7
4 3
26
11
F
48
P(does not own tropical fish)
= (6 + 8 + 35 + 11)/100
= 60/100 = 3/5
D C S
6 8 35
7
4 3
26
11
F
49
P(does not own dogs, cats or fish)
= 11/100
D C S
6 8 35
7
4 3
26
11
F
50
Question
A group of 100 people produced the following
information relating to three attributes.
The attributes were wearing glasses, being left-handed
and having dark hair.
Glasses were worn by 36 people, 28 were left-handed
and 36 had dark hair.
There were 19 who wore glasses and had dark hair, 17
who wore glasses and were left-handed, and 15 who
were left-handed and had dark hair.
Only 10 people wore glasses, were left-handed and had
dark hair.
a) Represent these data on a Venn diagram.
Solution
Glasses Left
10 7 6
10
9 5
41 12
Dark
Based on the Venn diagram you drew, solve the following
questions.
#!
c) = 0.41
!""
$%&%' (!
d) = = 0.21
!"" !""
Mutually exclusive events
• When events have no outcomes in common, then
they are mutually exclusive.
B S
A
No intersection, P(A ∩ B) = 0
Can you state the addition rule for mutually exclusive events?
Addition rule for mutually exclusive events
c) P(A’ ∩ B’)
we locate not A and not B: P(A’ ∩ B’) = 0.4
Conditional probability
Notation:
The probability of event A given B is written as P(
A|B ).
Formula:
𝐏(𝑨 ∩ 𝑩)
𝐏 𝑨𝑩 =
𝐏(𝑩)
Why?
A B S
A B S B
Find
Solution
a) P(D|C) a) We can use the multiplication rule:
b) P(C’∩D’) P(C ∩ D) = P(C|D) x P(D)
c) P(C’∩D) = 0.3 x 0.6 = 0.18
b) P(C’∩D’)
This means not in C and not in D.
P(C’ ∩ D’) = 0.38
S
C D
c) P(C’∩D)
This means not in C and in D.
P(C’ ∩ D) = 0.42
S
C D
0.7 A
After the event A or A’
either B occurs or B’.
A’
0.3 This will be shown on the
second branch of the tree
diagram
Branch 1
0.9
? B ? = P(B|A)
0.7 A
B’ ? = P(B’|A)
0.1?
0.2? B ? = P(B|A’)
0.3 A’
B’ ? = P(B’|A’)
0.8
?
Can you complete the
tree diagram by
Branch 1 Branch 2 identifying the four
missing probabilities?
The conditional probability 𝑷 𝑩 𝑨 and 𝑷 𝑨 ∩ 𝑩 are
different!!!!!
The sum is 1!
Example continued
What is the probability that Adil played a game for
more than 4 hours (event A) on a certain day given that
he missed the 9 am seminar next day (event B)?
0.9 B
A
𝑷 𝑨 𝑩 =?
0.7
0.1 B’
B
A’ 0.2
0.3
This is 𝑃 𝐵 𝐴 ,
0.8 B’ not 𝑃(𝐴|𝐵)
Solution
By definition,
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴𝐵 =
𝑃(𝐵)
𝑃 𝐴 ∩ 𝐵 = 0.7×0.9 = 0.63
𝑃 𝐵 = 𝑃 𝐴 ∩ 𝐵 + 𝑃 𝐴′ ∩ 𝐵
= 0.7×0.9 + 0.3×0.2 = 0.69
".+, +,
Therefore, 𝑃 𝐴 𝐵 = ".+& = +&
Example
7# G1 6#
10 G3
12 5#
11 B2
7#
11 G2 4#
10 B3
5#
12 B1 7#
10 G3
4#
11 B2
3#
10
B3
Conditional probability using a Venn diagram
Example 4. Do you remember the three event Venn diagram
from the first probability lecture? Use the Venn diagram to find
the following conditional probabilities for a randomly chosen
client.
a) own cats given that they own dogs
b) own cats given they own dogs and tropical fish
c) own cats given they own dogs or tropical fish or both.
D S
6 8 35 C
7
4 3
26
11 F
Solution
a) Since owning a dog is already assumed, you need to
restrict your interest to “D” only and the total number
of outcomes is 6+4+7+8=25.
In the region for “D”, 8+7=15 also own a cat.
!'
Therefore, 𝑃 𝐶 𝐷 = = 0.6
('
$
b) Similarly, 𝑃 𝐶 𝐷 ∩ 𝐹 =
!!
-%$%, !- !
c) 𝑃 𝐶 𝐷 ∪ 𝐹 = = =
+%#%-%$%,%(+ '# ,
Independent events
Recall: What are mutually exclusive events?
Find
a) P(A ∩ B)
b) P(A ∩ B’)
c) P(A’ ∩ B’)
Solution
$
𝑃 𝐺! = from the tree diagram.
!(
How about 𝑃 𝐺( = ?
The first bead can be either green or blue.
That is, (G1 and G2) or (B1 and G2).
Solution continued
𝑃 𝐺( = 𝑃 𝐺! ∩ 𝐺( + 𝑃 𝐵! ∩ 𝐺(
$ $ ' $ $
= × + × =
!( !( !( !( !(
$ $ $
𝑃 𝐺! ∩ 𝐺( = × and 𝑃 𝐺! = 𝑃 𝐺( = .
!( !( !(
Hence, 𝑃 𝐺! ∩ 𝐺( = 𝑃 𝐺! ×𝑃(𝐺( ) and we can
conclude that 𝐺! and 𝐺( are independent.
The Law of Total Probability
• Let 𝐴! , 𝐴( , … , 𝐴. be mutually exclusive and
exhaustive events. Then for any other event 𝐵,
𝑃 𝐵 = 𝑃 𝐵 𝐴! 𝑃 𝐴! + ⋯ + 𝑃 𝐵 𝐴. 𝑃 𝐴.
.
= H 𝑃 𝐵 𝐴/ 𝑃 𝐴/
/0!
Bayes’ Theorem
• Let 𝐴! , 𝐴( , … , 𝐴. be a collection of 𝑘 mutually
exclusive and exhaustive with prior probabilities
𝑃 𝐴/ 𝑖 = 1, … , 𝑘 . Then for any other event B for
which 𝑃(𝐵) > 0, the posterior probability of 𝐴1 given
that B has occurred is
2 3! ∩5 2 5|3! 2(3! )
𝑃 𝐴1 𝐵 = = , 𝑗 = 1, … , 𝑘
2 5 "#$ 2 𝐵 𝐴/ 2 3"
∑%
Example
Solution
Solution cont.
References:
1. Statistics 1 Edexcel AS and A Level Modular
Mathematics S1 published by Pearson
Education Limited
2. Lecture notes, NUFYP, Nazarbayev
University.
98