0% found this document useful (0 votes)
6 views52 pages

W6_Randomness and Probability

The document introduces fundamental concepts of probability, including definitions of experiments, outcomes, events, and sample spaces. It discusses empirical and theoretical probabilities, emphasizing the Law of Large Numbers and the importance of large sample sizes for accurate probability estimates. Additionally, it outlines key probability rules such as the Complement Rule, Multiplication Rule, and Addition Rule, along with examples to illustrate these concepts.

Uploaded by

J.C.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
6 views52 pages

W6_Randomness and Probability

The document introduces fundamental concepts of probability, including definitions of experiments, outcomes, events, and sample spaces. It discusses empirical and theoretical probabilities, emphasizing the Law of Large Numbers and the importance of large sample sizes for accurate probability estimates. Additionally, it outlines key probability rules such as the Complement Rule, Multiplication Rule, and Addition Rule, along with examples to illustrate these concepts.

Uploaded by

J.C.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 52

STAT 4001

STATISTICS I FOR ANALYTICS


WEEK 6 - RANDOMNESS AND PROBABILITY

1
Introduction to probability
A probability is a measure of the chance that an event will happen
An experiment is a process that has several possible results but one and only one of
several possible results will occur.
An outcome is a particular result of an experiment.
The event is the collection of outcomes or combinations of outcomes. We denote
events with capital letters such as A, B, or C.
The sample space is the collection of all possible outcomes of an experiment. We
denote the sample space with S or sometimes Ω
A probability is a value between 0 and 1. A value near zero means the event is not
likely to happen. A value near one means it is likely to happen.

2
Introduction to probability
Example:
Experiment: Produce emergency light bulbs for one hour and inspect for defects
Each trial has an outcome.
Outcomes: N: Not defective, D: Defective
If you examine one bulb for defects,
Sample space: S = {N, D}
If you examine two bulbs in sequence for defects
Sample space: S = {NN, ND, DN, DD}
If we were interested in at least one non-defective bulb from the two bulbs, we’d be
interested in the event (call it A) consisting of the three outcomes NN, ND and DN, and
we’d write : 𝐴 = NN, ND, DN

3
Empirical Probability
Empirical probability: The probability of an event is its long-run relative frequency
Empirical probability is based on repeatedly observing the event’s outcome.
Independence means that the outcome of one trial doesn’t influence or change the outcome of
another
The Law of Large Numbers (LLN) states that if the events are independent, then as the number of
trials increases, the long-run relative frequency of an event gets closer and closer to a single value,
we call it the probability of that event (empirical probability),

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑖𝑚𝑒𝑠 𝐴 𝑜𝑐𝑐𝑢𝑟𝑠


𝑃 𝐴 =
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑟𝑖𝑎𝑙𝑠
We often represent events with capital letters (such as A and B), so 𝑃 𝐴 means “the probability of
event A.”

4
Empirical Probability
Empirical probability method (or relative frequency method) is based on actual
observations or historical data. Empirical probability is based on the observations of an
experiment in a large number of trials.

Note that the empirical probability of an event will approach its true probability over a
large number of trials.

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑖𝑚𝑒𝑠 𝐸 𝑜𝑐𝑐𝑢𝑟𝑒𝑑 𝑖𝑛 𝑡ℎ𝑒 𝑝𝑎𝑠𝑡


𝑃 𝐸 =
Total Number of observations

5
Random Phenomena and Empirical
Probability
Example:
A survey revealed that out of 1750 flowers planted, 1400 flowers survived without
water for two weeks. What is the probability that a flower will survive without water for
two weeks?
Event A = A tree will survive without water for two weeks

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑡𝑖𝑚𝑒𝑠 𝑒𝑣𝑒𝑛𝑡 𝑜𝑐𝑐𝑢𝑟𝑒𝑑 𝑖𝑛 𝑝𝑎𝑠𝑡


