You are on page 1of 16

INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic

ISE Department Lecturer: Phan Nguyễn Kỳ Phúc


--------------------o0o------------------

PROBABLITY
1. Content
 Basic Definitions: Events, Sample Space, and Probabilities
 Basic Rules for Probability
 Counting Process
 Bayes’ Theorem
2. Basic Definitions
 Set is a collection of elements or objects of interest
 Empty set (denoted by Æ) is a set containing no elements
 Universal set (denoted by S) a set containing all possible elements
 Complement (Not). The complement of A is a set containing all elements of S not in A
 Intersection (And) A ∩ B is a set containing all elements in both A and B
 Union (Or) A ∪B í a set containing all elements in A or B or both
 Mutually exclusive or disjoint sets are sets having no elements in common, having no
intersection, whose intersection is the empty set
 Partition is a collection of mutually exclusive sets which together include all possible
elements, whose union is the universal set
 Sample Space or Event Set is a set of all possible outcomes (universal set) for a given
experiment. E.g.: Throw die S = (1,2,3,4,5,6)
 Event is Collection of outcomes having a common characteristic. E.g.: Even number, A =
(2,4,6)
Example:
Question 1: Dice A has 10 faces which 7 faces are numbered from 1 to 7, 3 faces are numbered
as 8 . Dice B has 6 faces which are numbered from 5 to 10. Now we toss 2 dice. Find the sample
space if we are interested in
a) The total value of 2 up faces of 2 dice
b) The max value between 2 up faces of 2 dice
c) The min value between 2 up faces of 2 dice
Question 2: Prove that when rolling two dices, two sets A and B are mutually exclusive. Given
that
 A: sum of 2 face up dice is equal to 8
 B: at least once face up dice is 1.
3. Basic rules for Probability

Probability

Range of values 0 ≤ P(A) ≤1

Complement P ( A )=1−P (A )

02 Probability 1
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

Intersection

Union

Conditional Probability

Intersection of several
independents events
Union of several
independents events
Example:
Question 1: Pick up a random integer number between 1 and 100. Find the probability that this
number is divided either 2 or 5 or both
Question 2: Find the probability that the system work well. Given the probability function well
for each component as P(A) =0.7, P(B)=0.6, P(C)=0.5.

Question 3: A survey was conducted at Mutende Primary School to establish how many of the
650 learners buy product A and how many buy product B. The following was found:
 50 learners bought nothing
 400 learner bought A
 300 learners bought B.
Represent this information with a Venn diagram. If a learner is chosen randomly, calculate the
probability that this learner buys:
 A only
 B only
 Neither A nor B
 A and B
 A or B
Question 4: The children in a nursery school were classified by hair and eye color. 44 has red
hair and not brown eyes, 14 has brown eyes and red hair, 5 has brown eyes but not read hair and
40 did not have brown eyes or red hair.
 How many children were in the school?
 What is the probability that a child chosen at random has
o brown eyes ,
o red hair
 A child with brown eyes is chosen randomly. What is the probability that this child will
have red hair?
We can draw the Venn diagram as below

02 Probability 2
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

         
B and NR
=5     NB and NR =40
         
         
      R and NB =44
B and R
=14        
         
         

Question 5: A survey was conducted at linguistic department show that.


 70 students can speak at least English. Of them, 40 students can only speak English
 50 students can speak at least Chinese. Of them, 20 students can only speak Chinese.
 50 students can speak at least French. Of them, 30 students can only speak French
 10 student can speak 3 languages
A student is chosen randomly. What is the probably that this student can speak:
 Both English and Chinese
 Both Chinese and French
 Both French and English

02 Probability 3
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

4. Counting Process
Factorial Permutation Combinatorial
Definition n factorial is the number of ways Permutations are the possible Combinations are the possible selections
in which n objects can be ordered selections of r objects out of a of r items from a group of n items
ordered. total of n objects. The number of regardless of the order of selection. The
permutations of n objects taken r at a number of combinations is denoted as
time is denoted nPr. nCr and is read n choose r.

Formula n!= n(n-1)(n-2)…2×1

Example Find the number of ways to Find the number of ways to arrange 6 Find the number of ways to select a
arrange 6 students into 6 chairs students into 4 chairs with group of 4 students from 6 students.
with consideration to the order of consideration to the order of the
the arrangement. arrangement.

02 Probability 4
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

Homework & Example:


Question 1: There are 4 Mathematical Books, 3 Science Books, 2 Literature Books. These books
are put on shelves. How many different ways to put them so that books of the same topic are put
together ?
Answer: N=3! × 4 ! × 3 !×2 !

Question 2:
1. How many different 7-place licenses plates are possible if the first 3 places are to be occupied
by letters and the final 4 by numbers? 26letter and 10 digits
Answer: N=263 × 104

