0% found this document useful (0 votes)
3 views

STATS THEORY PROBABILITY

The document covers fundamental concepts of probability, including sample spaces, events, and set algebra, as well as rules for calculating probability and conditional probability. It introduces key terms such as mutually exclusive events and the laws governing sets, alongside examples to illustrate these concepts. The classical interpretation of probability is also discussed, providing a framework for measuring uncertainties in experiments.

Uploaded by

sadiaa.yg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

STATS THEORY PROBABILITY

The document covers fundamental concepts of probability, including sample spaces, events, and set algebra, as well as rules for calculating probability and conditional probability. It introduces key terms such as mutually exclusive events and the laws governing sets, alongside examples to illustrate these concepts. The classical interpretation of probability is also discussed, providing a framework for measuring uncertainties in experiments.

Uploaded by

sadiaa.yg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Session 2: Probability

HO Sheng Chao
COR-STAT 1203
Term II 2024-2025

Slides courtesy of and adapted from Prof. Zhenlin Yang.


All errors are my own.

STAT151, Term II 09-10 © Zhenlin Yang, SMU


Introduction Session 2

• Probability: Population → Sample


• Predicting outcomes
• “Given a fair coin, what is the probability of getting tails 5 times in 10 flips?”
• Inferential Statistics: Sample → Population
• Drawing conclusions about the population using the sample
• “Based on the outcomes from 10 flips, can I say that the coin is fair?”
• Uses probability concepts to quantify uncertainty arising from our sample

COR-STAT1203, Term II 2024-25 2 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 3 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Sample Space Session 2

Some fundamental concepts are important to the learning of probability


and distribution theories:
• An experiment refers to the process of observation leading to a
single outcome that cannot be predicted with certainty.
• An outcome refers to the observed result of an experiment.
• The set of all possible outcomes of an experiment is called the
sample space, denoted by S.
• An event is a certain subset of the sample space.

Note: One and only one of the possible outcomes will occur on any
given trial of the experiment.

COR-STAT1203, Term II 2024-25 4 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Sample Space: Examples Session 2

Example 2.1 An experiment consists of tossing two coins, and the


observed face of each coin is of interest. The set of possible outcomes
is represented by the sample space:

S = {HH, HT, TH, TT},

where H=Head, and T=Tail.

Example 2.2. Suppose in Example 2.1, we are instead interested in the


total number of heads obtained from the two coins. An appropriate
sample space could then be defined as
S = {0, 1, 2}.
Thus, a different sample space may be appropriate for the same
experiment, depending on the characteristic of interest or the purpose
of study.

COR-STAT1203, Term II 2024-25 5 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Events Session 2

Event. Any subset A of the sample space S is defined as an event. If


the outcome of an experiment is contained in A, then we say event A
has occurred in this experiment.

• In Example 2.1,
• let A be the event that at least one head is obtained in a toss of two
coins, then A = {HT, TH, HH}.
• let B be the event that at least one tail is obtained in a toss of two
coins, then B = {HT, TH, TT}.
• An event A is always practically meaningful. It occurs if any of its
outcomes occurs. So, intuitively the ‘chance’ for event A to occur depends
on the ‘size’ of A.
• Unlike outcomes, events do not need to be mutually exclusive: both events
A and B can occur at the same time.

COR-STAT1203, Term II 2024-25 6 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Set Algebra Session 2

The study of probability models requires a familiarity of basic notations


of set (or event) theory.

• A set (or event) is a collection of distinct objects. Sets usually are


designated by capital letters, A, B, C, . . . , or subscripted capital
letters A1, A2, A3, . . .
• Individual objects in a set A are called elements.
• In the context of probability, the sets are called events and the
elements are called outcomes.
• Universal set S is the set of all elements under consideration. In
probability application it is called the sample space.
• Empty set or null set, denoted by , is the set that contains no
element. In probability, it is empty event.

COR-STAT1203, Term II 2024-25 7 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Subset and Venn Diagram Session 2

If all the elements in a set A also are contained in another set B, we


say that A is a subset of B, denoted by A  B.
It is always true that   A  S.
Some of these sets are depicted using figures called the
Venn diagrams:

S S

A B A

Event A: the shaded area Event A is a subset of Event B

COR-STAT1203, Term II 2024-25 8 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Union and Intersection Session 2