𝑃(𝐴) =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑏𝑠𝑒𝑟𝑣𝑎𝑡𝑖𝑜𝑛𝑠
1400
𝑃 𝐴 = = 0.80
1750
We can use this as an estimate of probability, the probability that a tree will survive
without water for two weeks is 0.80 or 80%.
6
Random Phenomena and Empirical
Probability
Empirical probability is based on the
observations of an experiment in a large Number of Trials Number of Relative Frequency of
number of trials. Tails Tails
1 0 0.00
For example, If you toss a coin two times and
10 3 3
get tails both times, the empirical 10
= 0.30
probability of getting tails is 1 or 100% . It is 100 52 0.52
not correct as the number of trials is not
1000 472 0.472
large. You could toss a coin 1000 times to see
2000 988 0.494
how many tails you get by using empirical
method. If we toss the coin a great number 10000 5027 0.5027
of times, the probability of the outcome of
tails will approach 0.5.

7
The Nonexistent Law of Averages
Many people confuse the Law of Large numbers with the so-called Law of Averages that would
say that things have to even out in the short run
The Law of Averages doesn’t exist
Many people confuse the Law of Large numbers with the so-called Law of Averages that would
say that things have to even out in the short run
The Law of Averages doesn’t exist
If the stock market has been down for the past three sessions, is it due to increase today? No.
This isn’t the way random phenomena work. There is no Law of Averages for short runs—no “Law
of Small Numbers.” And a belief in such a “law” can lead to poor business decisions.

8
Two More Types of Probability
Model-Based (Theoretical or classical) Probability
The classical (theoretical) probability of event A can be computed with the following
equation:

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴
𝑃 𝐴 =
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠

Classical (or theoretical) probability method is based on the assumption that the
outcomes are equally likely.

9
Classical Probability
Example:
Consider an experiment of drawing a card from a
set of 52 cards.
1. How many possible outcomes will occur from
this experiment?
2. What is the probability of observing a heart?
3. What is the probability of drawing an Ace?
4. What is the probability of drawing a king?
5. What is the probability to drawing a black
card?

10
Two More Types of Probability
The theoretical probability
Example:
1
The probability of rolling a three with a fair die is one in six, which we write
as .
6
Example:
1
The probability of picking the ace of spades from the top of a well-shuffled
deck is .
52
Example: A company must hire a new manager from a list of six candidates, all of
whom are equally qualified. Two of these candidates are female. The company
decides to select the manager by lottery.
What is the probability one of the male candidates is hired?

𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 𝑖𝑛 𝐴 4
𝑃 𝐴 = = = 0.66
𝑁𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠 6

11
Two More Types of Probability
Subjective or Personal Probability: A subjective, or personal probability expresses your
uncertainty about the outcome. The probability of a particular event happening that is
assigned by an individual based on whatever information is available or a person’s belief.
Example: Estimating the chance of the Raptors winning the MBA championship.
Although personal probabilities may be based on experience, they are not based either on
long-run relative frequencies or on equally likely events
Bias: Subjective probability assessment suffers from three types of bias: Overconfidence bias,
Sunk cost bias, Recency bias.
• A manager is overconfident in her team’s ability. She may suffer from overconfidence bias.
• An executive manager overestimate the probability that the project will be economic just
because he has invested so much to date. He may has suffered from a sunk cost bias.
• Recency bias: Most recent events have a great impact on people’s decisions. Gamblers who
think they are in a winning streak suffer from recency bias.
12
Probability Rules
Rule 1
If the probability of an event occurring is 0, the event can’t occur.
If the probability is 1, the event always occurs.
Probability is a number between 0 and 1.

𝟎 ≤ 𝑷 𝑨 ≤ 𝟏, for any event A

13
Probability Rules
Rule 2: The Probability Assignment Rule
The probability of the set of all possible outcomes must be 1.

𝑷 𝑺 = 𝟏, where S is the sample space

S represents the set of all possible outcomes and is called the sample space.