2. How many different 7-place licenses would be possible if repetition among letter or numbers
were prohibited?
Answer: N= ( 26× 25 ×24 ) ×(10 ×9 × 8 ×7)

Question 3: A class in probability theory consists of 6 men and 4 women. An examination is


given, and the students are ranked according to their performance. Assume that no two students
obtain the same score.
1. How many different rankings are possible?
Answer: N=10 !

2. If the men are ranked just among themselves and the women just among themselves, how
many different rankings are possible?
Answer: N=6 ! ×4 !

Question 4: A chess tournament has 10 competitors, of which 4 are Russian, 3 are from the
United States, 2 are from Great Britain, and 1 is from Brazil. If the tournament result lists just the
nationalities of the players in the order in which they placed, how many outcomes are possible?
10 !
Answer: N=
4 !×3 ! ×2 ! ×1 !

Question 5: From a group of 5 women and 7 men, how many different committees consisting of
2 women and 3 men can be formed? What if 2 of the men are feuding and refuse to serve on the
committee together?
Answer:
Let A, B are the names of 2 men refusing to serve on the committee together?
1st approach, by enumerating the statisfying cases
2W, 2M+A (not including B): C(5,2)C(5,2)
2W, 2M+B (not including B): C(5,2)C(5,2)
2W, 3M (not including A and B): C(5,2)C(5,3)
Number of ways = C(5,2)C(5,2) + C(5,2)C(5,2) + C(5,2)C(5,3)

2nd approach, calculate the complement


2W, 3M = C(5,2)C(7,3)
2W, M+A+B=C(5,2)C(5,1)

02 Probability 5
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

Number of ways = C(5,2)C(7,3) - C(5,2)C(5,1)

Question 6: If N people, including A and B, are randomly arranged in a line,


1. What is the probability that A and B are next to each other?
Answer: N= ( N −1 ) ! ×2 !

2. What would the probability be if the people were randomly arranged in a circle?
Answer: N= ( N −1 ) !

Question 7: Five people, designated as A, B, C, D, E, are arranged in linear order. Assuming that
each possible order is equally likely, what is the probability that
1. There is exactly one person between A and B?
Answer: N=3× 3 !×2 !

2. There are exactly two people between A and B?


Answer: N=2× 3! × 2!

3. There are three people between A and B?


Answer: N=1 ×3 ! × 2!

Question 8: In poker games, dealer gives the player 5 cards. What is the probability that the
player has
1. A pair 2. Two pairs 3. Three of a kind 4. Full house

V={1..10,J,Q,K}
A={Diamond, Heart, Club, Spade}

A pair:
Select one from V: C(13,1)
For the value above select 2 from A: C(4,2)
For the rest of 3 cards, select three from V: C(12,3)
For each card choose 1 from A :C(4,1)
So in total: N=C ( 13,1 ) ×C ( 4,2 ) ×C ( 12,3 ) ×C ( 4,1 )3

Two pairs
Select two from V: C(13,2)
for each values above select 2 from A: C(4,2)
For the rest, select one value from V: C(11,1)
Then choose one from A: C(4,1)
So in total: N=C ( 13 ,2 ) ×C ( 4,2 )2 × C ( 11 , 1 ) × C(4,1)

Three of a kind
Select two from V: C(13,1)
For the value above select 3 from A: C(4,3)
For the rest choose 2 from V: C(12,2)
02 Probability 6
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

For each choose 1 from A: C(4,1)


So in total: N=C ( 13 ,1 ) ×C ( 4,3 ) ×C ( 1 2, 2 ) ×C ( 4,1 )2

Full house
Choose 1 from V: C(13,1)
For the above choose 3 from A: C(4,3)
Choose 1 from V: C(12,1)
For the above choose 2 from A: C(4,2)
So in total: N=C ( 13,1 ) ×C ( 4,3 ) ×C (12 , 1 ) × C( 4,2)

Question 9: Five separate awards (best scholarship, best leadership qualities, and so on) are to be
presented to selected students from a class of 30. How many different outcomes are possible if
1. A student can receive any number of awards?
Answer: N=305

2. Each student can receive at most 1 award?


Answer: N=30× 29× 28 ×27 ×26

Question 10: In how many ways can 8 people be seated in a row if


1. There are no restrictions on the seating arrangement?
Answer: N=8!

2. Persons A and B must sit next to each other?


Answer: N=7 ! × 2!

3. There are 4 men and 4 women and no 2 men or 2 women can sit next to each other?
Answer: N=2× 4 !× 4 !

4. There are 5 men and they must sit next to each other?
Answer: N=4 !× 5!

