Chapter 4
Probability
24 January 2024
Statistics - Spring semester 2023-2024 1
Experiment, Outcomes, and Sample Space
Definitions
An experiment is a process that, when performed, results in one and only
one of many observations. These observations are called the outcomes of
the experiment. The collection of all outcomes for an experiment is called
a sample space. A sample space is denoted by S. The sample space for an
experiment can also be illustrated by drawing either a Venn diagram or a
tree diagram. Venn diagram
24 January 2024 Statistics - Spring semester 2023-2024 2
24 January 2024 Statistics - Spring semester 2023-2024 3
24 January 2024 Statistics - Spring semester 2023-2024 4
Simple and Compound Events
• Event: An event is a collection of one or more of the outcomes of an
experiment.
• An event may be a simple event (elementary event) or a compound
event (composite event).
Simple Event: An event that includes one and only one of the final outcomes
for an experiment and is usually denoted by Ei.
Reconsider last Example on selecting two workers from a company and
observing whether the worker selected each time is a man or a woman. Each
of the final four outcomes (MM, MW, WM, and WW) for this experiment is a
simple event. These four events can be denoted by E1 E2 , E3 , and E4 ,
respectively.
Thus E1=(MM), E2=(MW), E3=(WM), and E4=(WW)
24 January 2024 Statistics - Spring semester 2023-2024 5
• Compound Event: A compound event is a collection of more than one
outcome for an experiment. Compound events are denoted by A, B, C,
D,... or by A1 A2 , A3 ,..., B1 B2 , B3 ,...
Example: In a group of people, some are in favor of civil engineering and
others are against it. Two persons are selected at random from this group
and asked whether they are:
(a) Both persons are in favor of civil engineering.
(b) At least one person is against civil engineering.
(c) Exactly one person is in favor of civil engineering.
(d) Both persons are in against of civil engineering.
Solution:
Let, F = a person is in favor, and of A = a person is against Civil engineering
This experiment has the following four outcomes:
FF = both persons are in favor
FA = the first person is in favor and the second is against
AF = the first person is against and the second is in favor
AA = both persons are against
24 January 2024 Statistics - Spring semester 2023-2024 6
(a)The event “both persons are in favor of civil engineering”
= {FF} (simple event)
.
(b)The event “at least one person is against genetic engineering”
= {AA, FA, AF} (compound event)
.
(c) The event “exactly one person is in favor of civil engineering”
= {FA, AF} (compound event)
.
(d)The event “both persons are against of civil engineering”
= {AA} (simple event)
24 January 2024 Statistics - Spring semester 2023-2024 7
Calculating Probability
• Probability is a numerical measure of the likelihood that a specific
event will occur.
• Two properties of probability:
1- The probability of an event always lies in the range 0 to 1.
Whether it is a simple or a compound event, the probability of an
event is never less than 0 Or greater than 1.
An event that cannot occur has zero probability; such an event is called an
impossible event. An event that is certain to occur has a probability equal
to 1 and is called a sure event.
That is,
For an impossible event M : P(M) = 0
For a sure event C : P(C) = 1
24 January 2024 Statistics - Spring semester 2023-2024 8
2- The sum of probabilities of all simple event (all possible outcome)
for an experiment is always 1.
From this property, for the experiment of one toss of a coin,
For the experiment of two tosses of a coin,
24 January 2024 Statistics - Spring semester 2023-2024 9
Classical Probability Rule to Find Probability
(For simple event)
(For compound event)
Example: Find the probability of obtaining a head and the probability of
obtaining a tail for one toss of a coin.
Solution: There are only two outcomes H and T
P(H)=P(T)= ½=0.5
Example: Find the probability of obtaining an even number in one roll of
a die.
Solution: This experiment has a total of six outcomes: 1, 2, 3, 4, 5, and 6
• A = {2, 4, 6}, P(A)=3/6=0.5
24 January 2024 Statistics - Spring semester 2023-2024 10
Relative frequency concept of probability
• If an experiment is repeated n times and an event A is observed f times,
then, according to the relative frequency concept of probability.
P (A)=f/n
Example: Ten of the 500 randomly selected cars manufactured at a
certain auto factory are found to be lemons. Assuming that the lemons
are manufactured randomly, what is the probability that the next car
manufactured at this auto factory is a lemon?
Solution: Let n denote the total number of cars in the sample and f the
number of lemons.
P (next car is lemon)=f/n=10/500=0.02
24 January 2024 Statistics - Spring semester 2023-2024 11
Law of Large Numbers
If an experiment is repeated again and again, the probability of an event
obtained from the relative frequency approaches (will be near) the actual
or theoretical probability.
Counting Rule to Find Total Outcomes
If an experiment consists of three steps, and if the first step can result in m
outcomes, the second step in n outcomes, and the third step in k outcomes,
then,
• Total outcomes for the experiment = m • n • k
Example: Suppose we toss a coin three times. This experiment has three
steps: the first toss, the second toss, and the third toss. Each step has two
outcomes: a head and a tail. Thus,
Total outcomes for three tosses of a coin = 2X2X2 = 8
HHH, HHT, HTH. HTT, THH, THT, TTH, and TTT
24 January 2024 Statistics - Spring semester 2023-2024 12
Example: A company puts a code on each different product they sell. The
code is made up of 3 numbers and 3 letters. How many different codes
are possible?
Solution:
There are 6 stages (number 1, number 2, number 3, letter 1, letter 2 and
letter 3).
There are 10 possible numbers: 0 – 9.
There are 26 possible letters: A – Z.
So we have: 10 * 10 * 10 * 26 * 26*26 = 17576000 possible codes.
24 January 2024 Statistics - Spring semester 2023-2024 13
Marginal and Conditional Probabilities
• Marginal Probability: is the probability of a single event without
consideration of any other event. It is also called simple probability.
Example:
Suppose all 100 employees of a company were
asked whether they are in favor of or against paying
high salaries to head of companies. Compute the
simple probability P(male) and P(against).
Solution:
24 January 2024 Statistics - Spring semester 2023-2024 14
Conditional Probability: is the probability that an event will occur given
that another event has already occurred. If A and B are two events,
then the conditional probability of A given B is written as P(A | B) and
read as “the probability of A given that B has already occurred.
24 January 2024 Statistics - Spring semester 2023-2024 15
Example:
For the data of Table, calculate the conditional probability that a randomly
selected employee is a female given that this employee is in favor of paying
high salaries to managers.
Solution:
𝑓𝑒𝑚𝑎𝑙𝑒 𝑁𝑜. 𝑜𝑓 𝑓𝑟𝑚𝑎𝑙𝑒 𝑖𝑛 𝑓𝑎𝑣𝑜𝑟
𝑃 ൗ𝐼𝑛 𝑓𝑎𝑣𝑜𝑟 =
𝑇𝑜𝑡𝑎𝑙 𝑁𝑜. (𝑖𝑛 𝑓𝑎𝑣𝑜𝑟)
=4/19=0.2105
24 January 2024 Statistics - Spring semester 2023-2024 16
Mutually Exclusive Events
• If two events are mutually exclusive, it means that they cannot occur at the
same time.
.
• Example, the two possible outcomes of a coin flip are mutually exclusive;
when you flip a coin, it cannot land both heads and tails simultaneously.
Example:
Consider the following events for one roll of a
dice:
A )an even number is observed = {2, 4, 6}
B ) an odd number is observed = {1, 3, 5}
C ) a number less than 5 is observed = {1,2, 3, 4}
- Are events A and B mutually exclusive?
Ans: Yes, they (no common output)
.
- Are events A and C mutually exclusive?
Ans: No, they are not mutually exclusive (2 and 4
outcomes)
24 January 2024 Statistics - Spring semester 2023-2024 17
Independent Versus Dependent Events
• Independent Events : Two events are said to be independent if the
occurrence of one does not affect the probability of the occurrence of the
other. In other words, A and B are independent events if
P(A \ B) = P(A) and P(B \ A) = P(B)
• dependent Events : If the occurrence of one event affects the
probability of the occurrence of the other event, then the two events are said
to be dependent events. In probability notation, the two events are dependent
if either
P(A \ B) ≠ P(A) or P(B \ A) ≠ P(B)
24 January 2024 Statistics - Spring semester 2023-2024 18
24 January 2024 Statistics - Spring semester 2023-2024 19
P(D) = 15/100 = .15 and P(D \ A) = 9/60 = .15
Hence: P(D) = P(D | A)
Consequently, the two events, D and A, are independent.
24 January 2024 Statistics - Spring semester 2023-2024 20
24 January 2024 Statistics - Spring semester 2023-2024 21
24 January 2024 Statistics - Spring semester 2023-2024 22
24 January 2024 Statistics - Spring semester 2023-2024 23
24 January 2024 Statistics - Spring semester 2023-2024 24
From this equation, we can deduce that
P(A) = 1 - P(Ā) and P(Ā) = 1 - P(A)
24 January 2024 Statistics - Spring semester 2023-2024 25
Example:
In a group of 2000 taxpayers, 400 have been audited by the IRS at least
once. If one taxpayer is randomly selected from this group, what are the
two complementary events for this experiment, and what are their
probabilities?
Solution
The two complementary events for this experiment are:
A = the selected taxpayer has been audited by the IRS at least once (that
is 400)
Ā = the selected taxpayer has never been audited by the IRS (that is
1600)
Hence, the probabilities of events A and 𝐴 are
P(A) = 400/2000 = 0.20 and
P(Ā) = 1600/2000 = 0.80
24 January 2024 Statistics - Spring semester 2023-2024 26
Example :
In a group of 5000 adults, 3500 are in favor of stricter gun control laws,
1200 are against such laws, and 300 have no opinion. Let A be the event
that this adult is in favor of stricter gun control laws. If one adult is
randomly selected from this group, what is the complementary event of
A? What are the probabilities of the two events?
24 January 2024 Statistics - Spring semester 2023-2024 27
Intersection of Events and the Multiplication Rule
Intersection of Events: Let A and B be two
events defined in a sample space. The
intersection of A and B represents the
collection of all outcomes that are common to
both A and B and is denoted by A and B
The intersection of events A and B is also
denoted by either A Ո B or AB
Joint Probability
The probability of the intersection of two events is called joint probability.
It is obtained by multiplying the marginal probability of one event by the
conditional probability of the second event.
The joint probability of events A and B can also be denoted by P(AՈB) or P(AB).
24 January 2024 Statistics - Spring semester 2023-2024 28
Example: Following table gives the classification of all employees of A
company by gender and college degree. If one of these employees is
selected at random for membership on the employee-management
committee, what is the probability that this employee is a female and a
college graduate?
Solution:
P(F and G) = P(F) P(G \ F)
P(F) = 13/40
P(G \ F) = 4/13
P(F and G) = P(F) P(G \ F) = (13/40)(4/l3) = 0.100
24 January 2024 Statistics - Spring semester 2023-2024 29
24 January 2024 Statistics - Spring semester 2023-2024 30
Example: A box contains 20 DVDs, 4 of which are defective. If two DVDs
are selected at random (without replacement) from this box, what is the
probability that both are defective?
Solution:
G1=event that first DVD selected is good
D1=event that first DVD selected is defective
G2=event that second DVD selected is good
D2=event that second DVD selected is defective
P(D1 andD2 ) = P(D1 )P(D2 \D1 )
As we know, there are 4 defective DVDs in 20
P(D1) = 4/20
To calculate the probability P(D2 |D1), we know that the first DVD selected
is defective because D1 has already occurred. Because the selections are
made without replacement, there are 19 total DVDs, and 3 of them are
defective at the time of the second selection. Therefore
P(D2\D1) = 3/19 P(D1 and D2) = P(D1) P(D2 \ D1) = (4/20)(3/19) = 0.0316
24 January 2024 Statistics - Spring semester 2023-2024 31
24 January 2024 Statistics - Spring semester 2023-2024 32
24 January 2024 Statistics - Spring semester 2023-2024 33
24 January 2024 Statistics - Spring semester 2023-2024 34
24 January 2024 Statistics - Spring semester 2023-2024 35
24 January 2024 Statistics - Spring semester 2023-2024 36
24 January 2024 Statistics - Spring semester 2023-2024 37
24 January 2024 Statistics - Spring semester 2023-2024 38
24 January 2024 Statistics - Spring semester 2023-2024 39
Example: A senior citizens center has 300 members.140 of them are male.
210 take medicine on a permanent basis. 95 are male and take medicine on
a permanent basis. Describe the union of the events “male” and “take
medicine on a permanent basis”
Solution:
M = a senior citizen is a male
F = a senior citizen is a female
A = a senior citizen takes medicine
B = a senior citizen does not take any medicine
The union of the events “male” and “take medicine” includes those senior
citizens who are either male or take medicine or both. The number of such
senior citizens is
140 + 210 - 95 = 255
95 senior citizens (which represent the intersection of events M and A) are
common to both events M and A and, hence, are counted twice. To avoid
double counting, we subtracted 95 from the sum of the other two numbers
24 January 2024 Statistics - Spring semester 2023-2024 40
Example: A university president proposed that all students must take a
course in ethics as a requirement for graduation. Three hundred faculty
members and students from this university were asked about their opinions
on this issue. Table gives a two-way classification of the responses of these
faculty members and students. Find the intersection and the union
Probability of the two events “faculty member” and “in favor of the
proposal”
Solution:
A = the person selected is a faculty member
B = the person selected is in favor of the proposal
P(A) = 70/300 = 0.2333
P(B) = 135/300 = 0.4500
P(A and B) = P(A) P(B \ A) = (70/300)(45/70) = 0.1500
P(A or B) = P(A) + P(B) – P(A and B) = 0.2333 + 0.4500 -0.1500 = 0.5333
24 January 2024 Statistics - Spring semester 2023-2024 41
Example: A university president proposed that all students must take a
course in ethics as a requirement for graduation. Three hundred faculty
members and students from this university were asked about their opinion
on this issue. The following table, reproduced from, gives a two-way
classification of the responses of these faculty members and students.
What is the probability that a randomly selected person from these 300
faculty members and students is in favor of the proposal or is neutral?
24 January 2024 Statistics - Spring semester 2023-2024 42
24 January 2024 Statistics - Spring semester 2023-2024 43
Example: John is going to graduate from an industrial engineering
department in a university by the end of the semester. After being
interviewed at two companies, he likes; he assesses that his probability of
getting an offer from company A is 0.8, and the probability that he gets
an offer from company B is 0.6. If. on the other hand, he believes that the
probability that he will get offers from both companies is 0.5, what is the
probability that he will get at least one offer from these two companies?
Solution:
Using the additive rule, we have
P(A U B) = P(A) + P(B) - P(A Ո B) = 0.8 + 0.6 - 0.5 = 0.9.
24 January 2024 Statistics - Spring semester 2023-2024 44
Permutations
A permutation is an ordering of a collection of objects. For example, there
are six permutations of the letters A, B, C: ABC, ACB, BAC, BCA, CAB, and
CBA. With only three objects, it is easy to determine the number of
permutations just by listing them all.
• For any positive integer n, n! = n(n − 1)(n − 2) ・・・(3)(2)(1).
• Also, we define 0! = 1.
Example: Five people stand in line at a movie theater. Into how many
different orders can they be arranged?
Solution:
The number of permutations of a collection of five people is 5!
= (5)(4)(3)(2)(1) = 120.
24 January 2024 Statistics - Spring semester 2023-2024 45
Bayes' Rule
If A and B are two events, we have seen that in most cases
P(A|B) = P(B|A). Bayes’ rule provides a formula that allows us to
calculate one of the conditional probabilities if we know the
other one. To see how it works, assume that we know P(B|A)
and we wish to calculate P(A|B).
24 January 2024 Statistics - Spring semester 2023-2024 46
Example: Customers who purchase a certain make of car can order an
engine in any of three sizes. If all cars sold, 45% have the smallest engine,
35% have the medium-sized one, and 20% have the largest. if cars with
the smallest engine, 10% fail an emissions test within two years of
purchase, while 12% of those with the medium size and 15% of those
with the largest engine fail. A record for a failed emissions test is chosen
at random. What is the probability that it is for a car with a small engine?
Solution:
24 January 2024 Statistics - Spring semester 2023-2024 47