Lec 4 - Prob-2
Lec 4 - Prob-2
PROBABILITY
SET THEORY
COUNTING TECHNIQUES
Example; Set Theory
The route used by a certain motorist in commuting to work
contains two intersections with traffic signals.
The probability that he must stop at the first signal is 0.4,
The analogous probability for the second signal is 0.5, and
The probability that he must stop at at least one of the two
signals is 0.6.
2
Example; Set Theory
Theroute used by a certain motorist in commuting to work
contains two intersections with traffic signals.
P(A) = The probability that he must stop at the first
signal is 0.4,
P(B) = The analogous probability for the second signal is
0.5, and
P(A È B) = The probability that he must stop at at
least one of the two signals is 0.6.
What is the probability that he must stop at both
signals?
P(A Ç B) = P(A) + P(B) - P(A È B)
= 0.4 + 0.5 - 0.6 = 0.3
3
Example; Set Theory
The route used by a certain motorist in commuting to work
contains two intersections with traffic signals.
A = The probability that he must stop at the first signal is
0.4,
B = The analogous probability for the second signal is
0.5, and
P(A È B) = The probability that he must stop at at
least one of the two signals is 0.6.
What is the probability that he must stop at the first
signal but not at the second one?
P(A Ç B¢) = P(A) - P(A Ç B)
= 0.4 - 0.3 = 0.1
4
Example; Set Theory
The route used by a certain motorist in commuting to work
contains two intersections with traffic signals.
A = The probability that he must stop at the first signal is
0.4,
B = The analogous probability for the second signal is
0.5, and
P(A È B) = The probability that he must stop at at
least one of the two signals is 0.6.
What is the probability that he must stop at exactly
one signal?
P(exactly one) = P(A È B) - P(A Ç B)
= 0.6 - 0.3 = 0.3
5
Counting Techniques
General Mutiplication Rule
Tree Diagrams
Permutations
Combinations
6
Counting Techniques
When calculating probabilities, we need to know
the total number of outcomes in the sample space.
When the various outcomes of an experiment are
equally likely (the same probability is assigned to
each simple event), the task of computing
probabilities reduces to counting.
If N is the number of outcomes in a sample space
and N(A) is the number of outcomes contained in
an event A, then
MULTIPLICATION/PRODUCT RULE
If an event can occur in n1 ways, and for each of
these n1 ways, a 2nd event can occur in n2 ways,
then the two events can occur in n1* n2 ways
together
i.e., the total number of possibilities = n1* n2
8
MULTIPLICATION/PRODUCT RULE
Example-1:
Possibilities of outcomes of two coin flips. For
one coin flip possibilities = 2.
Total possible outcomes are 2 x 2 = 4
Example-2:
For 2 Pants, 3 Shirts and 2 shoes pairs, the
possible sets of dresses are
2 x 3 x 2 =12 sets of dresses
9
10
Tree Diagram Example
Sets of Dresses
2 Pants
3 Shirts
2 Pairs of Shoes
2
3
6
7
9
10
11
12
Permutations
Sometimes we are concerned with how
many ways a group of objects can be
arranged
__________.
•How many ways to arrange books on a shelf
•How many ways a group of people can stand in
line
•How many ways to scramble a word’s letters
Permutation
Any ordered sequence of k objects taken
from a set of n distinct objects (without
replacement) is called a permutation of size k
of the objects.
The number of permutations of size k that
can be constructed from the n distinct objects
is denoted by Pk,n
n!
Pk , n
( n k )!
Without replacement means that an object
can appear only once in a particular
permutation/set. 14
Permutation: Example
There are ten teaching assistants available for grading
papers in a particular course. The paper consists of four
questions, and the professor wishes to select a different
assistant to grade each question (only one assistant per
question).
In how many ways can assistants be chosen to grade the
exam?
Here n = the number of assistants = 10 and
k = the number of questions = 4.
The number of different grading assignments is then
15
Combinations
Sometimes, we are only concerned with
selection of a group of objects and not the order in
which they are selected.
Combination is an “unordered” arrangement of k
distinct objects taken from a set of n distinct objects
The number of ways of ordering n distinct objects
taken k at a time is represented as C k,n
nn n!
Ck , n C
k
k k!(n k )!
Permutation vs. Combination
Order matters Permutation
Order doesn’t matter Combination
Pk ,n n!
Ck , n
k! k! (n k )!
Permutation vs. Combination
The number of combinations of size k from
a particular set is smaller than the number of
permutations
When order is disregarded, a number of
permutations correspond to the same
combination.
Pk ,n n!
Ck ,n
k! k! (n k )!
Six permutations (A, B, C), (A, C, B), (B, A, C),
(B, C, A), (C, A, B), and (C, B, A) are equivalent to the a
single combination (A, B, C).
Combinations: Example
4 students from a class of 11 are supposed to work as
a team/ syndicate on a project.
19
Combinations: Example
Suppose that 3 cars in a production run of 40 are
defective.
A sample of 4 is to be selected for checking of defects.
Questions:
How many different samples can be chosen?
How many samples will contain exactly one
defective car?
What is the probability that a randomly chosen
sample will contain exactly one defective car?
How many samples will contain at least one
defective car?
20
Combinations: Example
Suppose that 3 cars in a production run of 40 are
defective.
A sample of 4 is to be selected for checking of defects.
Questions:
How many different samples can be chosen?
40 40! 40!
C4, 40
4 4! (40 4)! 4!.36!
40.39.38.37
91390
4.3.2.1
21
Examples on Combinations
2) How many samples will contain exactly one defective
car?
Think of selecting a sample as a 2-step process:
Step 1: Choose the defective cars;
Step 2: Choose the good cars.
There are C1,3 ways to choose 1 defective car.
There are C3,37 ways to choose 3 good cars.
By the multiplication rule, the number of samples
containing exactly 1 defective car is
C1,3 x C3,37 = 3∙(37∙36∙35) / (3∙2∙1) = 23,310
3) What is the probability that a randomly chosen
sample will contain exactly one defective car?
The probability = 23,310 / 91,390 = 0.255
22
Examples on Combinations
4) How many samples will contain at least one defective car?
# of samples with ≥1 (at least one ) defective cars =
(all possible samples) – (# of samples with no defective cars)
and, # of samples with no defective cars)
= (# of samples with only good cars)
= C4,37 = 66,045
Thus, # of samples with ≥1 (at least one ) defective cars
= 91,390 – 66,045 = 25,345
23
Examples on Combinations
4) How many samples will contain at least one defective car?
# of samples with ≥1 defective cars
= 91,390 – 66,045 = 25,345
24
Permutation: Example
Bar coding based on two alphabets from A,B,C,D,E
and three digits from 0,1,2,3,4,5
Example: AC-145
No repetitions: a digit or a number can appear only
once in bar code.
Total number of bar code possibilities
= P2,5 x P3,6
= (5!/3!) x (6!/3!)
= (5x4) x (6x5x4)
= 2400
25
Permutation: Example
How many bar codes will have letters upto C and digits
upto 3
Total number of bar code possibilities
= P2,3 x P3,4
= (3!/1!) x (4!/1!)
= (3x2) x (4x3x2)
= 144
26