Chapter 2
Chapter 2
Probability
2
Introduction
Statisticians are often dealing with either numerical (Quantitative)
data, representing counts or measurements, or categorical
(Qualitative) data. Any recording of information, whether it be
numerical or categorical, is an observation.
Introduction
Introduction
All statistical experiments have three things in common:
Sample Space
The set of all possible outcomes of a statistical experiment is called
the sample space and is represented by the symbol S.
n=6
6
Sample Space
A sample space is discrete if it consists of a finite or countable infinite set of
outcomes (S={10,20,30,40} , S={1,2,3,…})
More than one sample space can be used to describe the outcomes of an
experiment.
7
Sample Space
➢ Randomly select a camera and record the recycle time of a flash.
S = R+ = {x | x > 0}, the positive real numbers, is continuous infinite.
➢ Suppose it is known that all recycle times are between 1.5 and 5
seconds.
S = {x | 1.5 ≤ x ≤ 5} is continuous finite.
➢ It is known that the recycle time has only three values(low, medium
or high).
S = {low, medium, high} attributes.
Sample Space
➢ Randomly select two cameras and record the recycle time of a flash. If the objective
of the analysis is to consider only whether the cameras conform to the
manufacturing specifications or not.
S = {yy, yn, ny, nn}, attributes.
➢ Consider an experiment in which cameras are tested until the flash recycle time fails
to meet the specifications.
S = {n, yn, yyn, yyyn,…} attributes.
➢ Consider the number of cameras tested until the flash recycle time fails to meet the
specifications.
S = {1, 2, 3, 4,…} discrete infinite.
9
Sample Space
Sample spaces with a large or infinite number of sample points are best
described by a statement or rule.
What is the sample space of an experiment that represents the cities in the
world with a population over 1 million?
We read the previous rule as: S is the set of all x such that x is a city with a
population over 1 million.
Sample Space
11
Sample Space
An experiment consists of flipping a coin and then flipping it a second
time if a head occurs. If a tail occurs on the first flip, then a die is
tossed once. Construct a tree diagram and determine the sample
space.
12
Events
An event (E) is a subset of a sample space of a random experiment.
Events
➢ When tossing a die S={1,2,3,4,5,6}. The event A is getting an outcome that
is divisible by 3:
The event B is getting an outcome that is divisible by 21:
The event C is getting and outcome that is not divisible by 21:
Events
The intersection of two events A and B, denoted by the symbol A ∩ B, is the
event containing all elements that are common to A and B (the elements in
events A and B)
Example: Let A = {a, b, c} and B = {b, c, d, e}; then A ∩ B = {b, c}
Let C = {t I 4< t <8} D = {t I 6 ≤ t ≤12}; then C ∩ D = {t I 6 ≤ t< 8} continuous finite.
The union of the two events A and B, denoted by the symbol A∪B, is the event
containing all the elements that belong to A or B or both.
17
Discrete Events
In the game of snakes and ladders, a fair die is thrown. If event
E1 represents all the events of getting a natural number less than 4,
event E2 consists of all the events of getting an even number and
E3 denotes all the events of getting an odd number. List the sets
representing the following:
i)E1 or E2 or E3
ii)E1 and E2 and E3
iii)E1 but not E3
The sample space is given as S = {1 , 2 , 3 , 4 , 5 , 6}
E1 = {1,2,3} E2 = {2,4,6} E3 = {1,3,5}
i)E1 or E2 or E3= E1∪ E2 ∪ E3= {1, 2, 3, 4, 5, 6}
ii)E1 and E2 and E3 = E1∩ E2 ∩ E3 = ∅
iii)E1 but not E3 = E1 ∩ E3`= {2}
18
Continuous Events
If M = {x I 3<x<9 } and N = {y I 5<y<12} calculate:
i) M ∪ N
ii) M ∩ N
iii) M ∩ N`
iv) M`∪ N
i) M ∪ N = {z I 3<z<12}
ii) M ∩ N = {z I 5<z<9}
iii) N` = {y≤5 , y≥12} M ∩ N`= {z I 3<z ≤ 5}
iv) M` = {x≤3 , x≥9} M`∪ N= {z I z≤3 , z>5 }
19
Venn Diagrams
Venn diagrams are the diagrams that are used to represent the sets, relation
between the sets and operation performed on them, uses circles (overlapping,
intersecting and non-intersecting), to denote the relationship between sets.
Events Laws
➢ Commutative law (event order is unimportant):
A ∩ B = B ∩ A and A ∪ B = B ∪ A
Events Laws
➢ DeMorgan’s law:
(A ∪ B) = A ∩ B The complement of the union is the intersection of
the complements.
(A ∩ B) = A ∪ B The complement of the intersection is the union of
the complements.
➢ Complement law:
(A) = A
22
Exercises
23
➢ Multiplication rule.
➢ Permutations (linear and circular)
➢ Partitioning
➢ Combinations
We should know where to use each one of them based on the case.
24
Multiplication Rule
Suppose that two coins are tossed in parallel with the two dices, how
many sample points are there?
25
Multiplication Rule
For example:
we may want to know how many different arrangements are
possible for sitting 6 people around a table (circular).
we may want to know how many different orders are possible for a
lock with 4 numbers (linear).
Permutations-Distinct objects
Permutations
(select & arrange)
The order matters
Distinct Objects
Permutations-Distinct objects
29
Permutations-Distinct objects
A witness to hit and run accident told the police that the license number contained the
letters RLS followed by 4 digits, the first of which is 4. If the witness cannot recall the
last 3 digits, but he is certain that all 4 digits are different.
RLS4 _ _ _
0,1,2,3,4,5,6,7,8,9
Because of the 3 digits are different 4 will be out.
Therefore, the answere will be 9P3= 9!/(9-3)!=(9x8x7x6!)/(6!) = 504
Permutations-Distinct objects
objects
31
If there is repetition, we cannot use the permutation formula. We can solve questions with the
multiplication rule only.
32
Often, we are concerned with the number of ways of partitioning a set of n objects into
r subsets called cells. A partition has been achieved if the intersection of every possible
pair of the r subsets is the empty set φ and if the union of all subsets gives the original
set (S). The order of the elements within a cell is of no importance.
33
Combinations (select)
𝒏𝑪𝒓 =
Combinations (select)
Combinations (select)
Select then arrange, we calculate in how many ways can we select three
items from four then we arrange them by r! ways:
𝟒!
𝟒𝑷𝟑 = 𝟒𝑪𝟑 ∗ 𝟑! = 𝟑! = 𝟒 ∗ 𝟑 ∗ 𝟐 ∗ 𝟏 = 𝟐𝟒 𝒘𝒂𝒚𝒔
𝟏! 𝟑!
39
The relation between Permutations & Combinations
# of permutations ≥ # of combinations (they are equal only when r equals zero or 1, proof it)
Q1: A club has nine members. In how many ways can a committee of three be
chosen from the members of this club?
Q3:There are 30 people in a group. If all shake hands with one another , how
many handshakes are possible?
40
Exercises
41
Probability of an Event
Is a statement that quantifies our feeling about the possibility of rain. The
likelihood of an outcome is quantified by assigning a number from the
interval [0, 1] to the outcome (or a percentage from 0 to 100%). Higher
numbers indicate that the outcome is more likely than lower numbers. A 0
indicates an outcome will not occur. A probability of 1 indicates that an
outcome will occur with certainty.
42
Probability of an Event
We introduce probability for discrete sample spaces—those with
only a finite (or countably infinite) set of outcomes.
Probability of an Event
No
intersection
44
Probability of an Event
In the previous example, all sample points are equally likely, which means they have
the same weight, how to find the probability if the sample points are not equally
likely?
45
Probability of an Event
46
Probability of an Event
47
Probability of an Event
48
Probability of an Event
What is the probability that two defective parts are selected in the sample?
P=535,095/15,890,700=0.034
Additive Rules
Additive Rules
51
Additive Rules
52
Additive Rules
53
Additive Rules
54
Additive Rules
55
Additive Rules
56
57
Exercises
58
Conditional Probability, Independence, and the Product Rule
Your two favourite foods are Pizza and Mansaf. Let A represent the event that you
eat Pizza for breakfast, and B represent the event that you eat Mansaf for lunch. On
a randomly selected day, the probability that you will eat Pizza for breakfast, P(A), is
0.6. The probability that you will eat Mansaf for lunch, P(B), is 0.5. The conditional
probability that you eat Mansaf for lunch given that you eat Pizza for breakfast,
P(B/A), is 0.4. What is the probability that you eat Pizza for breakfast given that you
eat Mansaf for lunch?
One of these individuals is to be selected at random. What is the probability that a man
is chosen, given that he is already employed?
𝑛(𝑀 ∩ 𝐸) 460
𝑃 𝑀∩𝐸 = =
𝑛(𝑆) 900
𝑛(𝐸) 600
𝑃 𝐸 = =
𝑛(𝑆) 900
𝑃(𝑀 ∩ 𝐸)
𝑃 𝑀𝐸 =
𝑃(𝐸)
460/900 460 23
= = =
600/900 600 30
63
Conditional Probability, Independence, and the Product Rule
Example: The probability that a regularly scheduled flight departs on time is P(D)=0.83;
the probability that it arrives on time is P(A)=0.82; and the probability that it departs and
arrives on time is P(D ∩ A)=0.78. Find the probability that a plane:
𝑃(𝐴∩𝐷) 0.78
𝑎. 𝑃 𝐴 𝐷 = = = 0.94 𝑃 𝐴` 𝐷 = 1 − 𝑃 𝐴 𝐷 =0.06
𝑃(𝐷) 0.83
𝑃(𝐴∩𝐷) 0.78
𝑏. 𝑃 𝐷 𝐴 = = = 0.95 𝑃 𝐷` 𝐴 = 1 − 𝑃 𝐷 𝐴 =0.05
𝑃(𝐴) 0.82
40 28
𝑃 𝐹 = 400 𝑃 𝐷 = 400
+ =1
+ =1 + =1
+ + + =1
342/400 + 18/400 + 30/400 + 10/400 = 1
Question: Is D & F dependent events?
Solution:
5 4 1 5 5 1
𝑃 𝐴∩𝐵 = = 𝑃 𝐴∩𝐵 = =
20 19 19 20 20 16
4 5
𝑃 𝐵𝐴 = 𝑃 𝐵𝐴 =
19 20
70
Conditional Probability, Independence, and the Product Rule
One bag contains 4 white balls and 3 black balls, and a second bag contains 3
white balls and 5 black balls. One ball is drawn from the first bag and placed
unseen in the second bag.
What is the probability that a ball now drawn from the second bag is black?
Let B1, B2, and W1 represent, respectively, the drawing of a black ball from
bag 1, a black ball from bag 2, and a white ball from bag 1.
4W, 3B
B W
𝑜𝑟
3W, 6B 4W, 5B
3W, 5B
𝑃 (𝐵1 ∩ 𝐵2 𝑜𝑟 (𝑊1 ∩ 𝐵2 )] = 𝑃((𝐵1 ∩ 𝐵2 ) + 𝑃(𝑊1 ∩ 𝐵2 )
= P 𝐵1 𝑃 𝐵2 𝐵1 + P 𝑊1 𝑃 𝐵2 𝑊1
3 6 4 5
= +
7 9 7 9
72
Conditional Probability, Independence, and the Product Rule
73
Conditional Probability, Independence, and the Product Rule
74
Conditional Probability, Independence, and the Product Rule
P F = P 𝐹 ∩ 𝐻 + 𝑃 𝐹 ∩ 𝐻` = 𝑃 𝐹 𝐻 𝑃 𝐻 + 𝑃 𝐹 𝐻` 𝑃 𝐻`
=0.1*0.2+0.005*0.8=0.024
79
Total Probability Theorem
Proof!
A = 𝐴 ∩ 𝐵1 ∪ 𝐴 ∩ 𝐵2 ∪ 𝐴 ∩ 𝐵3 ∪ … 𝐴 ∩ 𝐵𝑘
𝑷 𝑨 𝑩𝟏 𝑷 𝑨 𝑩𝟐 𝑷 𝑨 𝑩𝒌
P(A)=P 𝐴 ∩ 𝐵1 + P 𝐴 ∩ 𝐵2 + P 𝐴 ∩ 𝐵3 + … P 𝐴 ∩ 𝐵𝑘 = σ𝑘𝑖=1 P 𝐴 ∩ 𝐵𝑖
=σ𝑘𝑖=1 P(𝐵𝑖 )P 𝐴 𝐵𝑖
Bayes’ Rule
𝑷 𝑨 𝑩𝟏 𝑷 𝑨 𝑩𝟐 𝑷 𝑨 𝑩𝒌
𝑷 𝑩𝟏 𝑨 𝑷 𝑩𝟐 𝑨 ? Bayes’ Rule 𝑷 𝑩𝒌 𝑨
Bayes’ Rule
? Bayes’ Rule
83
Bayes’ Rule
84
Bayes’ Rule
?
Total Prob.
Rule
? Bayes’ Rule
85
Bayes’ Rule