Vous êtes sur la page 1sur 54

Quiz 1 will be on Tuesday, September 1, 2014, coverage is

only up to this lecture


The Tentative Exam Schedule for IE 27 is as follows
September 16 (Tuesday) - First Long Exam
October 13 (Monday) - Second Long Exam
November 10 (Monday) - Third Long Exam
December 5 (Friday) - Fourth Long Exam
December 12 (Friday) - Finals
Please indicate your full name at the back of every page
of your homework
Submit your homework

Todays Agenda:
Reliability
Counting Techniques

Review

What are the conditions to say that two events A & B are
independent?
P(A | B) = P(A)
P(B | A) = P(B)
P(A B)= P(A)*P(B)
Given that two events are independent what is the P(A
B)?
P(A B) = P(A)*P(B)

Reliability
The system works if there is a working path from X to Y.
Assume
Assumethe
thedevices
devicesfail
failindependently
independently and
andthat
thatthe
the
probabilities of functioning of each device is shown. What
is the probability that the system works?
X

0.8

0.9

0.7

A
B
C
Let A, B & C be the event that each device works
The
The system
system works
works ifif AA AND
AND B AND
AND CC all
all work
work
Since the events are independent we can multiply their
probabilities
P(A B C) = ?
P(A B C) = P(A)*P(B)*P(C)
P(A B C) = (0.8)(0.9)(0.7)
= 0.504

Reliability
The system works if there is a working path from X to Y.
Assume the devices fail independently and that the
probabilities of functioning of each device is shown. What
is the probability that the system works?
0.8

A
Y

X
0.7

Let A & B be the event that each device works


The system works if either A or B works
Or in other words all events EXCEPT when A & B both do
not work

Reliability
The system works if there is a working path from X to Y.
Assume the devices fail independently and that the
probabilities of functioning of each device is shown. What
is the probability that the system works?
0.8

A
Y

X
0.7

All
All
All
events
events
eventsEXCEPT
EXCEPT
EXCEPT
EXCEPTwhen
when
when
whenA
AAA&&
&B
both
bothdo
do
not
not
work
work
work
All
events
BBBboth
both
donot
not
work
P(system)==11P(A)P(B)
P(system)
P(A)P(B)

Reliability
The system works if there is a working path from X to Y.
Assume the devices fail independently and that the
probabilities of functioning of each device is shown. What
is the probability that the system works?
0.8

A
Y

X
0.7

P(system) = 1 P(A)P(B)
P(system) = 1 (1 - 0.8)(1 - 0.7)
P(system) = 1 (0.2)(0.3)
P(system) = 1 (0.06)
P(system) = 0.94

Reliability
Find the probability that the system will work
0.8
5

0.9
5

0.9

Y
0.8

0.7
5

P(system) = 0.93746

Reliability
Find the probability that the device B works given the
system works.
A 0.8

0.9
5

B
Y

X
0.8

Let B be the probability the B works and K be the


probability that the system works
P(K) = 0.9615
?
P(B | K) =

P(B K)
0.9615
P(K)

Reliability
Find the probability that the device B works given the
system works.
A 0.8

0.9
5

B
Y

X
0.8

P(B K) = ?
Using the Total Probability Rule
P(B) = P(B K) + P(B K)
P(B K) = P(B) - P(B K)

Reliability
Find the probability that the device B works given the
system works.
A 0.8

0.9
5

B
Y

X
0.8

P(B K) = P(B) - P(B K)


Given that B works, the only time the system will not work
is when A & C are not working
P(B K) = 0.95 (0.95)*(0.15)*(0.2)
P(B K) = 0.95 0.0285
P(B K) = 0.9215

Reliability
Find the probability that the device B works given the
system works.
A 0.8

0.9
5

B
Y

X
0.8

P(B | K) =

0.9215
0.9615

0.95840

Note: There is one more way to find P(B K). Finding this
method will serve as a challenge to you

Counting Techniques

Fundamental Counting Principle


If task K1, K2 Km can be done in x1, x2 xm
ways respectively, then the total number of
ways the tasks can be done in sequence
from K1 to Km is the product of all n from n1
to nm

Counting Techniques
The Engg Caf sells meals at a promo price. A meal
consists of a soup, a viand, a dessert and a drink. The
menu consists of 3 kinds of soup, 5 kinds of viand, 4 kinds
of dessert and 5 kinds of drinks. How many possible meal
combinations are there?

3
soup

5
viand

4
dessert

5
drink

300
Possible meal combinations

