Probability (STA102)
Probability (STA102)
Probability (STA102)
Contents 2
Probability
Basic Probability Concepts
Mathematical Properties of Probability
Rules of Probability
Bayes’ Theorem
Finding Probability Using Contingency Table
Probability 3
Random experiment:
Measuring weight of a person at different times.
Tossing a coin.
Some related terms 6
Sample Space:
The set of all possible outcomes of a random experiment is called
sample space of that experiment and is denoted by S. Each
individual outcome is called a sample point.
For example;
throwing a dice- S= {1, 2, 3, 4, 5, 6 }
Lifetime of a lightbulb- S= {x|0≤x<∞} = [0,∞)
Some related terms 7
Event:
Any subset E of a sample space S is an event.
For example;
Dice throw experiment- S= {1, 2, 3, 4, 5, 6 }
Say number 2 turned up in a throw. Then we will say, event E= {2}
has occurred.
Some related terms 8
For example;
in a trial of coin toss experiment, event E1= {Head} and event
E2={tail} will not occur simultaneously. So, E1 and E2 are mutually
exclusive events.
On a day, Event E1={Rain} & event E2={Sunny} may occur
simultaneously. These are not mutually exclusive events.
Some related terms 9
For example;
In a coin tossing experiment events E1= {Head} and event E2={tail}
are collectively exhaustive, because together they comprise the all
the outcomes that are possible in a coin tossing experiment. There
are no other possible outcomes of this experiment than these two.
Some related terms 10
For example;
In a coin tossing experiment, the events E1= {Head} and event
E2={tail} are equally likely, because the chance of occurring E1 is as
same as occurring E2.
On a day, Event E1={Rain} & event E2={No rain} may not be equally
likely.
Some related terms 11
Disjoint events
Disjoint events:
Two events are called disjoint, if they E1
E2
have no common elements between
them.
Joint events
Approaches of assigning probability 12
Classical approach:
(when the outcomes are equally likely, mutually exclusive and
collectively exhaustive)
If the sample space of a random experiment has a finite number
(ns) of outcomes
nE of these outcomes are favorable to an event E
Classical approach:
For example;
Dice throwing experiment-
S= {1, 2, 3, 4, 5, 6}
Consider two events, E1= {2} and E2= {2, 4, 6}
Here, nE1= 1 and nE2= 3. Also, nS= 6
𝑛𝐸1 1
Therefore, probability of occurring event E1 is, 𝑃 𝐸1 = =
𝑛𝑆 6
𝑛𝐸2 3 1
probability of occurring event E2 is, 𝑃 𝐸2 = = =
𝑛𝑆 6 2
Approaches of assigning probability 15
Frequency approach:
If an experiment is repeated n times under the same conditions and
event E occurs f times out of n times, then
𝑓
𝑃 𝐸 = lim
𝑛→∝ 𝑛
That is, when n is very large, P(E) is very close to the relative
frequency of event E.
Approaches of assigning probability 16
Frequency approach:
For example;
In a dice throwing experiment- S= {1, 2, 3, 4, 5, 6}
And our favorable event is E= {2}
Subjective approach:
Based on the judgement (personal experience, prior information
and belief etc.), one can assign probability to an event E of a
random experiment.
𝑃 𝐸𝑖 = 𝑃 𝐸𝑖
𝑖=1 𝑖=1
Example 1 19
Solution:
Let, D= the randomly selected person has the disease
𝑓 20
ℎ𝑒𝑟𝑒, 𝑃 𝐷 = = = .05
𝑛 400
∴ 𝑃 𝐷𝑐 = 1 − .05 = 0.95
So, the probability that he/ she does not have the disease is 0.95
Probability Laws: 21
Addition Law
• For disjoint events A and B-
The probability that, either event A or event B will occur is,
𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵
• For disjoint events A, B, C, … , and Z-
The probability that, either event A or event B or event C or … or
event Z will occur is,
𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 ∪ ⋯∪ 𝑍 = 𝑃 𝐴 + 𝑃 𝐵 + 𝑃 𝐶 + …+ 𝑃 𝑍
Probability Laws: 22
Addition Law
• For joint events A and B-
The probability that, either event A or event B or both will occur is,
𝑃 𝐴∪𝐵 =𝑃 𝐴 +𝑃 𝐵 −𝑃 𝐴∩𝐵
• For joint events A, B, and C
The probability that, either event A or event B or event C or any two
of them or all will occur is,
𝑃 𝐴∪𝐵∪𝐶
=𝑃 𝐴 +𝑃 𝐵 +𝑃 𝐶 −𝑃 𝐴∩𝐵 −𝑃 𝐵∩𝐶 −𝑃 𝐴∩𝐶
+𝑃 𝐴∩𝐵∩𝐶
Probability Laws: 23
Addition Law
Example 2:
In a company, 60% of the employees have motorcycle, 40% has
private car and 20% has both.
If an employee is selected randomly from that company, then
a. What is the probability that the employee has either motorcycle
or private car?
b. What is the probability that the employee has neither
motorcycle nor private car?
Probability Laws: 24
Addition Law
Solution:
Let,
M= the randomly selected employee has motorcycle C M
C= the randomly selected employee has car
60 40
Here, 𝑃 𝑀 = = 0.6, 𝑃 𝐶 = = 0.4
100 100
20
𝑃 𝑀∩𝐶 = = 0.2
100
Probability Laws: 25
Addition Law
Solution(contd.):
C M
a. probability that the person has either
motorcycle or private car is-
𝑃 𝑀∪𝐶 =𝑃 𝑀 +𝑃 𝐶 −𝑃 𝑀∩𝐶
= 0.6 + 0.4 − 0.2 = 0.8
Probability Laws: 26
Addition Law
Solution(contd.):
C M
a. probability that the person has either
motorcycle or private car is-
𝑃 𝑀∪𝐶 =𝑃 𝑀 +𝑃 𝐶 −𝑃 𝑀∩𝐶
= 0.6 + 0.4 − 0.2 = 0.8
b. probability that the person has neither
motorcycle nor private car is- C M
Conditional Probability:
The conditional probability of an event E, given that another event F
has already happened is,
𝑃 𝐸∩𝐹
𝑃 𝐸|𝐹 = 𝑓𝑜𝑟 𝑃 𝐹 > 0
𝑃 𝐹
Probability Laws: 28
Conditional Probability:
Illustration: A dice throwing experiment.
S= {1, 2, 3, 4, 5, 6}
P(x) Probability
P(1)
P(2)
P(3)
P(4)
P(5)
P(6)
Total
Probability Laws: 29
Conditional Probability:
Illustration: A dice throwing experiment.
S= {1, 2, 3, 4, 5, 6}
P(x) Probability
P(1) 1/6
P(2) 1/6
P(3) 1/6
P(4) 1/6
P(5) 1/6
P(6) 1/6
Total 1
Probability Laws: 30
Conditional Probability:
Illustration(contd.):
Now assume that, someone said that, in that throw an odd number
appeared on the dice.
Conditional Probability:
Illustration(contd.):
P(x|F) Probability
Now, S*= {1, 3, 5} P(1|F)
P(2|F)
P(3|F)
Since, these outcomes were
P(4|F)
equally likely in the original
P(5|F)
sample space, they are equally
P(6|F)
likely in revised sample space
Total
Probability Laws: 32
Conditional Probability:
Illustration(contd.):
P(x|F) Probability
Now, S*= {1, 3, 5} P(1|F) 1/3
P(2|F) 0
P(3|F) 1/3
Since, these outcomes were
P(4|F) 0
equally likely in the original
P(5|F) 1/3
sample space, they are equally
P(6|F) 0
likely in revised sample space
Total 1
Probability Laws: 33
Conditional Probability:
Illustration(contd.):
Now, S*= {1, 3, 5}
F
E
𝑃 𝐸∩𝐹
𝑃 𝐸|𝐹 =
𝑃 𝐹
Probability Laws: 34
Conditional Probability:
Illustration(contd.):
Now, S*= {1, 3, 5} F
E
1
𝑃 𝐸∩𝐹 6 1
𝑃 𝐸|𝐹 = = =
𝑃 𝐹 3 3
6
Probability Laws: 35
Conditional Probability:
Illustration(contd.):
Now, S*= {1, 3, 5}
F
E
Let, E= {2} and F= {1, 3, 5}
𝑃 𝐸∩𝐹 0
𝑃 𝐸|𝐹 = = =0
𝑃 𝐹 3
6
Probability Laws: 36
Example 3:
In a company, 60% of the employees have motorcycle, 40% has
private car and 20% has both.
If an employee is selected randomly from that company, then
a. What is the probability that the employee has a car?
b. If it is known that the employee has a motorcycle, then what is
the probability that the employee also has a car?
Probability Laws: 37
Solution:
Let,
M= the randomly selected employee has C M
motorcycle
C= the randomly selected employee has car
60 40
Here, 𝑃 𝑀 = = 0.6, 𝑃 𝐶 = = 0.4
100 100
20
𝑃 𝑀∩𝐶 = = 0.2
100
Probability Laws: 38
Solution(contd.):
a. probability that the employee has a car is- C M
𝑃 𝐶 = 0.4
Probability Laws: 39
Solution(contd.):
a. probability that the employee has a car is- C M
𝑃 𝐶 = 0.4
Solution:
Let,
R= it will rain on that particular day
T= it will thunderstorm on that particular day
Probability Laws: 42
Multiplication Law
Solution(contd.):
70 80
Here, given that, 𝑃 𝑅 = = 0.7 and 𝑃 𝑇|𝑅 = = 0.8
100 100
𝑃 𝑅 ∩ 𝑇 = 𝑃 𝑇|𝑅 𝑃 𝑅
T|R R
= 0.8 ∗ 0.7 = 0.56
Probability Laws: 43
Multiplication Law
Example 5:
Mr. Fahad and Mr. Khan has to tour abroad for their business frequently.
Mr. Fahad tours 65% of the times in a year at abroad and Mr. Khan tours
50% of the times in a year at abroad. What is the probability that, on
January 01, 2016, both Mr. Fahad and Mr. Khan will be at abroad?
Solution:
Let,
F= Mr. Fahad will be at abroad
K= Mr. Khan will be at abroad
Probability Laws: 44
Multiplication Law
Solution(contd.):
65 50
Here, given that, 𝑃 𝐹 = = 0.65 and 𝑃 𝐾 = = 0.5
100 100
K F
𝑃 𝐾∩𝐹 =𝑃 𝐾 𝑃 𝐹
= 0.5 ∗ 0.65 = 0.325 (K∩F)
Probability using contingency table 45
Example 7:
Below given a contingency table for Smoking status and Cancer status.
Smoking Status/ cancer Status Cancer Healthy Total
Smoker 7860 1530 9390
Non-smoker 5390 11580 16970
Total 13250 13110 26360
1. What is the probability that a randomly selected person is a smoker
2. What is the probability that a randomly selected person has cancer?
3. What is the probability that a randomly selected person is both
smoker and has cancer?
4. If a person is smoker, what is the probability that he also has cancer?
Probability using contingency table 46
Solution:
Let,
S= The person is smoker, N= The person is non-smoker
C= The person has cancer, H= The person is healthy
Solution (contd.):
2. The probability that a randomly selected person has cancer
13250
𝑃 𝐶 = = 0.503
26360
Solution (contd.):
4. If a person is smoker, what is the probability that he also has cancer
7860
7860 𝑃(𝑆 ∩ 𝐶) 26360
𝑃 𝐶𝑆 = = 0.837 = =
9390 𝑃(𝑆) 9390
26360