0% found this document useful (0 votes)
34 views

Ch2 Probability (Class Slides)

The document provides an overview of basic probability concepts including: - Sample space is the set of all possible outcomes of an experiment. An event is any subset of outcomes. - Probability is defined as the ratio of favorable outcomes to total possible outcomes. - Counting techniques such as multiplication, permutation, and combination are used to calculate probabilities when multiple items are selected. - Examples are provided to demonstrate calculating probabilities of events using different counting methods for experiments with and without replacement.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views

Ch2 Probability (Class Slides)

The document provides an overview of basic probability concepts including: - Sample space is the set of all possible outcomes of an experiment. An event is any subset of outcomes. - Probability is defined as the ratio of favorable outcomes to total possible outcomes. - Counting techniques such as multiplication, permutation, and combination are used to calculate probabilities when multiple items are selected. - Examples are provided to demonstrate calculating probabilities of events using different counting methods for experiments with and without replacement.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

Chapter 2

Basic Probability

Dr. Nasir Abbas


Topics to be covered
• Sample space and events
• Definition of probability
• Counting techniques
• Addition theorem
• Conditional probability
• Multiplication rule
• Independence of events
• Bayes’ theorem
Some definitions
• Statistics:
• is a science of decision of making (under
uncertainty) based on numbers.
• Probability:
• By definition, it measures the
certainty/uncertainty regarding some
happening.
• Mathematically, it the ratio of favorable
possibilities to total possibilities.
Some definitions (con’t)
• Random experiment:
• It is a procedure that produces outcomes (generally in
the form of numbers). An experiment is said to be
random (unpredictable) if it has more than one possible
outcome.
• Sample Space:
• A set of all the possible outcomes of a random
experiment. It is generally denoted by S.
• Event:
• Any desirable subset/part of sample space. They are
generally denoted by A, B, C, etc.
Formula to find probability
𝑆 = 𝑠1 , 𝑠2 , 𝑠3 , … … … → 𝑛 𝑆
𝐴 = 𝑎1 , 𝑎2 , 𝑎3 , … … … → 𝑛 𝐴

Probability of an event A denoted by 𝑃 𝐴 is:

𝑛 𝐴
𝑃 𝐴 = ∈ 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

Without replacement, with order 3P


2
2P
0
5P
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

f) What is the probability of having at least one good object?


Sol: Let D denotes the number of good objects selected. We are interested
in finding

( 3C1 )( 2C1 ) ( 3C2 )( 2C0 ) 6 3 9


P( D  1)  P( D  1)  P( D  2)  5
 5
  
C2 C2 10 10 10
Alternatively, we can find this probability using the compliment theorem

( 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

Let A be the event that Dammam 15 135 150


(B1)
the student is from Riyad 15 85 100
(B2)
Business department.
Other 20 230 250
50 (B3)
𝑃 𝐴 =
500 Total 50 450 500

b) What is the probability that the student is not from


business department?
50 450
ҧ
𝑃 𝐴 =1−𝑃 𝐴 =1− =
500 500
c) What is the probability that the selected student
belongs to Riyad?
Let 𝐵2 be the event that the selected student belongs to
Riyad
100
𝑃 𝐵2 =
500
Example 2 (con’t) Business
(A)
Engineering
(𝐴)ҧ
Total

d) What is the probability Dammam 15 135 150


(B1)
that the selected student Riyad 15 85 100
(B2)
does not belong to Riyad?
Other 20 230 250
400
𝑃 𝐵ത2 = 1 − 𝑃 𝐵2 = (B3)
500 Total 50 450 500

e) What is the probability that the student is from


business department and he belongs to Riyad?
15
𝑃 𝐴 ∩ 𝐵2 =
500
e) What is the probability that the student is either from
business department or he belongs to Riyad?
𝑃 𝐴 ∪ 𝐵2 = 𝑃 𝐴 + 𝑃 𝐵2 − 𝑃 𝐴 ∩ 𝐵2
50 100 15
= + −
500 500 500
135
=
500
Example 2 (con’t) Business
(A)
Engineering
(𝐴)ҧ
Total