14
Probability Rules
Example: M&M’S chocolate candies company conducted a “worldwide survey” to vote
on a new color. In Japan, the percentages were 38% pink, 36% brown, and only 16%
purple.
Solution: Based on the M&M’S website reports, the probabilities of selecting a voter
who preferred each of the colors are:
𝑃 𝑃𝑖𝑛𝑘 = 0.38, 𝑃 𝐵𝑟𝑜𝑤𝑛 = 0.36, 𝑃 𝑃𝑢𝑟𝑝𝑙𝑒 = 0.16
Each probability is between 0 and 1, thus, rule 1 holds.
𝑃 𝑃𝑖𝑛𝑘 + 𝑃 𝐵𝑟𝑜𝑤𝑛 + 𝑃 𝑃𝑢𝑟𝑝𝑙𝑒 = 0.38 + 0.36 + 0.16 = 0.90,
These probabilities don’t add up to 1. The remaining 10% of the voters must not have
expressed a preference or written in another color. You can put them together into
“other” and add 𝑃 𝑜𝑡ℎ𝑒𝑟 = 0.10. With this addition, we have
𝑃 𝑆 = 𝑃 𝑃𝑖𝑛𝑘 + 𝑃 𝑇𝑒𝑎𝑙 + 𝑃 𝑃𝑢𝑟𝑝𝑙𝑒 + 𝑃 𝑜𝑡ℎ𝑒𝑟 = 1
Therefore, Rule 2 holds.

15
Probability Rules
Rule 3: The Complement Rule
The probability of an event occurring is 1 minus the probability that it doesn’t
occur.

The Complement Rule


𝑷 𝑨 = 𝟏 − 𝑷 𝑨𝒄

16
Probability Rules
Example: Lee’s Lights sells lighting fixtures. Some customers are there only to browse,
so Lee records the behavior of all customers for a week to assess how likely it is that a
customer will make a purchase. Lee finds that of 1000 customers entering the store
during the week, 300 make purchases. What is the probability that a customer doesn’t
make a purchase?
Solution:
The probability of a customer making a purchase is
300
𝑃 𝑃𝑢𝑟𝑐ℎ𝑎𝑠𝑒 = = 0.3
1000

By using the complement rule, the probability that a customer doesn’t make a purchase
is:
P 𝑁𝑜 𝑃𝑢𝑟𝑐ℎ𝑎𝑠𝑒 = 1 − P 𝑃𝑢𝑟𝑐ℎ𝑎𝑠𝑒 = 1 − 0.3 = 0.7
17
Probability Rules
Two events are independent if the occurrence of one does not affect the
probability of the occurrence of the other one.

Rule 4: The Multiplication Rule


For two independent events A and B, the probability that both A and B occur is
the product of the probabilities of the two events.

The Multiplication Rule


𝑷 𝑨 𝒂𝒏𝒅 𝑩 = 𝑷 𝑨 𝑷 𝑩 , where A and B are independent

the symbol means “intersection” and represents outcomes that are in both
event A and event B. You may see the event (A and B) written as 𝑨 ∩ 𝑩.

18
Probability Rules
Rule 4: The Multiplication Rule

Example: Suppose the probability of qualifying an applicant for a credit card is 0.35.
What’s the chance that the next two applicants qualify?
Let A = {Customer 1 qualifies} and 𝐵 ={Customer 2 qualifies}. Since events A and B are
independent.

𝑷 𝑨 𝒂𝒏𝒅 𝑩 = 𝑷 𝑨 𝑷 𝑩 = 𝟎. 𝟑𝟓 × 𝟎. 𝟑𝟓 = 𝟎. 𝟏𝟐𝟐𝟓
the chance that both applicants qualify is 12.25%.

19
Probability Rules
Rule 5: The Addition Rule
Two events are disjoint (or mutually exclusive) if they have no outcomes in
common.
The Addition Rule allows us to add the probabilities of disjoint events to get the
probability that either event occurs.
𝑨𝒅𝒅𝒊𝒕𝒊𝒐𝒏 𝑅𝑢𝑙𝑒
𝑃 𝐴 𝑜𝑟 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 , where A and B are disjoint.

You may see the event (A or B) written as A∪ 𝐵 . The symbol means “union” and
represents the outcomes in event A or event B.

20
Probability Rules
Example: M&M’S milk chocolate candies company conducted a “worldwide survey” to
vote on a new color. In Japan, the percentages were 38% pink, 36% brown, and only
16% purple.
1. What’s the probability that a Japanese M&M’S survey respondent selected at
random prefers either pink or brown?
Solution: Since a respondent can’t choose both colors, the events “pink” and “Brown”
are disjoint. Thus, you can apply the Addition Rule, Rule 5.