5. There are 4 married couples and each couple must sit together?
Answer: N=4 !× ( 2! )2

Question 11: Five separate awards (best scholarship, best leadership qualities, and so on) are to
be presented to selected students from a class of 30. How many different outcomes are possible
if
1. A student can receive any number of awards?
2. Each student can receive at most 1 award?
Question 12: In American lottery, people will select 5 numbers varying from 01 to 50. These 5
numbers are not allowed coincide and we don’t care about the order of these 5 numbers. If all
02 Probability 7
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

the selected numbers appeared in the 1st 5 drawings, they will get the special prize. After the 1st 5
drawing for the special prize, 2 more numbers are drawn to determine the 2nd prize. If people
select correctly 5 numbers among these 7 numbers, they get the 2nd prize.
1. Find the probability that person who buys one 1 ticket will win the 1st prize.
C (5,5)
Answer: N=
C (50,5)

2. Find the probability that person who buys one 1 ticket will win the 2nd prize.
C ( 7 , 5 ) −1
Answer: N=
C (50,5)

Question 13: A student is to answer 7 out of 10 questions in an examination. How many choices
has she? How many if she must answer at least 3 of the first 5 questions?

(number of answer in first 5 questions, number of answer in rest of 5 questions)


1st approach, by enumerating the statisfying cases
(3,4):C(5,3)C(5,4)
(4,3):C(5,4)C(5,3)
(5,2):C(5,5)C(5,2)
Number of way = C(5,3)C(5,4) + C(5,4)C(5,3) + C(5,5)C(5,2)

2nd approach, calculate the complement


Number of 7 out of 10 = C(10,7)
Not satisfy (2,5)=C(5,2)C(5,5)
Number of way = C(10,7)- C(5,2)C(5,5)

02 Probability 8
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

5. Bayesian’s Theorem
Bayesian’s theorem relates to find the probability of an event, given that some information. This
probability is expressed as

The main function of the given information is to narrow the sample space of the event that we
want to find the probability.

Example
Factory 1 produced 100 items. Of them, 50 items are defective, 50 are non defective. Factory 2
produced 200 items. Of them, 60 are defective, the rest are non defective. Put all items produced
by 1 and 2 together, pick 1 item
a) Find the probability that item is manufactured by 1 and defective.
b) Given that that item is manufactured by 1, find the probability that it is defective.
c) Find the probability that item is defective.
d) Given that this item is defective, find the probability that it is manufactured by Factory1.
Let the area of S1D, and S1N represents the number of defective and non defective items
produced by Factory 1, respectively.
Let the area of S2D, and S2N represents the number of defective and non defective items
produced by Factory 2, respectively.

, S1D S2D

S2N
a) Find the probability that pick 1 item, it is produced by Factory 1 and defective.
The event satisfies two requirement of the problem is the area S1D. Since no information
isS1N
given, the sample space includes 4 areas: S1D, S1N, S2D, S2N.
The probability = (Event)/(Sample Space)

b) Pick 1 item, given that this item is manufactured by Factory 1, find the probability that it
is defective.
Since the picked item is manufactured by Factory 1 (given information), it must belong to
either S1D or S1N. The given information has narrowed the sample space from 4 areas:
S1D, S1N, S2D, S2N to only 2 areas: S1D & S1N. So the probability that the picked item
is defective is

02 Probability 9
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

However, we need to check whether the Bayesian formula is true. According to the
Bayesian theorem

The Bayesian give the same result with intuition.

c) Find the probability it is defective.

Applying Bayesian theorem

d) Given that the picked item is defective, find the probability that it is manufactured by
Factory 1.
Based on intuition, given that the picked item is defective, it must belong to the either
S1D or S2D. The information has narrowed the sample space to S1D and S2D. So the
probability is

Using the Bayesian formula

Example 1
A factory runs three shifts. In a given day 1% of the items produced by the 1st shift are defective,
2% of the second shift’s items are defective and 5% of the third shift’s items are defective. If the
shift all have the same productivity, what percentage of the items produced in a day are
defective. If an item is defective, what is the probability that it was produced by the 3rd shift?
Example 2
Fifty-two percent of the students at a certain college are females. Five percent of the students in
this college are majoring in computer science. Two percent of the students are women majoring
in computer science. If a student is selected at random, find the conditional probability that
(a) this student is female, given that the student is majoring in computer science;
(b) this student is majoring in computer science, given that the student is female.
Graph method
Graph method is another way to solve the Bayesian Theorem. In graph method, the cause &
effect relationships among the events are drawn first, then based on the paths, the necessary
probability can be computed.
For the example in the explanation part, the graph can be drawn as follows:

02 Probability 10
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

a) The probability that item is manufactured by F1 and defective