Dammam 15 135 150


(B1)
f) What is the probability Riyad 15 85 100
(B )
that the student is from Other
2

20 230 250
(B )
business department 3

Total 50 450 500


but not from Riyad?
50 15 35
𝑃 𝐴 ∩ 𝐵ത2 = 𝑃 𝐴 − 𝑃 𝐴 ∩ 𝐵2 = − =
500 500 500
g) Are the two events 𝐴 and 𝐵2 mutually exclusive?
No, because 𝑃 𝐴 ∩ 𝐵2 ≠ 0
h) What is the probability that the student is neither
from business department nor he belongs to Riyad?
𝑃 𝐴ҧ ∩ 𝐵ത2 = 𝑃 𝐴 ∪ 𝐵2 = 1 − 𝑃 𝐴 ∪ 𝐵2
135 365
=1− =
500 500
Conditional Probability
• Sometimes we are interested in finding the
probability of an event (A) conditional to another
event (B).
• Such a probability is called conditional probability.
• It is denoted by 𝑃(𝐴 | 𝐵) and is defined as
𝑃(𝐴∩𝐵)
𝑃(𝐴 | 𝐵) = , 𝑃(𝐵) ≠ 0
𝑃(𝐵)
𝑃(𝐴∩𝐵)
• Similarly, 𝑃(𝐵 | 𝐴) = , 𝑃(𝐴) ≠ 0
𝑃(𝐴)
• It is important to note here that if the two events A
and B are independent of each other, then the
conditional probability becomes equal to the
unconditional probability. i.e.
𝑃(𝐴 | 𝐵) = 𝑃(𝐴) and 𝑃(𝐵 | 𝐴) = 𝑃(𝐵)
Multiplication rule
• If we solve both the formulas of conditional
probability for 𝑃 𝐴 ∩ 𝐵 , we get the multiplication
rule for independent events i.e.
𝑃 𝐴 . 𝑃(𝐵 | 𝐴)

𝑃(𝐴 ∩ 𝐵)
𝑃 𝐵 . 𝑃(𝐴 | 𝐵)

• Multiplication rule for the independent events is


given as:
𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐴 . 𝑃(𝐵)
Example 2 (con’t) Busniess
(A)
Engineering
(𝐴)ҧ
Total

a) Consider example 2. Dammam 15 135 150


(B1)
If a student is selected and Riyad 15 85 100
(B2)
found to be from business Other 20 230 250
(B3)
department, what is the
Total 50 450 500
probability that he belongs
to Riyad?
𝑃 𝐴∩𝐵2 15/500 15 Reduced sample
𝑃(𝐵2 | 𝐴) = = = space
𝑃 𝐴 50/500 50

b) If a student is selected and found to be from


Riyad, what is the probability that he is from
business department?
𝑃 𝐴∩𝐵2 15/500 15
𝑃(𝐴 | 𝐵2 ) = = =
𝑃 𝐵2 100/500 100
Example 2 (con’t) Business
(A)
Engineering
(𝐴)ҧ
Total

c) Are the two events 𝐴 Dammam 15 135 150


(B1)
and 𝐵2 independent? Riyad 15 85 100
(B2)
15
𝑃 𝐴 ∩ 𝐵2 = = 0.03 Other 20 230 250
500 (B3)
50 100 Total 50 450 500
𝑃 𝐴 = and 𝑃 𝐵2 =
500 500
50(100)
𝑃 𝐴 . 𝑃 𝐵2 = = 0.02
500(500)

Because 𝑃 𝐴 ∩ 𝐵2 ≠ 𝑃 𝐴 . 𝑃 𝐵2 so the two events