𝑃(𝑃𝑖𝑛𝑘 𝑜𝑟 𝐵𝑟𝑜𝑤𝑛) = 𝑃(𝑝𝑖𝑛𝑘) + 𝑃(𝐵𝑟𝑜𝑤𝑛) = 0.38 + 0.36 = 0.742


The probability that the respondent said pink or brown is 0.742.

21
Probability Rules
2. If we pick two Japanese respondents at random, what’s the probability that they both
selected purple?
Solution:
It’s unlikely that the choice made by one respondent affected the choice of the other, so
the events are independent. We can use the Multiplication Rule (Rule 4).
Event A: First respondent selects purple
Event B: Second respondent selects purple
𝑃 𝑏𝑜𝑡ℎ 𝑃𝑢𝑟𝑝𝑙𝑒 = 𝑃 𝐴 𝑎𝑛𝑑 𝐵 = 𝑃 𝐴 𝑃 𝐵 = 0.16 × 0.16 = 0.0256
the probability that both respondents select purple is 0.0256.

22
Probability Rules
3. If we pick three Japanese respondents at random, what’s the probability that no one preferred purple?
Solution: It’s unlikely that the choice made by one respondent affected the choice of the other, so the
events are independent. You can use the Multiplication Rule.
Event A: First respondent selects purple
Event B: Second respondent selects purple
𝑃 𝑁𝑜𝑛𝑒 𝑝𝑢𝑟𝑝𝑙𝑒 = 𝑃 𝐹𝑖𝑟𝑠𝑡 𝑛𝑜𝑡 𝑝𝑢𝑟𝑝𝑙𝑒 × 𝑃 𝑆𝑒𝑐𝑜𝑛𝑑 𝑛𝑜𝑡 𝑝𝑢𝑟𝑝𝑙𝑒 × 𝑃 𝑇ℎ𝑖𝑟𝑑 𝑛𝑜𝑡 𝑝𝑢𝑟𝑝𝑙𝑒
= 1 − 0.16 × 1 − 0.16 × 1 − 0.16 = 0.843 = 0.5927
the probability that none select purple is 0.5927.
4. If we pick three Japanese respondents at random, what’s the probability that at least one preferred
purple?
Solution: By using the complement rule, we have
𝑃 𝐴𝑡 𝑙𝑒𝑎𝑠𝑡 𝑜𝑛𝑒 𝑝𝑢𝑟𝑝𝑙𝑒 = 1 − 𝑃 𝑁𝑜𝑛𝑒 𝑝𝑢𝑟𝑝𝑙𝑒 = 1 − 0.5927 = 0.4073
the probability that at least one prefers purple is 0.4073.

23
Probability Rules
Example: What is the probability that a card chosen at random from a standard deck
of cards will be either a queen or a king?
Solution:
4 4 8
𝑃 𝑄 𝑜𝑟 𝐾 = 𝑃 𝑄 + 𝑃 𝐾 = + = = 0.1538
52 52 52
The probability that a card chosen at random from a standard deck of cards will be
either a queen or a king is 0.15 or 15%.

Card Event Number of cards Probability of event

Queen Q 4 4
𝑃 𝑄 =
52
King K 4 4
𝑃 𝑄 =
52

24
Probability Rules

25
Probability Rules
Rule 6: The General Addition Rule
The General Addition Rule calculates the probability that either of two events occurs.
It does not require that the events be disjoint.

The General Addition Rule


𝑷 𝑨 𝒐𝒓 𝑩 = 𝑷 𝑨 + 𝑷 𝑩 − 𝑷 𝑨 𝒂𝒏𝒅 𝑩

26
Probability Rules
Example: What is the probability that a card chosen at random from a standard deck
of cards will be either a queen or a heart?
4 13 1 16
𝑃 𝑄 𝑜𝑟 𝐻 = 𝑃 𝑄 + 𝑃 𝐻 − 𝑃 𝑄 𝑎𝑛𝑑 𝐻 = + − = = 0.31
52 52 52 55
The probability that a card chosen at random from a standard deck of cards will be
either a queen or a heart is 0.31 or 31%.

Card Event Number of cards Probability of event

