Edited Proba
Edited Proba
By
Wilhemina Adoma Pels
Probability
1 / 46
Basic Concepts of Probability
Introduction
A cynical person once said, “The only two sure things are death
and taxes.” This philosophy no doubt arose because so much in
people’s lives is affected by chance.
From the time you awake until you go to bed, you make decisions
regarding the possible events that are governed at least in part
by chance.
2 / 46
Basic Concepts of Probability
Introduction
Probability forms the basis of inferential statistics. We can
think of the probability of an outcome as the likelihood of
observing that outcome. If something has a high likelihood of
happening, it has a high probability (close to 1). If something
has a small chance of happening, it has a low probability (close
to 0). If something occurs that has a low probability, we
investigate to find out ”what’s up”.
Probability
Is a measure of the likelihood of a random phenomenon or
chance behavior. Probability describes the long-term proportion
with which a certain outcome will occur in situations with
short-term uncertainty.
3 / 46
Basic Concepts of Probability
4 / 46
Basic Concepts of Probability Cont’d
Illustration
Consider an experiment in which only one of two possible
outcomes can occur. For example, the result of treatment with
an antibiotic is that an infection is either cured or not cured.
Definitions
a. Experiment: An experiment is any process that generates
a set of data or well-defined outcomes. There are two types
of experiments, namely Deterministic and Random (or
Chance) Experiment. In the deterministic experiments the
observed results are not subject to chance while the
outcomes of random experiments cannot be predicted with
certainty. A random experiment could be as simple as
tossing a coin or die and observing an outcome or complex
as choosing 50 people from a population and testing them
for the AIDS disease.
5 / 46
Definitions Cont’d
b. Trial
Each repetition of an experiment is called a trial. That is, a
trial is a single performance of an experiment.
c. Outcome
The possible result of each trial of an experiment is called an
outcome. When an outcome of an experiment has equal chance
of occurring as the others the outcomes are said to be equally
likely. For example, the toss of a coin and a die yield the
possible outcomes in the sets, {H, T} and {1, 2, 3, 4, 5, 6} and
a play of a football match yields {win (W), loss (L), draw (D)}.
Sample Space
Sample space is the collection of all possible outcomes at a
probability experiment. We use the notation S for sample
space. Each element or outcome of the experiment is called
sample point.
6 / 46
Example of Sample Spaces
1 The results of two and three tosses of a coin give the
following sample spaces:
S = {HH, HT, T H, T T }
S = {HHH, HHT, HT H, HT T, T HH, T HT, T T H, T T T }
2 Some sample spaces for various probability experiments are
shown here:
7 / 46
Example of Sample Spaces
Find the sample space for rolling two dice
8 / 46
Definitions Cont’d
Event:
An event is a collection of one or more outcomes from an
experiment. That is, it is a subset of a sample space. It is
denoted by a capital letter. For example we may have:
The event of observing a head (H) in three tosses of a coin,
A = {HTT, TTH}
Consider a newly married couple planning to have three
children. The event of the family having two girls is: D =
{BGG, GBG, GGB}
9 / 46
Definitions Cont’d
Tree Diagram:
The tree diagram represents pictorially the outcomes of random
experiment. The probability of an outcome which is a sequence
of trials, is represented by any path of the tree. For example,
10 / 46
Definitions Cont’d
Consider a couple planning to have three children, assuming each
child born is equally likely to be a boy (B) or girl (G).
11 / 46
Determination of Probability of an Event
12 / 46
Probability of an Event
a. The Classical Definition
This is based on the assumption that the outcomes of an
experiment are equally likely. For example, if an experiment
can lead to n mutually exclusive and equally likely outcomes,
then the probability of the event A is defined by
15 / 46
Probability of an Event
Example 1
Consider the problem of a couple planning to have three
children, assuming each child born is equally likely to be a boy
(B) or a girl (G).
a. List the possible outcomes in this experiment
b. What is the probability of the couple having exactly two
girls?
Solution:
The sample space for this experiment is
S = {BBB, BBG, BGB, BGG, GBG, GGB, GGG}
Let A be the event of the couple having exactly two girls.
Then, A = {BGG, GBG, GGB}
n(A) 3
P (A) = =
n(S) 8
16 / 46
Probability of Compound Events
17 / 46
Probability of Events
Independent Events:
Two or more events are said to be independent if the
probability of occurrence of one is not influenced by the
occurrence or non- occurrence of the other(s). Mathematically,
the two events, A and B are said to be independent, if and only
if P (A ∩ B) = P (A) · P (B). However, if A and B are such that,
P (A ∩ B) = P (A) · P (B|A), they are said to be conditionally
independent.
Conditional Probability:
Let A and B be two events in the sample space, S with
P (B) > 0. The probability that an event A occurs given that
event B has already occurred, denoted P (A|B), is called the
conditional probability of A given B. The conditional
probability of A given B is defined as.
P (A|B) = P P(A∩B)
(B) , P (B) > 0. In particular, if S is a finite
n(A∩B) n(B)
equiprobable space, then P (A ∩ B) = n(S) , P (B) = n(S)
18 / 46
Probability of Events
Exhaustive Events:
Two or more events defined on the same sample space are said
to be exhaustive if their union is equal to the sample space S
(thus, if they partition the sample space mutually exclusively).
Eg: if A1 , A2 , A3 ∈ S A1 ∪ A2 ∪ A3 = S
Definition (partition of sample space):
A1 , A2 , A3 · · · An form a partition of the same sample space S if
the following hold:
1 Ai ̸= ø for all i = 1, 2, 3, · · · , n
2 Ai ∩ Aj = ø for all i ̸= j, i, j = 1, 2, 3, · · · , n
Pn
i=1 Ai = S
3
21 / 46
The Multiplication Rule for P (A ∩ B)
The definition of conditional probability yields the following
result, obtained by multiplying both sides of the conditional
probability equation by P(B).
P (A ∩ B)
P (A|B) =
P (B)
P (A ∩ B)
P (A|B) ∗ P (B) = ∗ P (B)
P (B)
P (A|B) ∗ P (B) = P (A ∩ B)
This rule is important because it is often the case that P (A ∩ B)
is desired, whereas both P(B) and P (A|B) can be specified from
the problem description.
22 / 46
The Law of Total Probability
Let A1 , · · · , Ak be mutually exclusive and exhaustive events.
Then for any other event B,
Bayes’ Rule
The power of Bayes’ rule is that in many situations where we
want to compute P (A|B) it turns out that it is difficult to do so
directly, yet we might have direct information about P (B|A).
Bayes’ rule enables us to compute P (A|B) in terms of P (B|A).
P (A ∩ B) P (B|A)P (A)
P (A|B) = =
P (B) P (B)
23 / 46
Bayes’ Theorem
Let A and Ac constitute a partition of the sample space S such
that with P (A) > 0 and P (Ac ) > 0, then for any event B in S
such that P (B) > 0,
P (B|A)P (A)
P (A|B) =
P (B|A)P (A) + P (B|Ac )P (Ac )
Example
A paint-store chain produces and sells latex and semigloss
paint. Based on long-range sales, the probability that a
customer will purchase latex paint is 0.75. Of those that
purchase latex paint, 60% also purchase rollers. But only 30%
of semigloss pain buyers purchase rollers. A randomly selected
buyer purchases a roller and a can of paint. What is the
probability that the paint is latex?
24 / 46
Solution
L = {The customer purchases latex paint.}, P(L) = 0.75
S = {The customer purchases semigloss paint.}, P(S) = 0.25
R = {The customer purchases roller.}
P (R|L) = 0.6; P (R|S) = 0.3
P (L ∩ R)
P (L|R) =
P (R)
P (R|L)P (L)
=
P (R)
0.6 × 0.75
=
(0.6 × 0.75) + (0.3 × 0.25)
≈ 0.857
25 / 46
Axioms of Probability
Given an experiment and a sample space, S , the objective of
probability is to assign to each event A a number P(A), called
the probability of the event A, which will give a precise measure
of the chance that A will occur. To ensure that the probability
assignments will be consistent with our intuitive notions of prob-
ability, all assignments should satisfy the following axioms (basic
properties) of probability
A.1: For every event A, 0 ≤ P (A) ≤ 1
A.2: P(S) = 1
A.3: If A and B are mutually exclusive events, i.e A ∩ B = øthen
P (A ∪ B) = P (A) + P (B)
A.4: If A1 , A2 , · · · , An is a sequence of n mutually exclusive
events, then,
P (A1 ∪A2 ∪A3 ∪· · ·∪An ) = P (A1 )+P (A2 )+P (A3 )+· · ·+P (An )
26 / 46
Theorems
P (A′ ) = 1 − P (A)
27 / 46
Cont’d Probability
Conditional Probability
If A and B are any two events defined on the same sample space
S, the conditional probability of A given B is defined by
P (A ∩ B)
P (A|B) = , P (B > 0) (1)
P (B)
P (C ∩ D) P (C ∩ D)
0.22 = P (C|D) = =
P (D) 0.36
P (C ∩ D) 0.0792
P (D|C) = = = 0.264
P (C) 0.30
29 / 46
Some Axioms
30 / 46
MULTIPLICATION LAW OF PROBABILITY
31 / 46
Since the events A ∩ B and B ∩ A are equivalent, it follows from
Equation (4) that we can also write
P (A ∩ B) = P (B ∩ A) = P (A)P (B|A) (4)
In order words, it does not matter which event is referred to as
A and which event is referred to as B.
Solution: Let A denote the event that the first orange is spoilt
and B the event that the second orange is spoilt, then we wish to
5
find P (A ∩ B). The probability of removing a spoilt orange is 20 .
If the first orange is spoilt, then probability of removing a second
4
spoilt orange from the remaining 4 is 19 . By the multiplication
rule, 5 4 1
P (A ∩ B) = P (A)P (B|A) = =
20 19 19
32 / 46
MULTIPLICATION LAW OF PROBABILITY
The multiplication rule can be applied to two or more events. For
three events, A, B, C, the multiplication rule takes the following
form.
Theorem 1
P (A ∩ B ∩ C) = P (A)P (B|A)P (C|A ∩ B), where P (A) ̸= 0
and P (A ∩ B) ̸= ∅
Proof:By associative law,
A ∩ B ∩ C = (A ∩ B) ∩ C
∴ P (A ∩ B ∩ C) = P [(A ∩ B) ∩ C]
= P (A ∩ B)P (C|A ∩ B)
= P (A)P (B|A)P (C|A ∩ B)
Theorem 1 can be extended by mathematical induction to the
following theorem
Theorem 2
For any events A1 , A2 , · · · , An (n > 2)
P (A1 ∩ A2 ∩ · · · ∩ An ) =
P (A1 )P (A2 |A1 )P (A3 |A1 ∩ A2 ) · · · P (An |A1 ∩ A2 · · · ∩ An−1 ) 33 / 46
Independent Events
When the occurrence or non-occurrence of A has no effect on
whether or not B occurs, and vice versa, we say that the events
A and B are independent.
Conditions
Two events with nonzero probabilities are independent iff, any
one of the following equivalent statement is true
P (A|B) = P (A)
P (B|A) = P (B)
P (A ∩ B) = P (A)P (B)
Otherwise, A and B are called dependent events.
https://bit.ly/3bfKbhv
36 / 46
Total Probability Rule
Theorem
If A1 , A2 , · · · , An form a partition of a Sample space S, then for
any event B defined on S s.t. P (B) > 0, the total probability
rule is
Xn
P (B) = P (Ai )P (B|Ai )
i=1
P (A) = P (A ∩ B) + P (A ∩ B̄)
37 / 46
Total Probability Rule
where the last step follows from the multiplication law of proba-
bility. This is called the Law of Total Probability (LOTP).
The LOTP is helpful. Sometimes P (A|B), P (A|B̄), and P (B)
may be easily computed with available information whereas com-
puting P (A) directly may be difficult. Note : The LOTP follows
from the fact that B and B̄ partition S ; that is,
B and B̄ are disjoint, and
B ∩ B̄ = S
Example: An insurance company classifies people as “accident-
prone” and “non accident-prone.” For a fixed year, the probabil-
ity that an accident-prone person has an accident is 0.4, and the
probability that a non-accident-prone person has an accident is
0.2. The population is estimated to be 30 percent accident-prone.
(a) What is the probability that a new policy-holder will have an
accident?
38 / 46
Total Probability Rule
Solution
Define A = {policy holder has an accident} and B = {policy
holder is accident-prone}. Then,
P (B) = 0.3; P (A|B) = 0.4; P (B̄) = 0.7; and P (A|B̄) = 0.2.
By the LOTP,
40 / 46
Solution:
Let D = {disease is present} and A = {test is positive}.
We are given that P(D) = 0.08 (prevalence), P (A|D) = 0.95
(sensitivity), and P (Ā|D̄) = 0.99(specificity).
In part (a), we want to compute P (A|D). By Bayes Rule,
P (A|D)P (D)
P (D|A) =
P (A|D)P (D) + P (A|D̄)P (D̄)
(0.95)(0.08)
= ≡ 0.892
(0.95)(0.08) + (0.01)(0.92)
In part (b), we want P (D|Ā). By Bayes Rule,
P (Ā|D)P (D)
P (D|Ā) =
P Ā|D)P (D) + P (Ā|D̄)P (D̄)
(0.05)(0.08)
= ≡ 0.004
(0.05)(0.08) + (0.99)(0.92)
41 / 46
Bayes’ Theorem, Screening Tests, Sensitivity,
Specificity, and Predictive Value Positive and Negative:
There are two states regarding the disease and two states regard-
ing the result of the screening test:
42 / 46
Definitions
There are two false results:
1. A false positive result:
This result happens when a test indicates a positive status
when the true status is negative. Its probability is:
P (T |D̄) = P( positive result | absence of the disease )
The Sensitivity:
The sensitivity of a test is the probability of a positive test
result given the presence of the disease. P (T |D) = P( positive
result of the test | presence of the disease )
43 / 46
Definitions Cont’d
The specificity:
The specificity of a test is the probability of a negative test
result given the absence of the disease. P (T̄ |D̄) = P( negative
result of the test | absence of the disease)
Disease
Test Result Present(D) Absent (D̄) Total
Positive(T) a b a + b = n(T )
Negative (T̄ ) c d c + d = n(T̄ )
Total a + c = n(D) b + d = n(D̄) n
44 / 46
Tutorials
https://www.youtube.com/watch?v=gf2tm7SAOgs
45 / 46
46 / 46