are not independent.
Example 3
Consider a manufacturing company which has four plants
i.e. one in Dammam, one in Riyad, one in Makkah and one in
Qasim. 20% objects are manufactured in Dammam, 30% in
Riyadh, 10% in Makkah and 40% in the plant located in
Qasim. Further, the rate/probability of defective objects in
Dammam is 0.015, in Riyadh it is 0.01, in Makkah it is 0.006
and in Qasim it is 0.005.
a) If an object City 𝑃(𝐵𝑖 ) 𝑃(𝐴 | 𝐵𝑖 )
is selected B1 (𝐴 ∩ 𝐵1 )
Dammam
randomly, 0.2 0.015
(B1)
what is the Riyadh B2 (𝐴 ∩ 𝐵2 )
0.3 0.01
probability (B2)
that it is Makkah B3 (𝐴 ∩ 𝐵3 )
0.1 0.006
(B3)
defective?
Qasim
0.4 0.005 (𝐴 ∩ 𝐵4 )
(B4) B4
The probability of 𝐴 is broken into 4 parts. To get the total
probability of 𝐴, we have to find and then add these 4 parts.
Example 3 (con’t)
Using the formula of multiplication rule, we have
𝑃 𝐴 ∩ 𝐵1 = 𝑃(𝐵1 )𝑃(𝐴 | 𝐵1 ), 𝑃 𝐴 ∩ 𝐵2 = 𝑃(𝐵2 )𝑃(𝐴 | 𝐵2 )
𝑃 𝐴 ∩ 𝐵3 = 𝑃(𝐵3 )𝑃(𝐴 | 𝐵3 ), 𝑃 𝐴 ∩ 𝐵4 = 𝑃(𝐵4 )𝑃(𝐴 | 𝐵4 )
So we add another column in the table.

So the total probability of is 0.0086. This is

general version is given in the coming slides.


City 𝑃(𝐵𝑖 ) 𝑃(𝐴 | 𝐵𝑖 ) 𝑃 𝐵𝑖 . 𝑃(𝐴 | 𝐵𝑖 )

called theorem of total probability and its


Dammam 𝑃(𝐴 ∩ 𝐵1 )
0.2 0.015 0.2(0.015)=0.003
(B1)
Riyadh 𝑃(𝐴 ∩ 𝐵2 )
0.3 0.01 0.3(0.01)=0.003
(B2)
Makkah
0.1 0.006 0.1(0.006)=0.0006 P(𝐴 ∩ 𝐵3 )
(B3)
Others
0.4 0.005 0.4(0.005)=0.002 𝑃(𝐴 ∩ 𝐵4 )
(B4)
4

Sum 1 ෍ 𝑃 𝐵𝑖 . 𝑃(𝐴 | 𝐵𝑖 ) = 0.0086


𝑖=1
Example 3 (con’t)
b) If an object is selected randomly and found to be
defective, what is the probability that it was
produced by the plant located in Riyadh?
We just found the total probability in part (a) which was
𝑃 𝐴 = σ4𝑖=1 𝑃 𝐵𝑖 . 𝑃(𝐴 | 𝐵𝑖 ) = 0.0086.

The required probability is 𝑃(𝐵2 | 𝐴)

Now, using the answer of part (a), we


can easily find the required probability
as
𝑃(𝐴∩𝐵2 )
𝑃(𝐵2 | 𝐴) = This is called Bayes’ theorem
𝑃 𝐴 and the general version of
𝑃 𝐵2 .𝑃(𝐴 | 𝐵2 )
= σ4𝑖=1 𝑃 𝐵𝑖 .𝑃(𝐴 | 𝐵𝑖 )
this theorem is given on next
slide.
0.03
= ≅ 0.349
0.086
Bayes’ Theorem
If 𝐵1 , 𝐵2 , … … , 𝐵𝑘 are mutually exclusive and
collectively exhaustive events. Let 𝐴 be another
event that occur in some or all of 𝐵𝑖′ 𝑠 for 𝑖 =
1,2, … , 𝑘. Then

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.

You might also like