Counting Techniques
A
A password
password must
must only
only have
have 66 characters.
characters. The
The first
first
character
character
charactermust
must
must be
be
be aa
acapital
capital
capitalletter
letter
letter
and
and
and
the
the
the
last
last
last
22 2
characters
characters
characters must
must
mustboth
both
both
be
bebe
aa number,
number,
a number,
the
thethe
rest
rest
rest
must
must
must
only
only
only
be
be
beaaaletter
letter
letteroror
ora anumber.
a number.
number.
How
How
How
many
many
many
possible
possible
possible
password
password
password
combinations are there?

2
6

6
2

6
2

6
2

1
0

1
0

619,652,800
Possible password combinations

Counting Techniques
In the recently concluded PBB: All In, Daniel, Maris, Jane
and Vickie were announced as the BIG 4. How may ways
can I arrange them in all possible orders of winning?

There are still 4 possible housemates we can place at the


first spot
Only 3 are available for the second spot as we already
assigned a housemate to the first spot
Having filled the first two spots, we only have two
housemates to choose from
And the last housemate fills the last spot

Counting Techniques
In the recently concluded PBB: All In, Daniel, Maris, Jane
and Vickie were announced as the BIG 4. How may ways
can I arrange them in all possible orders of winning?

4x 3 x 2 x 1
= 4!
= 24

Counting Techniques
PBB: All In has a total of 18 housemates. How many ways
can I select a Big Winner, 2nd Big Placer, 3rd Big Placer and
4th Big Placer from these 18 housemates?

18!
NO! We only need to arrange 4 of the 18 and not all 18
housemates

Counting Techniques
PBB: All In has a total of 18 housemates. How many ways
can I select a Big Winner, 2nd Big Placer, 3rd Big Placer and
4th Big Placer from these 18 housemates?

1x 1 x 1 x 1
6
5
8
7
=73,440
This is what we call a Permutation

Counting Techniques

