Chapter Two - Probability
Chapter Two - Probability
Chapter Two - Probability
Textbook:
Applied Statistics and Probability for Engineers, by
D. Montgomery and G. Runger, 6th edition, Wiley.
Email: Drjreissat@gmail.com
Office: IE
What is Probability?
• In Chapters 1, we used graphs and numerical
measures to describe data sets which were
usually samples.
• We measured “how often” using
Relative frequency = f/n
• As n gets larger,
Sample Population
And “How often”
Probability
= Relative frequency
• An experiment is the process by which an
observation (or measurement) is obtained.
Examples:
✓ Dice roll:
Outcomes = 1, 2, 3 , 4, 5 6 (integers)
Example:
Two ways to define the sample space of a 6 –sided dice roll.
1- Consider the experiment of rolling one die, the sample space is
S1 = {1, 2, 3, 4, 5, 6}
Example:
The sample space S, of possible outcomes when 2 consecutive coin
are tossed may be written as
Example: Suppose that three items are selected at random from a
manufacturing process. Each item is inspected and classified
defective, D, or nondefective, N. As we proceed along each possible
outcome, we see that the sample space is
Examples:
1- if the possible outcomes of an experiment are the set of cities in
the world with a population over million, the sample space is written
S = x x is a city with a population over 1 million
S = ( x, y ) x 2 + y 2 4
Example 2.2: 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, the sample space is
** In some experiments,
it is helpful to list the
elements of the sample
space systematically by
means of a tree diagram
Figure 2.2 Tree Diagram for
Example 2.3
Three items are selected at random from a manufacturing process.
Each item is inspected and classified defective, D, or non-defective, N.
Events
➢ A set is a collection of unique objects.
➢ A set A is a subset of another set B if every element of A is also an
element of B. We denote this as A B.
➢ Event: a subset of a sample space. We are interested in
probabilities of events.
The event A that the outcome when a die is tossed is divisible by 3 is
the subset of the sample space S1, and can be expressed as
A = 3, 6
A A’
➢ The intersection of two events A and B, denoted by A ∩ B, is the
event containing all elements that are common to A and B.
A B
A B
A B
A B =
Disjoint Events
Example:
Let V = {a, e, i, o, u } and
C = {l, r, s, t };
then it follows that V ∩ C = Φ.
That is, V and C have no elements in common and,
therefore, cannot both simultaneously occur.
•Example: Experiment: Toss a die
Not Mutually
Exclusive
–A: observe an odd number
–B: observe a number greater than 2
–C: observe a 6
–D: observe a 3
B and C?
Mutually
B and D?
Exclusive
➢ The union of two events A and B, denoted by A ∪ B, is the event
containing all elements that belong to A or B or both.
A B
A B
A B = {1, 2}
B C = {1, 3}
A C = {1, 2, 3, 4, 5, 7}
B’ A = {4, 7}
AB C = {1}
(A B ) C ’ = {2, 6, 7}
Experiments and Events
S
•E1 •E3
•The die toss:
–A: an odd number A •E5
–B: a number > 2 B
•E2 •E4 •E6
N u m b e r o f t im e s A o c c u r s f
=
n n
• If we let n get infinitely large,
f
P ( A ) = lim
n→ n
The Probability of an Event
• Examples:
–Toss a fair coin. P(Head) = 1/2
– Suppose that 10% of the U.S. population has red hair. Then
for a person selected at random,
P(Red hair) = 0.10
Using Simple Events
Example:
How may sample points are in the sample space when a pair of dice is
thrown once?
n1 = 6, n2 = 6
→ n1 n2 = 36 possible ways
Counting Sample Points
Sam is going to assemble a computer by himself. He has the choice of
ordering chips from two brands, a hard drive from four, memory from
three and an accessory bundle from five local stores. How many
different ways can Sam order the parts?
Since n1 = 2, n2 = 4, n3 = 3, and n4 = 5,
there are n1·n2·n3·n4 = 2·4·3·5 = 120 different ways to order the parts
Counting Sample Points
Example: How many even four-digit numbers can be formed from the
digits 0, 1, 2, 5, 6, and 9 if each number can be used only once?`
For even numbers, there are n1 = 3 choices for units position.
However, the thousands position cannot be 0.
If units position is 0, n1 = 1, then we have n2 = 5 choices for thousands
position, n3 = 4 for hundreds position, and n4 = 3 for tens position. In
this case, totally n1·n2·n3·n4 = 1·5·4·3 = 60 numbers.
If units position is not 0, n1 = 2, then we have n2 = 4, n3 = 4, and n4 = 3.
In this case, totally n1·n2·n3·n4 = 2·4·4·3 = 96 numbers.
The total number of even four-digit numbers can be calculated by
60 + 96 = 156.
?
How if each number can
be used more than once?
Permutation
There are n1 = 4 choices for the first position, and n2 = 3 for the second,
giving a total n1·n2 = 4·3 = 12 permutations.
4!
4 P2 =
= 12
(4 − 2)!
Permutation
Example:
Three awards (research, teaching and service) will be given one year
for a class of 25 graduate students in a statistics department.
If each student can receive at most one award, how many possible
selections are there?
Since the awards are distinguishable, it is a permutation problem.
The total number of sample points is
(a) 50P2
? For detailed explanation
(b) 49P1 + 49P2
read the e-book.
(c) 2P2 + 48P2
(d) 50P2 – 2 or {2·2P1·48P1 + 48P2}
a) n = 50 , r = 2 …… then nPr >>>> 50 P 2 = 2450
b) (i) A is made President >>> 49 – 1 position
n = 49 , r = 1 >>>>> 49 P1= 49! / 48! = 49
(ii) A is not made President
n = 49 , r = 2 >>>>>> 49P2= 2352
(c) (i) B : President C : Treasurer …. 1
C : President B : Treasurer …. 1
___
2
(ii) n = 48 , r = 2 >>>>>>>
48P2 = 2256
n!
n1 !n2 ! nk !
10!
1!2!4!3! = 12, 600
Theorem
Example :
A coin is tossed twice. What is the probability that at least one head
occurs?
A = {2, 4, 6} → A B = {2,3, 4, 6} → P ( A B ) = 7 9
B = {3, 6} → A B = {6} → P( A B) = 2 9
Additive Rules
➢ If A and B are any two events, then
S
P ( A B ) = P ( A) + P ( B ) − P ( A B ) A A B B
A B
➢ If A and B are mutually exclusive, then
S
P( A B) = P( A) + P ( B )
A B
A B
➢ For three events A, B, and C,
P( A B C ) = P( A) + P( B) + P(C ) −
P( A B) − P( A C ) − P( B C ) + P( A B C )
? Can you prove using
Venn diagram?
➢ P (A ∩ B′ ) = P (A) – P (A ∩ B)
Additive Rules
Example: The probability of John to be hired by 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?
B B
A P( A B) P(A B ) P(A)
The conditional
P(A B) probability of B
P(B | A) = given that A has
P(A) occurred
Conditional Example Probability
◼ Of the cars on a used car lot, 70% have air conditioning (AC) and 40%
have a CD player (CD).
20% of the cars have both.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
P(CD AC) .2
P(CD | AC) = = = .2857
P(AC) .7
Conditional Probability Example
(continued)
◼ Given AC, we only consider the top row (70% of the cars). Of
these, 20% have a CD player. 20% of 70% is 28.57%.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
P(CD AC) .2
P(CD | AC) = = = .2857
P(AC) .7
Multiplication Rule
2 4 2
= =
4 52 52
number of cards that are red and ace 2
= =
total number of cards 52
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
Conditional Probability
A = {2, 4, 6} → P ( A) = 3 6
B = {6} → P( B) = 1 6
A B = {6} → P( A B) = 1 6
P( A B) 1 6 1
P( B A) = = =
P( A) 36 3
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
(a) arrives on time given that it departed on time,
(b) departed on time given that it has arrived on time, and
(c) arrives on time given that it did not depart on time
P( D A) 0.78
(a) P( A D) = = = 0.94
P( D) 0.83 A S
D
A D
P( A D) 0.78
(b) P( D A) = = = 0.95 D’
P( A) 0.82 A D’
P( D A) 0.82 − 0.78
(c) P( A D) = = = 0.24
P( D) 1 − 0.83
Statistical Independence
◼ Of the cars on a used car lot, 70% have air conditioning (AC) and 40%
have a CD player (CD).
20% of the cars have both.
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
CD No CD Total
AC .2 .5 .7
No AC .2 .1 .3
Total .4 .6 1.0
P(AC ∩ CD) = 0.2
P(AC) = 0.7
P(AC)P(CD) = (0.7)(0.4) = 0.28
P(CD) = 0.4
P(AC ∩ CD) = 0.2 ≠ P(AC)P(CD) = 0.28
So the two events are not statistically independent
Bivariate Probabilities
B1 B2 ... Bk
. . . . .
. . . . .
. . . . .
P(Ace)
2 2 4
= P(Ace Red) + P(Ace Black) = + =
52 52 52
Color
Type Red Black Total
Ace 2 2 4
Non-Ace 24 24 48
Total 26 26 52
Ch. 2-
Using a Tree Diagram
.2
Given AC or no .7 P(AC ∩ CD) = .2
AC:
P(AC ∩ CD) = .5
.5
.7
All
Cars
.2
.3 P(AC ∩ CD) = .2
.1 P(AC ∩ CD) = .1
.3 Ch. 2-
Independent Events:
Basic Concept…
➢ Two events A and B are independent if and only if
P( B A) = P( B) or P( A B ) = P ( A)
Let A be the event that the first fuse is defective and B the event that the
second fuse is defective, then
5 4 1
P( A B) = P( A) P( B A) = =
20 19 19
Multiplicative Rules
Example: 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?
P( B2 ) = P( B1 B2 ) + P (W1 B2 )
3 6 4 5 38
P( B2 ) = P( B1 ) P( B2 B1 ) + P(W1 ) P( B2 W1 ) = + =
7 9 7 9 63
P( B2 ) = P( B1 B2 ) + P (W1 B2 )
3 6 4 5 38
P( B2 ) = P( B1 ) P( B2 B1 ) + P(W1 ) P( B2 W1 ) = + =
7 9 7 9 63
Multiplicative Rules
Example: An electrical system consists of four components as
illustrated below. The system works if components A and B work and
either of the components C or D work. The reliability (probability of
working) of each component is also indicated. Find the probability
that
(a) the entire system works
(b) the component C does not work,
given that the entire system works
(c) the entire system works given that
the component C does not work.
Assume that four components work
independently.
(c) Find the probability that the entire system works given that the
component C does not work
P(C not working but system works )
P(system works C ) =
P(C )
P( A B C D) (0.9)(0.9)(1 − 0.8)(0.8)
= = = 0.648
P(C ) (1 − 0.8)
Bayes’ Rule
➢Refer to the following figure.
A = ( E A) ( E A)
P( A) = P ( E A) ( E A)
= P ( E A) + P ( E A)
= P( E ) P( A E ) + P( E ) P( A E )
Example: A travel agent offers 4-day and 8-day trips around USA.
Based on long-range sales, the probability that a customer will book a
4-day trip is 0.75. Of those that book that trip, 60% also order the bus
pass. But only 30% of 8-day trip customers order the bus pass. A
randomly selected buyer purchases a bus pass and a round trip. What
is the probability that the trip she orders is a 4-day trip?
F : the customer books a 4-day round trip
E : the customer books an 8-day round trip
B : the customer orders a bus pass
P( B F )
P( B) = P( B F ) + P( B E ) P( F B) =
P( B)
= P( F ) P( B F ) + P( E ) P( B E ) P( F ) P( B F )
=
= (0.75)(0.6) + (1 − 0.75)(0.3) P( B)
(0.75)(0.6)
= 0.525 =
0.525
= 0.857
Example: In a certain assembly plant, three machines, B1, B2, and B3,
make 30%, 45%, and 25%, respectively, of the products. It is known
from past experience that 2%, 3%, and 2% of the products made by
each machine, respectively, are defective. Now, suppose that a
finished product is randomly selected. What is the probability that it
is defective?
P(B3 )P( A | B3 )
P(B3 | A) =
P(B1 )P( A | B1 ) + P(B2 )P( A | B2 ) + P(B3 )P( A | B3 )
0.005 10
= =
0.006 + 0.0135 + 0.005 49
(0.25)(0.02)
= = 0.204
0.0245