Statistics 1S1/1P1 Slides
Rakesh Bhurtun
Department of Statistics
Rakesh Bhurtun (Rhodes University) Statistics 1S1/1P1 (slide 1) 1 / 40
Chapter 3: Probability
Aims
To introduce the basic concepts of probability
Apply the probability concepts to typical scientific, biomedical and
pharmacological fields.
Rakesh Bhurtun (Rhodes University) Statistics 1S1/1P1 (slide 2) 2 / 40
Introduction
In addition to describing data, we might want to test specific
inferences about the behaviour of data.
most of these inferences rely on concepts of probability
Hypothesis: Women who have their first child after the age of 30 are
more likely to develop breast cancer than those who have their first
child before age 20.
The likelihood of occurrence of phenomena is measured or quantified
using probability.
In this chapter we define probability and discuss various techniques of
calculating probability
Definition
Example 3.2
Interest may be in likelihood of a male live childbirth among all
livebirths.
Conventional wisdom tells us it is close to 50-50
Table 3.1 gives the vital statistics for this phenomenon
The proportion (probability) of live male births in 1965 was 0.51247 ;
in 1965-69 was 0.51248; in 1965-74 was 0.51268.
These empirical probabilities are based on finite amount of data.
called empirical probabilities because they are based on relative
frequencies.
In principle, the sample size could be expanded indefinitely and an
increasingly more precise estimate of the probability obtained.
Probability: a numerical measure of the likelihood of an event
to occur.
Terminology and Notation
The sample space, denoted S, is the set of all possible outcomes
(elementary outcomes ei ), i.e S = {e1 , e2 , ..., en }
An event, denoted E is any set of outcomes of interest.
The probability of an event, dented Pr (E ) = P (E ) is the relative
frequency of this set of outcomes over an indefinitely large (or
infinite) number of trials.
Properties
The probability of an event always satisfies:
1 0 ≤ P (E ) ≤ 1
2 if A and B are two events that cannot both happen at the same time,
then P (A or B occurs) = P (A) + P (B)
Pn
3 P (S) = P (ei ) = 1
i=1
Consider a die rolling example, implying that
S = {e1 = 1, e2 = 2, ...e6 = 6}
1
If all faces are equally likely P (e1 ) = P (e2 ) = ... = P (e6 ) = 6 and
n
P (ei ) = 16 + 16 + ... + 16 = 1
P
hence
i=1
If A = {odd numbers} i.e A = {1, 3, 5} and B = {> 5} i.e B = {6} ,
then
P (A or B) = P (A) + P (B)
= P (e1 ) + P (e3 ) + P (e5 ) + P (e6 )
1 1 1 1 2
= + + + =
6 6 6 6 3
Example 3.6, pg 40
Let the event:
A = person has normotensive diastolic blood pressure (DBP) readings
(DBP < 90)
B =person has borderline DBP readings (90 ≤ DBP < 95).
Suppose that P(A) = 0.7 and P(B) = 0.1.
If Z =event that person has DBP < 95.
Then, P(Z ) = P(A) + P(B) = 0.8.
The two events A and B are said to be mutually exclusive since they
cannot both happen at the same time.
Example 3.7, pg 40
Let X denotes DBP, C be the event X ≥ 90, and D be the event
75 ≤ X ≤ 100. Events C and D are not mutually exclusive because both
occur when 90 ≤ X ≤ 100.
70 80 90 100
Rakesh Bhurtun (Rhodes University) Statistics 1S1/1P1 (slide 8) 8 / 40
Set Notation
Union
A ∪ B is the event that either A or B occurs, or they both occur.
The diagram is called a Venn diagram
The whole box (universal set) is the sample space S and thus P (S) = 1
Example 3.8 pg 40
Consider A = {X ≤ 90} and B = {90 ≤ X < 95} , then
A ∪ B = {X < 95}
A∪B
70 80 90 100
Intersection
A ∩ B is the event that both A and B occur simultaneously
Example 3.10, pg 41
Consider C = {X ≥ 90} and D = {75 ≤ X < 100} , then
C ∩ D = {90 ≤ X ≤ 100}
C∩D
70 80 90 100
Complement of an event
A = A′ is the event that A does not occur.
It is called the complement of A.
Notice that Pr (A) = 1–Pr (A), because A occurs only when A does
not occur.
Example 3.11, pg 42
Consider A = {X < 90} and C = {X ≥ 90} , then C = A
Example, if P (A) = 0.7, then P (C ) = P A = 1 − 0.7 = 0.3
That is, if 70% of people have DBP < 90, then 30% of the people must
have DBP ≥ 90.
Example: Not in the book
A sample space S consists of 9 elementary outcomes, e1 , e2 , ..., e9 whose
probabilities are
P (e1 ) = P (e2 ) = 0.04 P (e3 ) = P (e4 ) = P (e5 ) = 0.2
P (e6 ) = P (e7 ) = 0.1 P (e8 ) = P (e9 ) = 0.06
Suppose A = {e1 , e5 , e7 , e8 } B = {e2 , e5 , e8 , e9 }
1 Draw a Venn diagram and show the events A and B.
2 Calculate P (A) , P (B) , P A , P B and P (A ∩ B)
The Multiplication Law of Probability
Events A and B are called independent events if
P(A ∩ B) = P(A) × P(B)
If A1 , ...Ak are mutually independent events, then
P (A1 ∩ A2 ∩ ... ∩ Ak ) = P (A1 ) × P (A2 ) × ... × P (Ak )
Two events A and B are dependent if
P (A ∩ B) ̸= P (A) × P (B)
Example 3.14, pg 44
Consider all possible DBP measurements from a mother and her first-born
child. Let
A = {mother’s DBP ≥ 95} and B = {first-born’s DBP ≥ 80}
Suppose P (A ∩ B) = 0.05, P (A) = 0.1 and P (B) = 0.2, then
P (A ∩ B) = 0.05 ̸= P (A) × P (B) = 0.02
Thus events A and B would be dependent OR are not independent.
The Addition Law of Probability
If A and B are any events, then P(A ∪ B) = P(A) + P(B)–P(A ∩ B)
Special case: If events A and B are mutually exclusive, then P(A ∩ B) = 0
And the addition law reduces to P(A ∪ B) = P(A) + P(B).
The Addition Law of Probability
If A and B are any events, then P(A ∪ B) = P(A) + P(B)–P(A ∩ B)
Special case: If events A and B are mutually exclusive, then P(A ∩ B) = 0
And the addition law reduces to P(A ∪ B) = P(A) + P(B).
Example 3.16, pg 45
Suppose that two doctors, A and B, test all patients coming into a clinic
for syphilis. Let A+ = {doctor A makes a positive diagnosis} and
B + = {doctor B makes a positive diagnosis} .
Suppose that doctor A diagnoses 10% of all patients as positive, doctor B
diagnoses 17% of all patients as positive, and both doctors diagnose 8% of
all patients as positive
1 Are the events A and B independent? Justify
2 Suppose that a patient is referred for further lab test if either doctor
A or doctor B or both makes a positive diagnosis. What is the
probability that a patient will be referred for further lab tests?
Example (not in the book)
Suppose
A and B are two events in a sample space such that
P A = 0.48, P (B) = 0.40 and P (A ∪ B) = 0.66, find
1 P (A ∩ B) ;
2 P A∪B .
Addition law and Independent events
For independent events A and B :
P(A ∪ B) = P(A) + P(B) − P (A) × P (B)
Example 3.17, pg 46
Consider events A = {mother’s DBP ≥ 95} and B = {father’s DBP ≥ 95}
with P (A) = 0.1 and P (B) = 0.2 and assume that A and B are
independent events.
Suppose a “hypertensive household” is defined as one in which either the
mother or the father is hypertensive, with hypertension defined for the
mother and father, respectively, in terms of events A and B.
What is the probability of finding a hypertensive household?
Solution:
P (hypertensive household) is
P (A ∪ B) = P (A) + P (B) − P (A) × P (B)
= 0.1 + 0.2 − 0.1 × 0.2
= 0.28
Examples (not in the book)
1 Consider the two events
A = {obese} B = {Male}
for persons in the age group 20 − 39 years old. A survey taken in 2008
by the National Center for Health Statistics, suggests the probabilities
P (A) = 0.25, P (B) = 0.5 and P (A ∩ B) = 0.12.
1 For a randomly selected person in this age group, express the following
events in set notation and find their probabilities
1 B occurs and A does not occur.
2 Either A or B or both occurs.
3 Either A does not occur or B occurs.
2 Are events A and B independent? Justify.
Examples (not in the book)
1 Suppose A and B are two events in a sample sample such that
P (A) = 0.5 and P (B) = 0.22. Determine the probability that either
A or B occurs if A and B are independent.
2 If A and B are two events in a sample space such that P (A) = 0.3
and P (B) = 0.8. Can A and B be mutually exclusive? Why or why
not?
Conditional Probability
There are events that occur given (conditional on) that another event
has occured (or not occured)
these are called conditional events and
the probability is called the conditional probability
If A and B are two events, then the conditional probability of A
occuring given that B has already occured denoted P (A|B) is given
by
P (A|B) = P(A∩B)
P(B)
NB If A and B are independent events, then P (A|B) = P (A)
Example (not in the book)
Suppose
A and B are two events in a sample space such that
P A = 0.48, P (B) = 0.40 and P (A ∩ B) = 0.26, find
1 P (A|B) ,
2 P B|A .
Example (not in the book)
For two events the following probabilities are given:
P (A) = 0.25, P (B) = 0.35 and P (B|A) = 0.56
Calculate:
1 P (A ∪ B)
2 P A|B .
Examples (not in the book)
Consider the two events
A = {obese} B = {Male}
for persons in the age group 20 − 39 years old. A survey taken in 2008 by
the National Center for Health Statistics, suggests the probabilities
P (A) = 0.25, P (B) = 0.5 and P (A ∩ B) = 0.12.
1 If a male person is selected at random, what is the probability that he
is obese?
2 Find:
1 the conditional probability that B occurs given that A does not occur.
2 the conditional probability that B does not occur given that A occurs.
3 the conditional probability that B does not occur given that A does not
occur.
Contingency Table
Cross-tabulations or frequencies tables used to present two or more
categorical variables and their associated counts
Examples (not in the book)
The following table classifies patients in a research study of cardiovascular risk factors
according to their gender and whether they have a family history of cardiovascular
disease:
History of Cardiovascular disease
No Yes
Gender Female 120 28
Male 165 34
1 What is the probability that a randomly selected person:
1 is from a family with cardiovascular disease?
2 is male?
2 If a randomly selected patient is found to be male, what is the probability that he
is from a family with a history of cardiovascular disease?
3 What is the probability that a randomly selected patient is either from a family
with a history of cardiovascular disease or is male?
4 Are events having a history of cardiovascular disease and being male independent?
Justify your answer.
Exercise: Mental Health case study (page 64)
Estimates of the prevalence of Alzheimer’s disease have recently been provided by
Pfeffer et al. The estimates are
Prevalence of Alzheimer’s disease (case/100 population)
Age group Males Females
65 - 69 1.6 0.0
70 - 74 0.0 2.2
75 - 79 4.9 2.3
80 - 84 8.6 7.8
85+ 35.0 27.9
Suppose an unrelated 77-yr old man, 76-yr woman and 82-yr old woman are
selected. What is the prob. that all 3 have the disease?
Bayes’ Rule and Screening Tests
Probability is often applied in a medical or biological setting in the
area of diagnostic testing (screening test), i.e. testing presence or
absence of a condition; disease, preganancy etc.
It would be nice if such tests are fool proof i.e. give a positive result ‘
the condition is present and negative whenever the condition is
absent. However this is not the case.
In a diagnostic test,
1 either
each subject is a true positive i.e the condition that the test is designed
to detect is present
or the subject is true negative i.e the condition that the test is designed
to detect is absent
2 either
the test can be positive (correctly or incorrectly)
or negative (correctly or incorrectly)
Four Categories
1 The condition is present and test detects its presence, True Positive
2 The condition is present but test does not detect it, False Negative
(error)
3 The condition is not present the test detects its presence, False
Positive (error).
4 The condition is not present and the test does not detect its presence,
True Negative
Four Categories
Hence we have:
Test Result
+ -
+ True + and test + True + but test -
True State
No error False negative
P (false negative) = β
- True - but test + True - and test -
False positive No error
P (false positive) = α
1 False-positive rate α = P (test result is positive|subject is a true negative)
2 False-negative rate β = P (test result is negative|subject is a true positive)
3 Predictive value positive PV + ,
PV + = P (subject is a true positive|test result is positive)
4 Predictive value negative PV − , PV − = P (subject is a true negative|test is negative)
5 Sensitivity = P (test results will be positive|subject is true positive)
6 Specificity = P (test results will be negative|subject is true negative)
Example 3.23, pg 51
Suppose that among 100,000 women with negative mammograms 20 will
be diagnosed with breast cancer within 2 years, whereas 1 woman in 10
with positive mammograms will be diagnosed with breast cancer within 2
years.
1 Find the PV + and PV − for the mammography.
2 Find the sensitivity and the specificity of the test.
Example: Not in the Book
The results of the folin-Wu blood test which is a screening test for
diabetes, is given below.
Test Diabetic Non-Diabetic Total
+ 56 49 105
- 14 461 475
Total 70 510 580
Denote the events, suffering from diabetes as D + , diabetes-free as D − , a
positive screening test as T + and a negative screening test as T − .
1 What are the sensitivity and the specificity of the test?
2 What are the PV + and PV − of the test?
Example: Not in the book
A patient underwent a diagnostic test for hypothyroidism. The diagnostic
test correctly identifies patients who in fact have the disease in 93% of the
cases and correctly labels healthy patients as healthy in 81% of the cases.
Assume that about 4% of all patients have the disease. Suppose that the
test for this particular patient comes back positive (i.e., the test indicates
that the patient has the disease), determine the probability that the
patient in fact has the disease?
1 Construct a tree diagram to present this scenario.
2 Calculate the sensitivity and the specificity.
3 Calculate the PV + and the PV − .
Solution
Let D + = {Disease Present} , D − = {Disease Absent} , T + = {Test Positive} ,
T − = {Test Negative}
P(D+∩ T+)=0.0372
.93
+ )=0
+ |D
P( T
P(
T -|
D+
04
)=
0.
0.
07 P(D+∩ T-)=0.0028
)=
D+
P(
P(D-∩ T+)=0.1824
P(
D- 19
)= 0.
)=
0. | D-
96 T+
P(
P( T
-|D
-)=
0.8 P(D-∩ T-)=0.7776
1
1 Sensitivity = P T + |D + = 0.93,
Specificity = P T − |D − = 0.81
P (D + ∩T + )
2 PV + = P D + |T + = P(T + )
0.0372
= 0.0372+0.1824 = 0.1694
− −
P (D ∩T )
PV − = P D − |T −
0.7776
= P T− = 0.7776+0.0028 = 0.9964
( )
Example:Tree Diagram from Stats 101 Classwork 2019
A screening test for cancer of the cervix has a false-negative rate and
false-positive rate, each of 0.05. Of a certain population of women, 4%
have this form of cancer.
1 What is the probability that a randomly selected woman from this
population has cancer of the cervix given that she reacts positively to
the test (predictive value of a positive test)? Hint : Use a tree
diagram.
2 What is the specificity and the sensitivity of the test?
Rakesh Bhurtun (Rhodes University) Statistics 1S1/1P1 (slide 39) 39 / 40
Example: Not in the book
Suppose the rate of type II diabetes mellitus (DM) in 40- to 59-year-olds is
7% among Caucasians, 10% among African-Americans, and 12% among
Hispanics. Suppose the ethnic distribution in Houston, Texas, among 40-
to 59-year-olds is 35% Caucasian, 25% African-American, and 40%
Hispanic. Use the following event notation for 40- to 59-year olds: A1 =
Caucasian, A2 = African-American, A3 = Hispanics, D = percentage
infected with type II DM and D ′ = percentage not infected with type II
DM.
1 Construct a tree diagram for this situation.
2 What is the overall rate of type II DM among 40- to 59-year-olds in
Houston?
3 Suppose a randomly selected 40- to 59-year-old person in Houston is found
to have type II DM. What is the probability that this person is
African-American?
Rakesh Bhurtun (Rhodes University) Statistics 1S1/1P1 (slide 40) 40 / 40