Union: the union of two sets A and B, denoted by AB, is a new set
consisting of all elements that are either in A or in B or in both A and
B, i.e.,
AB = {a | a  A or a  B}
Intersection: the intersection of A and B, denote by AB, is a new
set containing all elements both in A and in B, i.e.,
AB = {a | a  A and a  B}

S
S

AB AB

AB: the shaded area AB: the shaded area

COR-STAT1203, Term II 2024-25 9 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Complement and Difference Session 2

Complement: the complement of an event A, denoted by Ac, consists


of all outcomes in S that are not in A;
Difference: the difference of A and B, denoted by A\B, is defined as
a new set that consists of all elements in A but not in B. Clearly,
A\B = ABc.

A
A B

Ac: the shaded area


A\B: the darker shaded area

COR-STAT1203, Term II 2024-25 10 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Union and Intersection: Extension Session 2

The notions of union and intersection can be extended to more than


two sets. For example,
ABC = {a | a  A or a  B or a  C }
ABC = {a | a  A and a  B and a  C}

A C
ABC: all shaded areas

B ABC: the darkest area

COR-STAT1203, Term II 2024-25 11 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Mutually Excusive Events Session 2

Tow sets A and B are said to be disjoint if they have no elements in


common. In probability context they are called mutually exclusive
events.

S S

A B A B

A and B are not mutually exclusive A and B are mutually exclusive

Example 2.5. An experiment consists of rolling two dice. The sample


space S thus consists of 36 points: {(1,1), (1,2), (1,3), (1,4), (1,5),
(1,6), . . . , (6,1), (6,2), (6,3), (6,4), (6,5), (6,6)},
or in short, S = {(i, j) | i, j = 1, 2, 3, 4, 5, 6}.

COR-STAT1203, Term II 2024-25 12 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Events: Example Session 2

In Example 2.5, let A be the event that the sum of the two dice equals to
7, and B be the event that the first die shows a 5. Then,

A = {(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1)}
B = {(5, 1), (5, 2), (5, 3), (5, 4), (5, 5), (5, 6)}
Now,
AB = {(1, 6), (2, 5), (3, 4), (4, 3), (5, 2), (6, 1),
(5, 1), (5, 3), (5, 4), (5, 5), (5, 6)}
AB = {(5, 2)}
A\B = {(1, 6), (2, 5), (3, 4), (4, 3), (6, 1)}

COR-STAT1203, Term II 2024-25 13 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Laws of Sets or Events Session 2

Important laws of sets or events:

A(BC) = (AB)C and


A(BC) = (AB)C (Associative Law)
AB = BA and AB = BA (Commutative Law)
A(BC) = (AB)(AC) and
A(BC) = (AB)(AC) (Distribution Law).
A = A,
AS = A,
AAc = S, and
AAc = .

COR-STAT1203, Term II 2024-25 14 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
De Morgan’s Law Session 2

Other obvious but useful equations include:


• (Ac) c = A,
• c = S, Sc = ,
• AA = A, AA = A, AS = S,
• A = ,
• A(AB) = A,
• A(AB) = A.
De Morgan's law: (AB)c = AcBc and (AB)c = AcBc

(AB)c = Green Area


AcBc = Green Area

COR-STAT1203, Term II 2024-25 15 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Partition of Sample Space and Event Session 2

• Mutually Exclusive Events: events A1, A2, A3, . . . , are said to be


mutually exclusive if they are pairwise mutually exclusive. That is,
Ai Aj =  whenever i ≠ j.
• Partition of Sample Space: if A1, A2, . . . , Ak are mutually exclusive
and the union of them makes up the sample space S, then, A1, A2, . . .
, Ak are said to form a partition of the sample space S, i.e.,
S = A1A2 . . . Ak
• Partition of an Event: Clearly for any event B, the events BA1,
BA2, . . . , BAk form a partition of the event B in the sense that
they are mutually exclusive, and
B = (BA1)  (BA2)  . . .  (BAk).

COR-STAT1203, Term II 2024-25 16 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Partition: Venn Diagram Illustration Session 2

See Venn diagrams below for the case of k = 6.

Partition of sample space S: Partition of event B:


A1, A2, …, A6 BA1, BA2, . . . , BA6

A2 A3 A2 A3
BA2 BA3

A1 A4 A1 BA1

BA6
B BA5
BA4 A4

A6 A5 A6 A5

This demonstration is useful in introducing a very important law:


the Law of Total Probability (later).

COR-STAT1203, Term II 2024-25 17 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 18 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Definition of Probability Session 2