queen Q 4 4
𝑃 𝑄 =
52
Heart H 13 13
𝑃 𝐻 =
52
queen of Q and H 1 1
𝑃 𝐾 𝑎𝑛𝑑 𝐻 =
hearts 52

27
Joint Probability and Contingency Tables
Events may be placed in a contingency table such as the one in the example
below.
Example: As part of a Pick Your Prize Promotion, a store invited 478 customers
to choose which of three prizes they’d like to win. The responses have been
placed in the following contingency table:
Contingency table - Prize preference for 478 customers.
Blank Prize Preference
Gender Skis Camera Bike Total
Man 117 50 60 227
Woman 130 91 30 251
Total 247 141 90 478

28
Joint Probability and Contingency Tables
Marginal probability depends on totals found in the margins of the table (from
either the total row or the total column).

Contingency table - Prize preference for 478 customers.

Blank Prize Preference


Gender Skis Camera Bike Total
Man 117 50 60 227
Woman 130 91 30 251
Total 247 141 90 478

29
30

Joint Probability and Contingency Tables


Example: In the table below,
1. what is the probability that a respondent chosen at random is a woman?
2. what is the probability of selecting a customer whose preferred prize is a bike.
Contingency table - Prize preference for 478 customers.
Note that the probability
Blank Blank Prize Preference Blank Blank
that a respondent chosen
Gender Skis Camera Bike Total
at random is a woman
(bike) is a marginal Man 117 50 60 227
probability. Woman 130 91 30 251

251 Total 247 141 90 478


1. 𝑃 𝑤𝑜𝑚𝑎𝑛 = 478
= 0.525.
90
2. 𝑃 𝐵𝑖𝑘𝑒 = 478 = 0.188.
31

Joint Probability and Contingency Tables


Joint probabilities give the probability of two events occurring together.
Example: In the table below, what is the probability that a respondent chosen at
random is a woman whose preference is camera?
Contingency table - Prize preference for 478 customers.

Blank Blank Prize Preference Blank Blank


Gender Skis Camera Bike Total
Man 117 50 60 227
Woman 130 91 30 251
Total 247 141 90 478

91
𝑃 𝑤𝑜𝑚𝑎𝑛 𝑎𝑛𝑑 𝑐𝑎𝑚𝑒𝑟𝑎 = = 0.190.
478
32

Joint Probability and Contingency Tables


Each row or column shows a conditional distribution given one event.

Prize preference for 478 customers.


Blank Blank Prize Preference Blank Blank
Gender Skis Camera Bike Total
Man 117 50 60 227
Woman 130 91 30 251
Total 247 141 90 478

In the table above, the probability that a selected customer wants a bike given
that we have selected a woman is:
30
𝑃(𝐵𝑖𝑘𝑒│𝑊𝑜𝑚𝑎𝑛) = = 0.120.
251
Conditional Probability and
Independence
In general, when we want the probability of an event from a conditional
distribution, we write P(B|A) and pronounce it “the probability of B given A.”
A probability that takes into account a given condition is called a conditional
probability.

Conditional probability for any two events 𝑨 and B


𝑷 𝑨 and 𝑩
𝑷 𝑩𝑨 = , 𝑷 𝑨 >𝟎
𝑷 𝑨

33
Conditional Probability and
Independence
Example: The probability that a regularly scheduled flight departs on time is 0.83; the
probability that it arrives on time is 0.82; and the probability that it departs and arrives on
time is 0.78.
a. Find the probability that a plane arrives on time given that it departed on time.
Solution:
𝑷(𝑨 and 𝑫) 𝟎. 𝟕𝟖
𝑷(𝐀|𝑫) = = = 𝟎. 𝟗𝟒
𝑷(𝑫) 𝟎. 𝟖𝟑

b. Find the probability that a plane departed on time given that it has arrived on time.
Solution:
𝑷(𝑨 and 𝑫) 𝟎. 𝟕𝟖
𝑷(𝑫|𝑨) = = = 𝟎. 𝟗𝟓
𝑷(𝑨) 𝟎. 𝟖𝟐

