Professional Documents
Culture Documents
University of Rwanda
ACE-DS
Semester 1, 2020-2021
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Outline 1
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Introduction 2
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Introduction (cont.) 3
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Introduction (cont.) 4
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Random experiment 5
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Sample space 6
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Event 7
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Examples 8
S = {1, 2, 3, 4, 5, 6}.
Events could be
A :“The head occurred twice”:
A = {HHT, HT H, T HH}.
B=“The number of heads is greater than the number of
tails”:
B = {HHH, HHT, HT H, T HH}.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Examples (cont.) 9
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events 10
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events (cont.) 11
A ⊂ B.
Ā or Ac (The complement of A in S) = “The event that
occurs if and only if A does not”.
Example
In the previous example the event B̄:“The number of heads
is less than the number of tails”:
B̄ = {HT T, T HT, T T H, T T T }.
Note that B ∪ B̄ = S.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events (cont.) 13
B\A = {HHH}.
We have
A\B = A ∩ B̄
and
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events (cont.) 14
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events (cont.) 15
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Operations on events (cont.) 16
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Properties 17
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Properties (cont.) 18
P9 : A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C) and
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C); (distributive laws)
P10 : A ∩ ∅ = ∅ and A ∪ ∅ = A;
P11 : A ∩ S = A and A ∪ S = S;
P12 : A ∩ Ā = ∅ and A ∪ Ā = S;
P13 : If B ⊂ A, then A ∩ B = B and A ∪ B = A;
P14 : A ∪ B = Ā ∩ B̄ and A ∩ B = Ā ∪ B̄; (De Demorgan’s Laws)
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Algebra of events 19
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
σ−Algebra of events 20
Let A be an algebra of S.
A is a σ−Algebra or σ−Field of S if for any countable infinite
sequence of events A1 , A2 , . . . , An , . . . of A, then
∪∞
i=1 Ai ∈ A.
As a consequence
∩∞
i=1 Ai ∈ A.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
KOLMOGOROV’s axioms of probability 21
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Probability space 22
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Properties of a probability 23
P1 P (∅) = 0.
P2 Let {A1 , A2 , . . . , An } be a finite collection of n events such
that Ai ∩ Aj = ∅ for i 6= j. Then
n
X
P (∪ni=1 Ai ) = P (Ai ).
i=1
P3 P (Ā) = 1 − P (A).
P4 If A ⊆ B ⊆ S, then P (A) ≤ P (B).
P5 If A is any event in S, then 0 ≤ P (A) ≤ 1.
P6 If A and B are any two events, then
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Finite probability space 24
#PS = 2n .
The function
#A
P : PS −→ R, A 7→ P (A) = ,
#S
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Finite probability space (cont.) 25
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Conditional probability 26
P (A ∩ B)
PB : A −→ R, A 7→ PB (A) = ,
P (B)
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Properties 27
P (A/B) = 1.
Indeed,
P (A ∩ B) P (B)
P (A/B) = = = 1.
P (B) P (B)
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Example 28
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Example 29
Answer:
Then
A1 ∩ A2 : “The two balls are white”.
We have
P (A1 ∩ A2 ) = P (A2 /A1 )P (A1 ) = 0.1,
where P (A1 ) = 2/5 and P (A2 /A1 ) = 1/4.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Independent events 30
P (A ∩ B) = P (A)P (B).
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Independent events (cont.) 31
Remark
If A and B are two incompatible events, then they cannot be
independent, unless P (A)P (B) = 0.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Some properties of the independence of events 32
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Example 33
The probability that the machine ”a” fails during any day is
0.025; similarly for the machine ”b” that probability is 0.015.
Given that the machines operate independently, find
(a) The probability that both machines fail simultaneously.
(b) The probability that no machine fails.
(c) The probability that one or the other has a fault.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Example 34
Answers
Let A :“The machine ”a” fails” and B :“The machine “b” fails”.
Then, P (A) = 0.025, P (B) = 0.015.
(a) P (A ∩ B) = P (A)P (B) = 0.0004
(b) P (Ā ∩ B̄) = (1 − P (A))(1 − P (B)) = 0.96
(c) P (A ∪ B) = P (A) + P (B) − P (A)P (B) = 0.0396
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Law of Total Probability 35
Bi ∩ Bj = ∅ if i 6= j and ∪ni=1 Bi = S.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Law of Total Probability-Example 36
The 1st contains two white balls and one black, the 2nd
contains three white and one black, the 3rd contains two white
and 2 black.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Law of Total Probability-Example (cont.) 37
Answer:
Define the events:
B1 : “the 1st basket is chosen”, B2 : “the 2nd basket is chosen”,
B3 : “the 3rd basket is chosen”, A: “the drawn ball is white.
We have that B1 ∪ B2 ∪ B3 = S, A ⊂ S and
P (B1 ) = P (B2 ) = P (B3 ) = 31 .
Using the law of total probability
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Bayes Theorem 38
P (A/Bi )P (Bi )
P (Bi /A) = Pn .
k=1 P (A/Bk )P (Bk )
P (A/B)P (B)
P (B/A) = ,
P (A)
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Bayes Theorem-Example 39
A device has been tested and proved good. Find the probability
that it is made up with high quality parts.
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Bayes Theorem-Example (cont.) 40
Answer:
Define the following events
B1 : “A device is made up with parts of high quality”,
B2 : “A device is made up with parts of ordinary quality”,
A: “The drawn device is good”.
We are asked to determine P (B1 /A).
From the of Bayes formula, we get
P (A/B1 )P (B1 )
P (B1 /A) = = 0.475,
P (A/B1 )P (B1 ) + P (A/B2 )P (B2 )
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS
Exercises 41
Separate sheet!
Dr. Joseph Nzabanita and Dr. Annie Uwimana DSC6132 Part 1-Probability, MSc. in DS