For a given experiment with a sample space S, the primary objective


of probability modeling is to assign to each event A a real number,
P(A), called probability of A, that will provide a measure of the
likelihood that A will occur when the experiment is performed.

The probability P(A) is a function that maps events to real numbers


satisfying the following:
(1) 0 ≤ P(A) ≤ 1, for every A  S,
(2) P() = 0 and P(S) = 1,
(3) P(A1 A2 A3 . . .) = P(A1) + P(A2) + P(A3) + . . . ,
if {A1, A2, A2, . . . } are mutually exclusive events.

In short, P(A) is the sum of the weights of all elements in A.

COR-STAT1203, Term II 2024-25 19 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Classical Interpretation of Probability Session 2

The oldest way of measuring uncertainties is the classical probability


concept, developed originally from games of chance and applies when
all possible outcomes are equally likely to occur when an experiment
is performed:

If there are N equally likely possibilities, of which one must occur and
n(A) of them are contained in event A, then the probability of A is
given by P(A) = n(A)/N.

Using Venn S
diagram, the
Area of A A
geometric P ( A) =
interpretation: Area of S

COR-STAT1203, Term II 2024-25 20 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Classical Probability: Example Session 2

Example 2.6. A card is randomly drawn from a well-shuffled deck of


52 playing cards.
(a) What is the probability of drawing an ace?
(b) What is the probability of drawing a number card which is divisible
by 3?
Solution: (a) there are n(A) = 4 aces, and N = 52, so we get
𝑛(𝐴) 4 1
𝑃 𝐴 = = = .
𝑁 52 13

(b) Let S = Spade, H = Heart, D = Diamond, C = Club. Let A be the


event of drawing a number card that is divisible by 3, then
A = {3S, 3H, 3D, 3C, 6S, 6H, 6D, 6C, 9S, 9H, 9D, 9C},
n(A) = 12, and N = 52. Thus,
𝑛(𝐴) 12 3
𝑃 𝐴 = = = .
𝑁 52 13

COR-STAT1203, Term II 2024-25 21 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Classical Probability: Counting rules Session 2

• Multiplicative Rule: Let E1, E2, ..., Ek be sets with n1, n2, ..., nk
elements, respectively. Then there are n1 n2 …  nk ways in which
we can first choose an element of E1, then an element of E2, ..., and
finally an element of Ek .

• Number of Possible Orderings: 𝑘 × 𝑘 − 1 × ⋯ × 2 × 1 = 𝑘!

• Permutations: Order 𝑛 people in 𝑘 slots


𝑛!
P
n k = n(n – 1)(n – 2) ... (n – (k – 1)) = (order matters)
𝑛−𝑘 !

• Combinations: Choose committee of k persons from 𝑛 people


nPk 𝑛!
C
n k = = (order doesn’t matter)
𝑘! 𝑘! 𝑛−𝑘 !

COR-STAT1203, Term II 2024-25 22 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Multiplicative Rule: Application Session 2

Example 2.17. Suppose that there are n routes from town A to a


second town B, m routes from town B to a third town C, and l routes
from town C to a fourth town D. If we decided to go from town A to
town D via towns B and C. How many different routes are there from
town A to town D?
Solution: In this situation, there are k = 3 operations: A to B, B to C,
and C to D, with number of elements (different routes) n, m, and l,
respectively. Hence the total number of different routes is nml.

COR-STAT1203, Term II 2024-25 23 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Permutation: Applications Session 2

Example 2.19. In how many different ways can a president, a treasurer,


and a secretary be selected from a group of 20 people to form a
committee?
Solution: nPr = 20P3 = 201918 = 6840.
There are 20 ways to choose a president, 19 ways to choose a treasure
after a president has been chosen, and 18 choices left for a secretary.

Example 2.20. If five boys and five girls sit in a row in a random
order, what is the probability that no two children of the same sex sit
together?
Solution: First, there are 10! possible seating patterns in total for the
10 children. In order that no two children of the same sex sit together,
boys must occupy positions 1, 3, 5, 7 and 9 and girls 2, 4, 6, 8 and 10.

COR-STAT1203, Term II 2024-25 24 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Permutation: Applications Session 2