We trace along the path that satisfy both attributes, produced by F1 and defective

b) Given that that item is manufactured by F1, find the probability that it is defective.
Since it is manufactured by F1, we must follow only path going through node F1.

c) Find the probability it is defective.


Since we want to find the probability the item is defective, it must be a sum of paths
going through node D.

d) Given that this item is defective, find the probability that it is manufactured by Factory1.
Since given that the item is defective, it must go through D. The probability is

Example 2
You ask your neighbor to water a sickly plant while you are on vacation. Without water it will
die with probability .8; with water it will die with probability .15. You are 90 percent certain that
your neighbor will remember to water the plant.
(a) What is the probability that the plant will be alive when you return?
(b) If it is dead, what is the probability your neighbor forgot to water it?
02 Probability 11
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

(a) What is the probability that the plant will be alive when you return?

(b) If it is dead, what is the probability your neighbor forgot to water it?

In graph method, sometimes the complete graph as examples above cannot be drawn or the
problem is a multi stage problem.
Example 3
Assumed that rain occurs only in the morning. The probability of rain in the morning is 0.7. If it
rains, the main will take the umbrella to the company. When he backs in the afternoon, the
probability that he forgets to bring the umbrella back is 0.4. If you see the man without the
umbrella in the afternoon, what is the probability there is no rain in the morning.

Example 4
A league has 4 rounds. To go to the further round, the team must win all former rounds. The
probabilities that team A win round 1,2,3 and 4 are 0.9, 0.8, 0.7, and 0.6 respectively.
a) Find the probability that team A will be the champion

02 Probability 12
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

b) Given that team A lost, find the probability that team A lost at round 2.

a) Find the probability that team A will be the champion

b) Given that team A lost, find the probability that team A lost at round 2

02 Probability 13
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

Assignments
Question 1: A laboratory blood test is 99 percent effective in detecting a certain disease when it
is, in fact, present. However, the test also yields a “false positive” result for 1 percent of the
healthy persons tested. (That is, if a healthy person is tested, then, with probability .01, the test
result will imply he or she has the disease.) If .5 percent of the population actually has the
disease, what is the probability a person has the disease given that his test result is positive?
Question 2: There are two local factories that produce radios. Each radio produced at factory A
is defective with probability .05, whereas each one produced at factory B is defective with
probability .01. Suppose you purchase two radios that were produced at the same factory, which
is equally likely to have been either factory A or factory B. If the first radio that you check is
defective, what is the conditional probability that the other one is also defective?
Answer: The Bayesian network for this is given by

There are two ways to understand the problem


 The first item is always checked it is realized as defective
 An item is picked randomly and checked then it is realized as defective

For the 1st case: we need to find P(the 2nd item is defective |1st item is defective)
For the 2nd case: we need to find P(2 defectives | at least one defective)

For the 1st case:


P(the 2nd item is defective &1st item is defective)= 0.5*0.012+0.5*0.052
P(1st item is defective)= 0.5*0.05+0.5*0.01

02 Probability 14
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

For the 2nd case


P (2 defectives & at least one defective) =P(2 defectives)=0.5*0.012+0.5*0.052
P(at least one defective)= P(2 defectives)+ P(1 defective)
= 0.5*0.012+0.5*0.052 + 0.5*0.05*0.95+ 0.5*0.95*0.05 +0.5*0.01*0.99+ 0.5*0.99*0.01

Question 3: Prostate cancer is the most common type of cancer found in males. As an indicator
of whether a male has prostate cancer, doctors often perform a test that measures the level of the
PSA protein (prostate specific antigen) that is produced only by the prostate gland. Although
higher PSA levels are indicative of cancer, the test is notoriously unreliable. Indeed, the
probability that a noncancerous man will have an elevated PSA level is approximately .135, with
this probability increasing to approximately .268 if the man does have cancer. If, based on other
factors, a physician is 70 percent certain that a male has prostate cancer, what is the conditional
probability that he has the cancer given that
(a) the test indicates an elevated PSA level;
(b) the test does not indicate an elevated PSA level?
Repeat the preceding, this time assuming that the physician initially believes there is a 30 percent
chance the man has prostate cancer.

Question 4: Suppose that we have 3 cards that are identical in form, except that both sides of the
first card are colored red, both sides of the second card are colored black, and one side of the
third card is colored red and the other side black. The 3 cards are mixed up in a hat, and 1 card is
randomly selected and put down on the ground. If the upper side of the chosen card is colored
red, what is the probability that the other side is colored black?

02 Probability 15
INTERNATIONAL UNIVERSITY (IU) Engineering Probability & Statistic
ISE Department Lecturer: Phan Nguyễn Kỳ Phúc
--------------------o0o------------------

02 Probability 16

You might also like