ENGSTAT Lecture 6 Probability PDF
ENGSTAT Lecture 6 Probability PDF
ENGSTAT Lecture 6 Probability PDF
A Lecture in ENGSTAT
Introduction
• In statistics, we are concerned with
chance outcomes that occur in a planned
study or scientific investigation.
• For example:
– Number of accidents in an intersection
– Number of defects in a production line
– Tree height when fertilizer is varied
Introduction
• The data involved in statistics can either
be numerical (e.g., number of rejects) or
categorical (e.g., defective, non-defective)
S = {(x, y) | x2 + y2 < 9, x ≥ 0, y ≥ 0}
T F Question 1
T F T F Question 2
T F T F T F T F Question 3
T F T F T F T FT F T F T F T F Question 4
F N River 1
F N F N River 2
F N F N F N F N River 3
F N River 1
F N F N River 2
F N F N F N F N River 3
The complement of A
(orange part)
Venn Diagrams
AB
Venn Diagrams
AB
Venn Diagrams
AB=
(mutually exclusive events)
Relationship among events
• A A’ = S for any set A
• A B = if events A and B are mutually
exclusive.
• Distributive Laws
A (B C) = (A B) (A C)
A (B C) = (A B) (A C)
• De Morgan’s Laws
(A B )’ = A’ B’
(A B )’ = A’ B’
Relationship among events
Example: #4.2
Example: #4.4
Counting Sample Points
• In many cases, one can solve a probability
problem by counting the number of points
in the sample space without actually listing
each element.
• The fundamental principle of counting,
often referred to as the multiplication rule,
is applied.
The Multiplication Rule
Example
Permutations
• Frequently, we are interested in a sample
space that contains as elements all
possible orders or arrangements of a
group of objects.
• The different arrangements are called
permutations.
Permutations
• A permutation is an arrangement of all or
part of a set of objects.
• The number of permutations of n objects
is n!
Permutations
The number of permutations of n distinct
objects taken r at a time is
n Pr n
Pr
n!
n(n 1)...(n 1 r )
(n r )!
Example
DNA molecules consist of chemically linked
sequences of the bases adenine (A), guanine
(G), cytosine (C), and thymine (T). A sequence
of three bases is called a codon. A base may
appear more than once in a codon.
a) How many different codons are there?
b) The bases A and G are purines, while C and T are
pyrimidines. How many codons are there whose first
and third bases are purines and whose second base is
a pyrimidine?
c) How many codons consist of three different bases?
Circular Permutations
Permutations that occur by arranging
objects in a circle are called circular
permutations.
– Two circular permutations are not considered
different unless corresponding objects in the
two arrangements are preceded or followed
by a different object as we proceed in a
clockwise direction.
Circular Permutations
• For example, if 4 people are playing
bridge, we do not have a new permutation
if they all move one position in a clockwise
direction.
• By considering one person in a fixed
position and arranging the other three in 3!
ways, we find that there are 6 distinct
arrangements for the bridge game.
Circular Permutation
Solution:
Let n = number of arrangements
Then,
n = (5 – 1)! = 4! = 4(3)(2)(1) = 24
Another type of permutation
The number of distinct permutations of n
things of which n1 are of one kind, n2 of a
second kind,..., nk of a kth kind is
n!
n1! n 2 ! ... nk !
Example
How many distinct permutations can be
done from the letters of the word
INFINITY?
Solution
There are three I’s
two N’s
one F, one T, one Y.
8!
n 3360
3! 2! 1! 1! 1!
There are 3,360 ways.
Combinations
• In many problems, we are interested in the
number of ways of selecting r objects from
n without regard to order.
– These selections are called combinations.
• A combination is actually a partition with
two cells, one cell containing the r objects
selected and the other cell containing the
(n − r) objects that are left.
Combinations
The number of combinations of n distinct
objects taken r at a time is
n n
Cr
n
r r, n r
n!
n Cr
r! (n r )!
Example
Solution
a) The number of ways to adopt five of the
seven rules,
n = 7C5 = 21
b) Since the person already observes two
of the seven rules, only three more must
be adopted. The number of ways of
doing so is
n = 5C3 = 10
Partitioning
Often we are concerned with the number
of ways of partitioning a set of n objects
into r subsets called cells.
– A partition has been achieved if the
intersection of every possible pair of the r
subsets is the empty set and if the union of
all subsets gives the original set.
– The order of the elements within a cell is of no
importance.
Partitioning
The number of ways of partitioning a set of
n objects into r cells with n1 elements in the
first cell, n2 elements in the second, and so
forth, is
n n!
n1 , n 2 , ..., nr n1! n 2 ! ... nr !
where n1 + n2 + n3 + … + nr = n
Example
A college team plays 12 football games
during a season. In how many ways can
the team end the season with 7 wins, 3
losses, and 2 ties?
Solution:
12!
n 7920
7! 3! 2!
Alternative Solution:
n ways to win 7 times x ways to lose 3 times
xways to tie 2 times
12 5 2
n 12C7 5 C 3 2 C 2 7,920
7 3 2
Permutation & Combination
• Permutations of {M, N, R} taken two at a
time = 3P2 = 6
{M, N} {M, R} {N, M} {N, R}
{R, M} {R, N}
n
P( A )
N
Example: #4.14
Solution
a) There is a total of (3)(3) = 9 possible
outcomes:
SL, SR, SS,
LL, LR, LS
RL, RR, RS
b) Number of ways that neither vehicle
turns left is (2) (2) = 4.
P(at least one turns left) = (9 – 4) / 9
=5/9
Solution
c) Number of ways both vehicles make a
turn = (2) (2) = 4
Number of ways that at most one
vehicle makes a turn = 9 – 4 = 5
P(at most one vehicle turns) = 5/9
Example: #4.17
Solution to #4.17
Let A event that both generators are non defective
Then,
ways of choo sin g 2 non defects
from 3 non defects
P( A )
ways of choo sin g two generators
from five generators
3 C2 3
P( A )
5 C2 10
Example: #4.19
Solution to #4.19
Let B event that all bulbs are non defective
Then,
ways of choo sin g 3 non defective
bulbs from 4 non defective bulbs
P( B )
ways of choo sin g three bulbs
from six bulbs
4 C3 4 1
P( B )
6 C3 20 5
Example: #4.21
Solution to #4.21
8!
a) # of ways 168
2! 5! 1!
alternate solution:
# of ways 8 C2 6 C5 1 C1 168
Solution to #4.21
7!
b ) # of ways 21
2! 5!
alternate solution:
# of ways 7 C 2 5 C5 1 C1 21
21 1
P( Jones assigned to C)
168 8
Example: #4.23
Solution to #4.23
a) Let A the event that the employee
ranked first is selected
4 C2 6 3
P( A )
5 C3 10 5
Solution to #4.23
b ) Let B the event that the highest
ranked employee is 2nd or lower
4 C3 4 2
P( B )
5 C3 10 5
Solution to #4.23
c) Let C the event that the employees ranked
4th and 5th are selected
3 C1 3
P(C)
5 C3 10
Example: #4.27
Solution to 4.27
9!
a) # of ways 1,680
3! 3! 3!
alternate solution:
# of ways 9 C3 6 C3 3 C3 1,680
Solution to 4.27
Let D event that a line gets both used wrenches
7!
1! 3! 3! 140 1
b ) P( D)
9! 1,680 12
3! 3! 3!
alternate solution:
7 C1 6 C 3 3 C 3 140 1
P( D)
9 C3 6 C3 3 C3 1,680 12
Example:
#4.65
Solution to 4.65
Let A event that an ace and a face card
is drawn (in any order )
4 C1 12C1 48
P( A ) 0.0362
52 C 2 1326
Solution to 4.65
g) P( A B) 0.10
Example: #4.13
Solution to #4.13
0.84
A
(Bushing) 0.08
0.06 0.02
B
(shaft)
Note that
P(AB) = P(B|A)P(A) is equivalent to
P(AB) = P(A|B)P(B)
Conditional Probability
• The notion of conditional probability
provides the capability of reevaluating the
idea of probability of an event in light of
additional information, that is, when it is
known that another event has occurred.
• Hence, the probability P(A|B) is an
updating of P(A) based on the knowledge
that event B has occurred.
Independence
• Sometimes the occurrence of one event alters
the probability of occurrence of another event.
Such events are called dependent events.
• At other times, the probability of an event (say
A) does not change when another event occurs.
– If the extra information derived from knowing that an
event B, for instance, has occurred does not
change the probability of A — that is, if P(A|B) =
P(A) — then events A and B are said to be
independent.
Independence
For independent events,
P( A B )
P( A | B )
P( B )
becomes
P( A B )
P( A | B ) P( A ) or
P( B )
P( A B ) P( A )P ( B )
Independence
The Product or Multiplicative Rule
The product rule (or multiplicative rule)
enables us to calculate that two events will
both occur:
Straight
Left Left
Right
Straight Straight
Left
Right Right
Straight
Right
Solution to 4.36
Let
A event that at least one of the two vehicles turn
B event that at least one of the two vehicles turn left
Then,
P( B A ) P( B ) 5/9 5
P( B | A )
P( A ) P( A ) 8/9 8
Let
E an accidental death given that
the person was male
64,053
P( E ) 0.6894
92,911
Example: #4.43
Solution to #4.43
85%
5% 9.5 to 10.5
10%
< 9.5
> 10.5
P(D) = 1 – P(C)
= 1 – (0.9)(0.9)
= 0.19
Example:
#4.44
Solution to #4.44 (a)
P(current flows ) 3 [ P(only one path works ) ]
3 [ P(two paths works ) ]
P(all paths work )
3[(0.9)(0.1)(0.1)]
3[(0.9)(0.9)(0.1)]
(0.9)(0.9)(0.9)
0.999
Alternate Solution to #4.44 (a)
S eries S ystem:
P(current flow from a to b ) (0.9)(0.9) 0.81
(B)
Parallel S ystem:
(0.9)(0.9) (0.9)(0.1) (0.1)(0.9)
0.99
The numbers in the boxes represent the probability
that the component represented by the boxes are
functioning. The diagram is that of an electrical
system. For the system to work, current must be
able to flow from point A to D. What is the
probability that the system works? Assume the
components fail independently.
Solution:
P(system works ) P( A B C D)
P( A B C' D)
P( A B'C D)
(0.95)(0.7 )(0.8)(0.9)
(0.95)(0.7 )(0.2)(0.9)
(0.95)(0.3)(0.8)(0.9)
0.8037
Theorem of Total Probability
Negative
diagnosis for ? ?
cancer
Adult over 40
Adult over 40
years old
years old with
without
cancer, A
cancer, B
(0.05)
(0.95)
Positive
diagnosis for 0.78 0.06
cancer, C
Negative
diagnosis for 0.22 0.94
cancer, D
Solution
P(C) P( C A ) P(C B )
P( C | A )P ( A ) P (C | B )P( B )
(0.78)(0.05) (0.06)(0.95)
0.096
This implies that people over 40 years of age will
get diagnosed as having cancer REGARDLESS of
whether or not they really have the disease.
Bayes’ Rule
• Suppose that the DLSU bookstore sources
its office supplies from three suppliers:
Power Books, Fully Booked, and National
Bookstore.
• Suppose also that 10% of the supplies
delivered to DLSU are defective.
• What is the probability that a particular
defective item came from Power Books?
• The answer lies in Bayes’ Rule.
Example: #4.29
Person does
Person has
not have the
the disease
disease
(0.01)
(0.99)
Positive
diagnosis for 0.90 ?
disease
Negative
diagnosis for ? 0.90
disease
Person does
Person has
not have the
the disease
disease
(0.01)
(0.99)
Positive
diagnosis for 0.90 0.10
disease
Negative
diagnosis for 0.10 0.90
disease
Solution
Let A event that a person has the disease
B event that a person has a ( ) diagnosis
C event that a person does not have the disease
D event that a person has a ( ) diagnosis
P( A B )
Then, P( A | B )
P( B )
P( A )P( B | A )
P ( A ) P ( B | A ) P (C ) P ( B | C )
(0.01)(0.90) 1
(0.01)(0.90) (0.99)(0.10) 12
Schematic of the sample space
1% has
99% does not
the
have the disease
disease
Positive
diagnosis