There are 5! different ways for the five boys to occupy positions 1, 3,
5, 7, 9, and 5! different ways for the five girls to occupy positions 2,
4, 6, 8 and 10.
Hence the total number of different ways for this to happen is 5!5!
Boys and girls can switch positions, i.e., boys occupy positions 2, 4,
6, 8 and 10 and girls 1, 3, 5, 7 and 9,
Hence the total number of seating patterns such that no two children
of the same sex sit together is 25!5!
Therefore, the desired probability is
2 × 5! × 5!
≈ 0.08
10!

COR-STAT1203, Term II 2024-25 25 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Combination and Permutation Session 2

Example 2.21. In how many different ways can a committee of three people
be formed from a total of 20?
Solution: Since the order is immaterial, the answer is 20C3= 1140, i.e., there
are 1140 different ways (less than the number in Example 1.18).

Example 2.22. A poker hand is defined as drawing 5 cards at random without


replacement from a deck of 52 cards. What is the probability of obtaining a full
house (a triplet of one rank and a pair of another rank)?
Solution: There are 13 denominations. Choose 2 denominations, and then
choose 3 cards from the first denomination and 2 from the second.
As the order the two denominations appear lead to two different full houses,
the total no. of ways of choosing two denominations should be 13P2. Thus,

P2 4 C2 4 C3 13 12  4  3  4 2
P(Full House) = 13
= = 0.00144
52 C5 52! (47!5!)

COR-STAT1203, Term II 2024-25 26 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 27 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Frequency Interpretation of Probability Session 2

A major shortcoming of the classical probability concept is its limited


applicability, for which there many situations in which the various
possibilities cannot be regarded as equally likely.
Among the various probability concepts, most widely held is the
frequency interpretation:

The probability of an event is the proportion of the time it occurs in the


long run when the experiment is repeated.

For example, we say that a coin is fair if repeated tossing results in


about 50% heads and 50% tails, otherwise if it results 49% of heads the
probability of heads is 0.49 (the coin is not fair).

Similarly, we say a die is fair if repeated rolling of the die results in


about 100(1/6)% 1’s, 2’s, 3’s, 4’s, 5’s, and 6’s, otherwise it is not.

COR-STAT1203, Term II 2024-25 28 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Rules for Calculating Probabilities Session 2

Complement Rule: If A is an event and Ac is its complement,


then, P(A) = 1 – P(Ac)
Note: This result is particularly useful when an event is relatively
complicated, but its complement is easier to handle.

Example 2.7. An experiment consists of tossing a coin four times.


What is the probability of obtaining at least one head?
Solution: Here the event of interest is A = 'at least one head.' This
event is complicated, but Ac = 'no heads' = {TTTT}, which contains
only one outcome. Thus
1 15
P(A) = 1 – P(Ac) = 1 – P(TTTT) = 1 − = .
24 16

COR-STAT1203, Term II 2024-25 29 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Probability of the Union of Two Events Session 2

Addition Rule: For any two events A and B, the following is true:
P(AB) = P(A) + P(B) – P(AB)

This can be seen using the Venn S


diagram on left where E1 = Green,
E2 = Purple, and E3 = Dark Green. E1 E3 E2

Note E3 = AB, we have, A B

P(AB) = P(E1E2E3) = P(E1) + P(E2) + P(E3)


= [P(E1) + P(E3)] + [P(E2) + P(E3)] – P(E3)
= P(A) + P(B) – P(AB)

However, P(A)+P(B) = [P(E1)+P(E3)]+ [P(E2)+P(E3)], where P(E3) =


P(AB), is added twice, P(AB)  P(A) + P(B)!

COR-STAT1203, Term II 2024-25 30 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 31 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Conditional Probability Session 2

The most important concept in probability may be the concept of


conditional probability. This is because

Partial information concerning the result of experiment often is


available. Given the known information, one certainly knows better
whether an event can occur or not; and
Calculation of probability of certain event sometimes can only be
done through conditioning.

The conditional probability of an event A, given that another event, B,


has occurred, is defined by
P( A  B)
P( A | B) =
P( B)
provided that P(B) ≠ 0.

COR-STAT1203, Term II 2024-25 32 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Interpretation of Conditional Probability Session 2

Geometrical Interpretation of P(A|B):

P( A  B) S
P( A | B) =
P( B) A AB B
Area of ( A  B )
=
Area of B

− the magnitude of P(A|B) depends on the relative sizes of the event


AB and the event B, as the size of S is ‘canceled’.

Recall:
− the magnitude of P(A) depends on
Area of A
P ( A) = the relative sizes of the event A and
Area of S the sample space S.
COR-STAT1203, Term II 2024-25 33 Courtesy of & adapted from Zhenlin Yang.
All errors are my own.
Venn Diagram Illustration Session 2

