Week 2: Probability
• Review counting techniques
• Study conditional probability
• Study probability distributions for discrete random variables
Suggested Textbook Readings: Chapter 2: 2.3-2.5, and Chapter 3: 3.1-3.3
Section 2.3: 31, 35, 39
Section 2.4: 45, 47, 55, 65
Section 2.5: 71, 73, 81, 85
Section 3.2: 13, 17, 23
Section 3.3: 29, 35, 37, 39
S is set of all possible outcomes in the experiment Week 2: Probability and Discrete Probability Distributions 2
The objective of probability is to assign to each event A,an umbr P(A)w hihisa
measure of the chance that the event A will occur. To be self-consistent, the assigned
probability must satisfy the following axioms. For each rule, draw a Venn diagram
1. For any sample space S, P(S)=1.
2. For any event A,0 ≤ P(A) ≤ 1.
3. If A and B are mutually exclusive events, then P(A ∪ B)= P(A)+ P(B).
4. If A is the complement of A,t en P(A )=1 − P(A).
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 3
diagrams in terms of sets, and then write out the probability of the shaded event. (In the
ﬁrst diagram, the shaded region is the common region of A and B.)
For any two eventA s and B, P(A ∪ B)= P(A)+ P(B) − P(A ∩ B).
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 4
When the simple outcomes of an experiment are equally likely, we can employ a simple
counting technique to ﬁnd the probabilities for the compound events.
If there are N outcomes in a sample space, and let N(A)e tteubrf
outcomes contained in event A, then the probabilities of event A is
Example 2: What is the probability of drawing an ace from a well-shuﬄed deck of 52
However it can be quite diﬃcult to determine the number of outcomes in a sample space
by direct enumeration. To handle this kind of problem systematically, it can be useful
to construct a tree diagram.
Example 3: A consumer testing service rates lawn mowers as being easy, average, or
diﬃcult to operate; as being expensive or inexpensive; and as being costly, average, or
cheap to repair. In how many diﬀerent ways can a lawn mower be rated by this testing
Product Rule If the ﬁrst element or object of an ordered pair can be selected in n 1
ways, and for each of thesen w1ys, the second element of the pair can be selected in
n2ways, then the number of pairs is n 1 2
The product rule can be generalized to k-tuples.
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 5
Permutations and Combinations
Deﬁnition: Any ordered sequence of k objects taken from a set of n distinct objects is
called a permutation of size k of the objects. The number of permutations of size k that
can be constructed from the n objects is P k,n.
Pk,n=( n)(n − 1) · ... · (n − k +2)( n − k +1)= n! .
(n − k)!
Example 4: Suppose Mr Tanner brought seven ﬂavours of ice cream home from the
store. His kids DJ, Stephanie, and Michelle all want a diﬀerent ﬂavour. How many
ways are there to give each kid a diﬀerent ﬂavour?
Deﬁnition: An unordered subset of size k of n objects is called a combination,t e
number of which is denoted ▯n▯
k ▯ n P
Example 5: Suppose there are seven diﬀerent ﬂavours of ice cream at the store. If Mr
Tanner wants to bring home three diﬀerent ﬂavoured ice creams for his kids, how
many ways are there to do this?
Example 6: Five coins are tossed, and number of heads are observed. How many out-
comes in each case?
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 6
Simulations in MatLab
The following is a simulation for tossing three coins and observing the number of heads.
H=[0,0,0,0]; ‘‘H’’ store the number of heads observed,
for N=1:100 toss 100 times,
coins=rand(1,3); Each time we generate a set of three
random numbers between 0 and 1,
i=0; ‘‘i’’ is used to count the number of heads,
for k=1:3 A loop to check the three coins,
if coins(k)>0.5 It is a head if the number is greater
i=i+1; than 0.5, otherwise it is a tail,
As a practice, write a program simulating the ﬁve coins in previous example.
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 7
Working with our new ideas of events and sample spaces, we can now deﬁne and compute
probabilities for more interesting cases.
Example 7: (Example 2.24, page 67) Complex components are assembled in a plant
that uses two diﬀerent assembly lines, A an1 A . Li2e A uses o1der equipment than
A 2 so it is somewhat slower and less reliable. Suppose on a given day, line A has1as-
sembled 8 components, of which 2 have been identiﬁed as defective (denoted by D) and 6
as non-defective (UD), whereas the line A ha2 produced 1 defective and 9 non-defective
components. Unaware of this information, the sale manager randomly selects one of
these 18 components for a demonstration.
(a) List all events, and ﬁnd the corresponding probabilities.
(b) Now we add a condition, if a component from line A is s1lected, what is the proba-
bility that it is defective?
(c) If the selected component turns out to be non-defective, what is the probability that
the component is selected from the line A ?2Argue ﬁrst from intuition, or using a Venn
Law of Conditional Probability
For any two eventA s and B with P(B) > 0, the conditional probability of A given that
B has occurred is deﬁned by
P(A ∩ B)
MTHE 224 Fall 2012 Week 2: Probability and Discrete Probability Distributions 8
Law of Total Probability
Let A 1··· ,A k be mutually exclusive and mutually exhaustive events. Then for any
P(B)= P(B|A )P(A1)+ ··1 + P(B|A )P(A ) k k
Example 8: (Example 7: Continued) Use Law of Total Probability to ﬁnd P(D).
Example 9: (Example 2.30, page 73) Only 1 in 1000 adults is aﬄicted with a rare
disease for which a diagnostic test has been developed.
• If an adult has the disease, a positive result will occur 99% of the time, whereas
• if an individual has no disease, the test result will show positive only 2% of the
(a) Now you walk into doctor’s oﬃce today, what is the prob