Ch2 Probability (Class Slides)
Ch2 Probability (Class Slides)
Basic Probability
𝑛 𝐴
𝑃 𝐴 = ∈ 0,1
𝑛 𝑆
Impossible event Sure event
Example 1
A box of manufactured products contains 5 electrical
objects, of which 3 are good and 2 are defective. If an
object is selected randomly, what is the probability that
it is
i. Defective
𝑛 𝐷 2 G D T
𝑃 𝐷 = =
𝑛 𝑆 5
3 2 5
ii. Good
𝑛 𝐺 3
𝑃 𝐺 = =
𝑛 𝑆 5
iii. Not defective
2 3
ഥ
𝑃 𝐷 =1−𝑃 𝐷 =1− = Which is actually
5 5 probability of good
Compliment
Theorem
3 2
Similarly, 𝑃 𝐺ҧ = 1 − 𝑃 𝐺 = 1 − =
5 5
Important to note
• For one selection, counting the possibilities (total
or favorable) is not a problem.
• For two or more selections, counting is not always
an easy task i.e. listing them all and then counting.
• So we need some smart counting techniques.
These include
• Multiplication technique (with replacement)
• Permutation (without replacement, with order)
• Combination (without replacement, without order)
• DEFAULT CASE is always combination.
Counting techniques
• Selecting one item/individual is straight forward
and its counting is simple.
• When we select two (or more) items/individuals,
counting is a bit tricky. We have to consider
With Multiplication
replacement technique
nr
Selection n!
(𝑟 out of 𝑛) With order Permutation
n
Pr
(n r )!
Without
replacement
n!
Without Combination
n
Cr
r !(n r )!
order
Example 1 (con’t)
A box of manufactured products contains 5 electrical objects, of which 3
are good and 2 are defective. If two objects are selected randomly,
a) What is the sample space?
With replacement Without replacement Without replacement
With order With order Without order
𝐺1 𝐺1 𝐺1 𝐺2 𝐺1 𝐺3 𝐺1 𝐷1 𝐺1 𝐷2 𝐺1 𝐺2 𝐺1 𝐺3 𝐺1 𝐷1 𝐺1 𝐷2 𝐺1 𝐺2 𝐺1 𝐺3 𝐺1 𝐷1 𝐺1 𝐷2
𝐺2 𝐺1 𝐺2 𝐺2 𝐺2 𝐺3 𝐺2 𝐷1 𝐺2 𝐷2 𝐺2 𝐺1 𝐺2 𝐺3 𝐺2 𝐷1 𝐺2 𝐷2 𝐺2 𝐺3 𝐺2 𝐷1 𝐺2 𝐷2
𝐺3 𝐺1 𝐺3 𝐺2 𝐺3 𝐺3 𝐺3 𝐷1 𝐺3 𝐷2 𝐺3 𝐺1 𝐺3 𝐺2 𝐺3 𝐷1 𝐺3 𝐷2 𝐺3 𝐷1 𝐺3 𝐷2
𝐷1 𝐺1 𝐷1 𝐺2 𝐷1 𝐺3 𝐷1 𝐷1 𝐷1 𝐷2 𝐷1 𝐺1 𝐷1 𝐺2 𝐷1 𝐺3 𝐷1 𝐷2 𝐷1 𝐷2
𝐷2 𝐺1 𝐷2 𝐺2 𝐷2 𝐺3 𝐷2 𝐷1 𝐷2 𝐷2 𝐷2 𝐺1 𝐷2 𝐺2 𝐷2 𝐺3 𝐷2 𝐷1
Permutation Combination
Multiplication
5! 5!
5 25
2 5
P2 20 C2
5
10
(5 2)! 2!(5 2)!
Example 1 (con’t)
b) If two objects are selected randomly, what is the
probability that both are good?
Sol: Let A be the event that both the objects are
good. G D T
3 2 5
With replacement 2 0 2
𝑛 𝐴 (32 )(20 ) 9 Multiplication 32 20 52 G D T
𝑃 𝐴 = = =
𝑛 𝑆 52 25 technique 9 25 3 2 5
Favorable Total 2 0 2
6 20
n( A) ( 3 P2 )( 2 P0 ) 6 Favorable Total
P( A) 5
Permutation
n( S ) P2 20 G D T
3 2 5
Without replacement, without order 2 0 2
3C 2C 5C
2 0 2
3 2
n( A) ( C2 )( C0 ) 3
P( A) 5
Combination 3 10
n( S ) C2 10 Favorable Total
Example 1 (con’t)
c) If two objects are selected randomly, what is the
probability that first is good and second is
defective?
Sol: Let B be the event that first is good and second
is defective. G D T
With replacement 3 2 5
1 1 2
𝑛 𝐵 (31 )(21 ) 6 Multiplication
𝑃 𝐵 = = = technique 31 21 52
𝑛 𝑆 52 25
6 25
Favorable Total
G D T
Without replacement, with order 3 2 5
1 1 2
n( B) ( 3 P1 )( 2 P1 ) 6 3P 2P 5P
P( B)
1 1 2
5
Permutation
n( S ) P2 20 6 20
Favorable Total
Example 1 (con’t)
d) If two objects are selected randomly, what is the
probability that one is good and the other is defective?
Sol: Let B be the event that one is good and the other is
defective.
G D T
3 2 5
Without replacement, without order 1 1 2
3C 2C 5C
1 1 2
3 2
n( B) ( C1 )( C1 ) 6
P( B) 5
Combination 6 10
n( S ) C2 10 Favorable Total
Example 1 (con’t)
e) What is the probability of having no good object?
Sol: Let C be the event that no good object is selected (i.e. both defective).
Assuming the default case (i.e. without replacement, without order)
n(C ) ( 3C0 )( 2C2 ) 2
P(C ) 5
n( S ) C2 10
( 3C0 )( 2C2 ) 1 9
P( D 1) 1 P( D 0) 1 5
1
C2 10 10
Dealing with two (or more) events
• Until this point, we have been dealing with just one
event (by selecting one or more than one
items/individuals).
• The interest lies either in event A or its compliment.
• Let us show these events in a Venn diagram.
A
𝐴ҧ
S S
Dealing with two (or more) events (con’t)
• When we have two events (i.e. A and B), the
interest may lie in
• Joint occurrence of events A and B i.e. (𝐴 ∩ 𝐵).
• Occurrence of at least one of the two events A and B i.e.
(𝐴 ∪ 𝐵).
(𝐴 ∩ 𝐵)
𝐴 ∩ 𝐵ത = 𝐴 − (𝐴 ∩ 𝐵)
𝐴ҧ ∩ 𝐵 = 𝐵 − (𝐴 ∩ 𝐵)
𝑃 𝐴∪𝐵 = 𝑃 𝐴ҧ ∩ 𝐵 + 𝑃 𝐴 ∩ 𝐵 + 𝑃 𝐴 ∩ 𝐵ത
=𝑃 𝐴 −𝑃 𝐴∩𝐵 +𝑃 𝐴∩𝐵 +𝑃 𝐵 −𝑃 𝐴∩𝐵
Addition theorem =𝑃 𝐴 +𝑃 𝐵 −𝑃 𝐴∩𝐵
for two events
Dealing with two (or more) events (con’t)
• Mutually exclusive events:
• Two events are said to be A B
mutually exclusive if they cannot
occur together i.e. 𝐴 ∩ 𝐵 = 𝜙
or 𝑃 𝐴 ∩ 𝐵 = 0
• Collectively exhaustive events:
A B
• Two or more events are said to
be exhaustive events if they
constitute the whole sample
space.
• De Morgan’s Law
• 𝐴ҧ ∩ 𝐵ത = (𝐴 ∪ 𝐵)
• 𝐴ҧ ∪ 𝐵ത = (𝐴 ∩ 𝐵)
Example 2
A batch of students at KFUPM has total 500 students
of which 150 are from Dammam, 100 are from Riyad
and 250 are from other of cities. Out of these 500
students, 50 are Business students and the rest of
450 are Engineering students. Further, 15 business
students are from Dammam and 15 are from Riyad. If
a student is selected randomly,
a) What is the probability that he is a business
student? Business Engineering Total
(A) (𝐴)ҧ
Dammam 15 135 150
(B1)
Sol: Let us write all the Riyad 15 85 100
(B2)
information in the Other 20 230 250
(B3)
form of a table.
Total 50 450 500
Example 2 (con’t) Business
(A)
Engineering
(𝐴)ҧ
Total
20 230 250
(B )
business department 3
𝑃(𝐴 ∩ 𝐵)
𝑃 𝐵 . 𝑃(𝐴 | 𝐵)
Theorem of total
𝑃 𝐴 = σ𝑘𝑖=1 𝑃 𝐵𝑖 . 𝑃(𝐴 | 𝐵𝑖 )
probability
and
𝑃 𝐵𝑖 .𝑃(𝐴 | 𝐵𝑖 )
𝑃(𝐵𝑖 | 𝐴) = Bayes’ theorem
σ𝑘
𝑖=1 𝑃 𝐵𝑖 .𝑃(𝐴 | 𝐵𝑖 )
Problem
Solving
Q1: In a factory, there are two machines installed for the production i.e. machine A
and machine B. A lot of production is inspected and it is found that 2/3 of the
products are made by machine A. It is also found that 3/5 of the products are
scratch less. Moreover, 5/8 of the products have scratch(es) or they are made by
machine B. What is the probability that a product selected at random from this lot
is made by machine B and it has scratch?
Q2: An aircraft emergency locator transmitter (ELT) is a device designed to transmit a
signal in the case of a crash. The Altigauge Manufacturing Company makes 80% of the
ELTs, the Bryant Company makes 15% of them, and the Chartair Company makes the
other 5%. The ELTs made by Altigauge have a 4% rate of defects, the Bryant ELTs have
a 6% rate of defects, and the Chartair ELTs have a 9% rate of defects.
(a) If an ELT is randomly selected from the general population of all ELTs, find the
probability that it is defective.
Q2: An aircraft emergency locator transmitter (ELT) is a device designed to transmit a
signal in the case of a crash. The Altigauge Manufacturing Company makes 80% of the
ELTs, the Bryant Company makes 15% of them, and the Chartair Company makes the
other 5%. The ELTs made by Altigauge have a 4% rate of defects, the Bryant ELTs have
a 6% rate of defects, and the Chartair ELTs have a 9% rate of defects.
(a) If an ELT is randomly selected from the general population of all ELTs, find the
probability that it is defective.
P(D) = 0.0455
(b) If a randomly selected ELT is found to be defective, find the probability that it was
made by the Altigauge Manufacturing Company.