S S

A B A AB B

P(A|B) = 0 0 < P(A|B) < 1

S S

A AB B A B

AB = B
0 < P(A|B) < 1 P(A|B) = 1
COR-STAT1203, Term II 2024-25 34 Courtesy of & adapted from Zhenlin Yang.
All errors are my own.
Conditional Versions of the Probability Rules Session 2

“Conditioning on B” can be understood as reducing the sample space


from S to B. It is easy to see that conditional probability satisfies the
conditions of a probability set function, hence it enjoys all the
properties of probability, e.g.,
(1) P(Ac|B) = 1 – P(A|B)
(2) P(A1A2|B) = P(A1|B) + P(A2|B) – P(A1A2|B)

Example 2.9. A box contains 100 microchips, 60 were produced by


factory 1 with 15 defectives, and the rest by factory 2 with 5
defectives. One microchip is selected at random from the box and
tested. What is the probability that the microchip was produced by
factory 1 if the test indicates that it is a good one? What if the test
indicates that it is a defective one?

COR-STAT1203, Term II 2024-25 35 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Conditional Probability: Application Session 2

Solution. Let A = {the microchip was produced by factory 1}


B = {obtaining a good microchip}
The desired probabilities are P(A|B) and P(A|Bc).

Method 1: direct calculation:


Of 80 good ones, 45 from factory 1,  P(A|B) = 45/80 = 9/16.
Of 20 defective ones, 15 from factory 1,  𝑃 𝐴 𝐵 𝑐 = 15/20 = 3/4.

Method 2: from definition.


𝑃(𝐴∩𝐵) 45/100 9
𝑃 𝐴𝐵 = = = .
𝑃(𝐵) 80/100 16

𝑐 𝑃(𝐴∩𝐵 𝑐 ) 15/100 3
𝑃 𝐴𝐵 = = = .
𝑃(𝐵 𝑐 ) 20/100 4

COR-STAT1203, Term II 2024-25 36 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Independent Events Session 2

Two events A and B are called independent events if


P(AB) = P(A) P(B),
Otherwise, A and B are called dependent events.

It follows from the definition of independence that A and B are


independent if and only if either of the following holds:
P(A|B) = P(A) or P(B|A) = P(B).
It follows that A and B are mutually exclusive events if and only if
either of the following holds:
P(A|B) = 0 or P(B|A) = 0.
Therefore, independence and mutual exclusiveness are very much
different concepts.

COR-STAT1203, Term II 2024-25 37 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Independent Events: Application Session 2

Example 2.13. A box contains eight tickets, each labeled with a


binary number, with two 111, two 100, two 010, and two 001.
111 100 010 001
111 100 010 001

An experiment consists of drawing one ticket at random from the box.


Let A be the event that the "the first digit is 1", B be the event that "the
second digit is 1", and C be the event that "the third digit is 1". Are
events A and B independent? Are A and C independent? Are B and C
independent?
Solution: From the illustration above we have
P(A) = P(B) = P(C) = 4/8 = 1/2,
P(AB) = P(AC) = P(BC) = 2/8 = 1/4.
Hence A and B are independent, so are A and C, and B and C.

COR-STAT1203, Term II 2024-25 38 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 39 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Law of Multiplication Session 2

A direct application of the concept of conditional probability gives the


following important result.

Law of Multiplication: For any two events A and B,


P(AB) = P(A|B)P(B) = P(B|A) P(A)

Example 2.11. At a fair a vendor has 25 helium balloons on strings: 10


balloons are yellow, 8 are red, and 7 are green. Balloons are sold in
random order. What is the probability that the first two balloons sold
are both yellow?
Solution: Let A = {the first balloon sold is yellow},
B = {the second balloon sold is yellow}.
The quantity of interest is
P(AB) = P(A)P(B|A) = (10/25)(9/24) = 3/20.

COR-STAT1203, Term II 2024-25 40 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Law of Multiplication: Extended Session 2

Law of Multiplication for more than two events:


For any three events A, B and C
P(ABC) = P(AB)P(C|AB) = P(A)P(B|A) P(C|AB).
For any four events A, B, C and D,
P(ABCD) = P(A) P(B|A)P(C|AB) P(D|AB C),
and so on.

COR-STAT1203, Term II 2024-25 41 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Law of Multiplication: Application Session 2