34
Conditional Probability and
Independence
Example: For the prize preference example:
1. Find the probability that a selected customer wants a bike given that we have
selected a woman.
Solution: You can use the formula directly with the probabilities derived from the
contingency table. From contingency table, of the 251 women, only 30 of them said
their preferred prize was a bike.

By using the formula, you find: Blank Blank Prize Preference Blank Blank
Gender Skis Camera Bike Total
Man 117 50 60 227
Woman 130 91 30 251
Total 247 141 90 478

35
Conditional Probability and
Independence
Example continued.
2. Find the probability that a selected customer wants a bike given that we have
selected a man?
Solution: You can use the formula directly with the probabilities derived from the
contingency table. Of the 227 men, 60 said their preferred prize was a bike, so

3. Is the prize preference independent of the sex of the customer?


Solution:
Blank Blank Prize Preference Blank Blank
Because these probabilities aren’t
Gender Skis Camera Bike Total
equal (0.264 ≠ 0.188) , we can say
that prize preference is not Man 117 50 60 227
independent of the sex of the Woman 130 91 30 251
customer. Total 247 141 90 478

36
Conditional Probability and
Independence
Rule 7: The General Multiplication Rule
The General Multiplication Rule calculates the probability that both of two events
occurs. It does not require that the events be independent.

Conditional probability for any two events 𝑨 and B


𝑷 𝑨 and 𝑩 = 𝑷 𝑨 × 𝑷 𝑩 𝑨 , 𝑷 𝑨 >𝟎

37
Conditional Probability and
Independence
Events A and B are independent whenever P(B|A) = P(B).
Independent vs. Disjoint
For all practical purposes, disjoint events cannot be independent.
Don’t make the mistake of treating disjoint events as if they were independent and
applying the Multiplication Rule for independent events.

38
Conditional Probability and
Independence
Example: A street side seller has 12 shirts to sell. Suppose nine of these are white and
the others red. He sold 2 shirts. What is the probability that both the shirts sold were
red?
Solution: The event that the first shirt sold was red is R1.
3
𝑃 𝑅1 =
12
The event that the second shirt sold was red is R2. The conditional probability that the
second shirt sold was blue, given that the first shirt sold was also red, is
2
𝑃 𝑅 2 𝑅1 =
11
The probability that both the shirts sold were red is
3 2
𝑃 𝑅1 𝑎𝑛𝑑 𝑅2 = 𝑃 𝑅1 𝑃 𝑅2 |𝑅1 = = 0.05
12 11
39
Constructing Contingency Tables
If you’re given probabilities without a contingency table, you can often construct a
simple table to correspond to the probabilities and use this table to find other
probabilities.

40
Constructing Contingency Tables
Example: A survey classified homes into two price categories (Low and High). It also
noted whether the houses had at least 2 bathrooms or not (True or False). 56% of
the houses had at least 2 bathrooms, 62% of the houses were Low priced, and 22%
of the houses were both. Translating the percentages to probabilities, we have:
The 0.56 and 0.62 are marginal probabilities, so they go in the margins.
The 22% of houses that were both Low priced and had at least 2 bathrooms is a joint
probability, so it belongs in the interior of the table.

Blank Blank At Least Two Bathrooms Blank


Blank Blank True False Total
Price Low 0.22 Blank 0.62
Blank High Blank Blank Blank
Blank Total 0.56 Blank 1.00

41
Constructing Contingency Tables
Because the cells of the table show disjoint events, the probabilities always add to the marginal
totals going across rows or down columns.

Blank Blank At Least Two Bathrooms Blank


Blank Blank True False Total
Price Low 0.22 0.40 0.62
Blank High 0.34 0.04 0.38
Blank Total 0.56 0.44 1.00

42
Probability Trees
Example: Suppose a company manufactures components for electronic devices. In the
manufacturing process, if an unacceptable level of defects occur, an engineer must
decide how to correct the problem. The engineer can order the three minor adjustments
listed below to try to fix the problem where each is listed with the probability that it is
the cause of the defects:
1) motherboard adjustment (10%)
2) memory adjustment (30%)
3) case adjustment (60%).
Suppose that upon further investigation the engineer has determined the following
conditional probabilities: P (Fixed | Case ) = 0.80, The probability that a simple
P (Fixed | Memory ) = 0.50, and case adjustment will correct
the problem is 0.8, and so on.
P (Fixed | Motherboard ) = 0.10.
What is the probability that a minor adjustment will correct the problem?
43
Probability Trees
Example (continued): We can summarize the information that is provided
using the probability tree below.