Permutation
All possible arrangements of a set where
order is important
Given a set of n elements, the number of
permutations of a subset of r elements
(taken at a time is

Pr =

n!
(n-r)!

Counting Techniques
PBB: All In has a total of 18 housemates. How many ways
can I select a Big Winner, 2nd Big Placer, 3rd Big Placer and
4th Big Placer from these 18 housemates?
In this example n = 18 and r = 4

P4 =

18

P4 =

18

18!
(18-4)!
18!
14!

P4 = 18 x 17 x 16 x

18

P4 =

18

15
73,440

Counting Techniques
A building has 5 unique security spots. The company has
a total of 8 guards. How many ways can the company
assign exactly 1 guard to each security spot?
In this example n = 8 and r = 5

P5 =

8!
(8-5)!

8x7x6x5x4
6,720 ways

Counting Techniques
How many ways can the PBB: All In Big 4 sit on a round
table?

4!

NOPE!

Counting Techniques

Circular Permutation
The number of permutations of n different
elements arranged in a circle is (n-1)!

Counting Techniques

Let us examine
In a circle
A
D

D
B

C
A

B
D

C
D

These arrangements are all the same, it is just a matter of


perspective

Counting Techniques

Let us examine
Thus we set one element in a stationary position
A
?

A
?

A
?

A
?

?
?

Then we find all possible arrangements of the remaining


elements
Thus the formula (n-1)!

Counting Techniques
How many ways can the PBB: All In Big 4 sit on a round
table?

= 3!
=6

Counting Techniques
How many ways can I rearrange the letters in the word
MICO

= 4!
= 24

Counting Techniques
How many ways can I rearrange the letters in the word
ABACA

AAABC
AAABC

= 5!

This would be true if all


the As are unique

AAABC
AAABC

AAABC But they are


AAABC NOT unique!

So in reality all these arrangements is just 1 arrangement


But they are included in the 5! Count so we have to
remove them from the total count
Since 3! Is the number of ways we can interchange the
As we divide 5! (the total) with 3!

Counting Techniques
How many ways can I rearrange the letters in the word
ABACA

5!
=
3!
=
20

This is what we call Partition Permutation

Counting Techniques
How
How many
many
Howways
ways
many
can
can
ways
II arrange
arrange
can I arrange
33 copies
copies
3 of
copies
ofMontgomery,
Montgomery,
of
4
4
copies
Montgomery,
copies
of Taha
of Taha
and
4and
2
copies
copies
2 copies
of
of Taha
Leithold
of and
Leithold
in2a copies
book
in ashelf?
book
of
Leithold shelf?
in a book shelf?

9!
=
3!4!2! 1,260
MMMTTTTLL

Counting Techniques
The formula for general permutation is actually taken
from the concept of Partition Permutation
Let us prove

Counting Techniques
How many ways can I select a Big Winner, 2nd Big Placer,
3rd Big Placer and 4th Big Placer from the set of final 8
housemates?

P4 =

8!
(8-4)!

Counting Techniques
How many ways can I select a Big Winner, 2nd Big Placer,
3rd Big Placer and 4th Big Placer from the set of final 8
housemates?

X X X X 4 3 2 1
X 3 X 2 4 X X 1
4 2 X X X X 3 1

Counting Techniques
How many ways can I select a Big Winner, 2nd Big Placer,
3rd Big Placer and 4th Big Placer from the set of final 8
housemates?

X X X X 4 3 2 1
Technically it is just the number of ways I can arrange the
string X X X X 1 2 3 4
By Partition Permutation

P4 =

8!
(8-4)!

8!
4!

=
1,680

Counting Techniques
How many ways can I select a Final Four from the set of
final 8 housemates?
Let us use Partition Permutation again

X X X X 4 4 4 4
4 4 X X X 4 X 4
X 4 X 4 4 X X 4

Counting Techniques
How many ways can I select a Final Four from the set of
final 8 housemates?
Let us use Partition Permutation again

X X X X 4 4 4 4
Technically it is just the number of ways I can arrange the
string X X X X 4 4 4 4
By Partition Permutation
Permutations with no
specific order is
called
COMBINATION

8!
= 70
4!4!

Counting Techniques

Combination
Number of ways of selecting r objects from n
elements where order
is not important

Given a set of n elements, the number of


combination of a subset of r elements (taken
at a time is

Cr =

n!
(n-r)!r!

n

nCr =
r

Counting Techniques
How many ways can I select a Final Four from the set of
final 8 housemates?

8

8C4 =
4

8!
=
= 70
4!4!

Counting Techniques
In a class 10 students, how many ways can I select 3
volunteers for board work?
n = 10

r=3

VVVNNNNNNN

10

10C3 =
3

=
=

10!
(10-3)!3!
10!
7!3!

= 120

Counting Techniques
How many ways can I be dealt a hand of 13 cards from a
standard deck of cards?
n = 52

r = 13

52

52C13 =
13

=
=

52!
(52-13)!
13!
52!
39!13!

= 6.35014 x
1011

Counting Techniques
What we know so far
FPC

(x1)(x2)
(xm)

Line Permutation
n!
Circular
Permutation
(n-1)!
Partition
Permutation
n!
n1!
n !...n !

Permutation

Pr =

n!
(n-r)!

Combination

Cr =

n!
(n-r)!r!

Examples
How many ways can I arrange 6 Boys and 3 girls in a line
if all the girls must be beside each other?

B1 B2 B3 B4 B5 B6 G1 G2 G3

=
Since all the girls must be beside each other, we can treat
30,240
them as 1 entity first
7!3!
3!

I can now rearrange these 7 individual entities (6 boys +


girl group) how many ways?
Plus an additional 3! Because the three girls can switch
places

Examples
How many ways can I arrange 10 students in a line if 2 of
them cannot be beside each other?
=
==total
total
total arrangements
arrangements
arrangements minus
minus
minusnumber
number
number
ofofof
ways
ways
ways
the
the
the
2 2sit
sit
2
sit beside
besideeach
each
other
other

= 10! 9!2!
= 2,903,400

Examples
Twenty distinct cars park in the same parking lot everyday. Ten
of these cars are US-made, while the other ten are Japan-made.
This parking lot has exactly twenty spaces, and all are in a row,
so the cars park side by side each day. The drivers have
different schedules on any given day, however, so the position
any car might take on a certain day is random. What is the
probability that on a given day, the cars will park in such a way
that they alternate (e.g., US-made, Japan-made, US-made,
etc.)?

Examples
I have 3 different books related to math, 5 different books
related to science and 6 literature books. How many ways can I
arrange them in a bookshelf if all books of the same subject
must be beside each other?

Examples
What is the probability that in 7 coin tosses, exactly 5 comes up
tails?

Examples
What is the probability that in 7 coin tosses, at least 5 comes
up tails?

Examples
If I am dealt 5 cards, what is the probability that I am dealt with
exactly 2 aces?

Examples
If I am dealt 5 cards, what is the probability that it is a full
house (3 of a kind + 2 of a kind)?

Examples
In a delivery of 20 boxes, 4 are known to be defective. If I select
3 boxes at random what is the probability that I select exactly 2
boxes that is defective?

Next Time on IE 27
Random Variable
PMF, PDF
Discrete Probability Distributions

Source: Taha

.Fin.

Vous aimerez peut-être aussi