Example 2.12. Four cards are drawn at random without replacement


from a deck of 52 cards. Find the probability of getting "an ace on the
first draw", "a king on second draw", "an ace again on third draw", and
"a queen on the last draw".

Solution: Define
A = {getting an ace on the first draw}
B = {getting a king on the 2nd draw}
C = {getting an ace on the 3rd draw}
D = {getting a queen on the 4th draw}

The desired probability is P(ABCD), which can be easily


calculated by the Law of Multiplication:
P(ABCD) = P(A)P(B|A) P(C|AB) P(D|ABC)
4 4 3 4
= ≈ 0 .00003
52 51 50 49

COR-STAT1203, Term II 2024-25 42 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Law of Total Probability Session 2

Sometimes it is not possible to calculate P(A) directly, but may be


possible to do the calculation part by part and then add up.

Law of Total Probability: If A1, A2, … , Ak is a collection of mutually


exclusive events such that the union of them makes up the sample
space, then for any event B, we have,
k k
P( B) =  P( Ai  B) =  P( B | Ai ) P( Ai )
i =1 i =1

The Venn diagram on the right A2 A3


illustrates the case of 6 events: BA2 BA3

{A1, A2, …, A6} form a partition of


sample space;
{BA1, BA2, BA3, BA4, BA5,
A1 BA1

BA6
B BA5
BA4 A4

BA6} form a partition of event B. A6 A5


COR-STAT1203, Term II 2024-25 43 Courtesy of & adapted from Zhenlin Yang.
All errors are my own.
Law of Total Probability: Application Session 2

Example 2.14. In a certain assembly plant, three machines, A1, A2, and
A3, make 30%, 45%, and 25%, respectively, of the products. It is known
from the past experience that 2%, 3%, and 2% of the products made by
each machine, respectively, are defective. Now, suppose that a product
is randomly selected. What is the probability that it is defective?
Solution: Consider the following events:
B: the product is defective,
A1: the product is made by machine A1,
A2: the product is made by machine A2,
A3: the product is made by machine A3.
Then, P(A1) = 0.3, P(A2) = 0.45, and P(A3) = 0.25;
P(B|A1) = 0.02, P(B|A2) = 0.03, and P(B|A3) = 0.02.
The desired probability is P(B), and by the Law of Total Probability:
P(B) = P(B|A1) P(A1) + P(B|A2) P(A2) + P(B|A3) P(A3)
= (0.02)(0.3) + (0.03)(0.45) + (0.02)(0.25) = 0.0245.
COR-STAT1203, Term II 2024-25 44 Courtesy of & adapted from Zhenlin Yang.
All errors are my own.
Chapter Contents Session 2

• Sample Space, Events & Set Algebra


• Probability & Counting Rules
• Rules for Calculating Probability
• Conditional Probability & Independence
• Bayes’ Theorem

COR-STAT1203, Term II 2024-25 45 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Bayes’ Theorem Session 2

The next result will help answer the question: Given that event B has
occurred, was it due to (caused by) A1, or A2, …, or Ak?

Bayes' Theorem:

𝑷 𝑩 𝑨𝒊 )𝑷(𝑨𝒊 )
𝑷 𝑨𝒊 𝑩) = 𝑷(𝑩)

In practical applications, the probabilities P(Ai) are often called the


prior probabilities and the conditional probabilities P(Ai|B) are called
the posterior probabilities.

COR-STAT1203, Term II 2024-25 46 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Bayes’ Theorem: Application Session 2

Example 2.14 (Cont’d). If a product was chosen and found to be


defective, what is the probability that it was made by machine A3?

Solution: The desired probability is P(A3|B).


Using Bayes rule, we obtain
P(B|A3)P(A3)
P(A3|B) = P(B)
(0.02)(0.25) 10
= = .
0.0245 49

In view of the fact that a defective product was selected, this result
suggests that it probably was not produced by machine A3.

COR-STAT1203, Term II 2024-25 47 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.
Chapter Summary Session 2

Important concepts:
sample space, event, union, intersection, complement, probability,
conditional probability, independence, mutual exclusiveness.
Important probability rules:
complement rule, addition rule, multiplication rule, law of total
probability, Bayes rule.
Important counting rules:
multiplicative rule, permutation, combination.

COR-STAT1203, Term II 2024-25 48 Courtesy of & adapted from Zhenlin Yang.


All errors are my own.

You might also like