Possible problems and their probabilities.

44
Probability Trees
Example (continued): We can include this new information in the probability tree.

P (Fixed | Case ) = 0.80,


P (Fixed | Memory ) = 0.50, and
P (Fixed | Motherboard ) = 0.10.

Figure - Extending the tree diagram, we


can show both the problem class and the
outcome probabilities of a minor
adjustment. The outcome (Fixed or Not
Fixed) probabilities are conditional on
the problem type, and they change
depending on which branch we follow.

45
Probability Trees
Example (continued): We may now compute the probability of each of the joint events
seen in the probability tree. That is, the events Case and Fixed, Case and Not Fixed, etc.
We compute the joint probabilities by using the multiplication rule. For example:

P (Case and Fixed ) = P (Case )  P (Fixed | Case )


= 0.60  0.80
= 0.48.

46
Probability Trees
Example (continued): All the joint events listed in the probability tree are disjoint. We
may therefore simply add the relevant probabilities to answer the question that was
posed: What is the probability that a minor adjustment will correct the problem?
P (Fixed )
= P ((Case and Fixed ) or ( Memory and Fixed ) or ( Motherboard and Fixed ) )
= P (Case and Fixed ) + P ( Memory and Fixed ) + P ( Motherboard and Fixed )
= 0.48 + 0.15 + 0.01
= 0.64.

The likelihood that a minor adjustment will correct the problem is about
64%.

47
Reversing the Conditioning: Bayes’ Rule
Example: Suppose the engineer’s decision in the previous example fixed the problem
that was occurring. What is the probability that it was the case adjustment that
corrected the problem?
To solve this problem, we return to our definition of conditional probability.

P (Case and Fixed )


P (Case | Fixed ) =
P (Fixed )
0.48
=
0.48 + 0.15 + 0.01
= 0.75

48
Reversing the Conditioning: Bayes’s Rule
Recall from the probability tree in the previous section that we were able to calculate
P(Fixed) as follows.

P (Fixed ) = P ( (Case and Fixed ) or ( Memory and Fixed ) or ( Motherboard and Fixed ) )
= P (Fixed | Case )  P (Case ) + P (Fixed | Memory )  P (Memory )
+ P (Fixed | Motherboard )  P (Motherboard )

This leads to the value that is seen in the denominator on the previous
slide.

49
Reversing the Conditioning: Bayes’ Rule
We can generalize the result on the previous slide for n mutually exclusive and
exhaustive (union is the whole space) events Ai.

P (B ) = P (B | A1 )  P ( A1 ) + P (B | A2 )  P ( A2 ) + + P (B | An )  P ( An )

From this we obtain Bayes’ Rule.


P (B | Ai )P ( Ai )
P ( Ai | B ) = n

 P (B | A )P ( A )
j =1
j j

Bayes rule allows us to update our estimate of a probability given the additional
information. Therefore, if we know the conditional probability, one useful tool to
compute the reverse probabilities is the Bayes Rule.

50
Reversing the Conditioning: Bayes’s Rule
Recall: Two events are mutually exclusive if they have no outcomes in common, so
knowing that one occurred means the other didn’t.

𝑷 𝑨 and 𝑩 = 𝟎, 𝐟𝐨𝐫 𝐚𝐧𝐲 𝐦𝐮𝐭𝐮𝐚𝐥𝐥𝐲 𝐞𝐱𝐜𝐥𝐮𝐬𝐢𝐯𝐞 𝐞𝐯𝐞𝐧𝐭𝐬

Events are collectively exhaustive if at least one of the events must occur when an
experiment is conducted. For the die-tossing experiment, each outcome will be
either even or odd. Events “an even number” and “an odd number” are collectively
exhaustive. For example, if we roll a die then it must land on one of the following
values: 1, 2, 3, 4, 5, 6.

51
References
The slides are a combination of the material from your text and Pearson recourses as
well as the original material.

52

You might also like