0% found this document useful (0 votes)
55 views84 pages

L2 Biostatistics Probability

The document provides an introduction to probability and Bayes' theorem, explaining that probability quantifies the uncertainty from random processes and defines key probability concepts like random processes, the frequentist interpretation of probability, numerical probability, the law of large numbers, basic probability notations, operators on events including union and intersection, and some basic probability rules.

Uploaded by

Aaron Ciudad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
55 views84 pages

L2 Biostatistics Probability

The document provides an introduction to probability and Bayes' theorem, explaining that probability quantifies the uncertainty from random processes and defines key probability concepts like random processes, the frequentist interpretation of probability, numerical probability, the law of large numbers, basic probability notations, operators on events including union and intersection, and some basic probability rules.

Uploaded by

Aaron Ciudad
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 84

Biostatistics

Probability &
Bayes Theorem

DR. LORI BOIES


ST. MARY ’S UNIVERSITY
@BoiesBiology
1
An Introduction to
Probability

2
What is Probability?
◦Uncertainty comes from an underlying random
process
◦Random processes can be quantified by probability
◦So statistics is using probability to understand the
uncertainty from randomness
◦Each has its own mathematical definition coming
next.

3
Random Processes
◦ A random process is a situation in which we know what
outcomes could happen, but we don't know which particular
outcome will happen.
◦ Examples: coin tosses, die rolls, iTunes shuffle, whether the stock
market goes up or down tomorrow, etc.
◦ Probability is a numerical representation of the chance of each
outcome of a random process.

4
Probability
There are several possible interpretations of probability
but they (almost) completely agree on the mathematical
rules probability must follow.
P(A) = Probability of event A
0 ≤ P(A) ≤ 1

5
Probability
Frequentist interpretation:
The probability of an outcome is the proportion of times the outcome would
occur if we observed the random process an infinite number of times.

This course focuses on Frequentist Statistics.


Example 1: 80% chance of rain tomorrow
● If we observe tomorrow many, many times, we expect rain on 80% of the observed tomorrows

Example 2: Flipping a fair coin 10 times (P(Heads)=.5)


● Flipping the coin many many, times, we expect to see around half of them are heads

6
Numerical Probability
Probability can often be defined logically by recognition of symmetry

If we roll a die, what is the probability of getting the


side of value 2?

Answer: for a fair die, no side has higher or lower chance of landing, and since there
are a total 6 sides, so probability of seeing the side “2” is 1/6

7
Law of Large Numbers
Law of large numbers states that as more observations are collected, the
proportion of occurrences with a particular outcome, 𝑃𝑃�𝑛𝑛 ,converges to the
probability of that outcome, p.

The proportion tends to get closer to the probability 1/6 = 0.167 as the
number of rolls increases.
8
Law of Large Numbers

9
Law of Large Numbers
When tossing a fair coin, if heads comes up
on each of the first 10 tosses, what do you
think the chance is that a head will come
up on the next toss? 0.5, less than 0.5, or
more than 0.5?

10
Law of Large Numbers
When tossing a fair coin, if heads comes up
on each of the first 10 tosses, what do you
think the chance is that a head will come
up on the next toss? 0.5, less than 0.5, or
more than 0.5?

The probability is still 0.5, or there is still a 50% chance that a head
will come up on the next toss.

P(H on 11th toss) = P(T on 11th toss) = 0.5


● Frequentist probability and the LLN assumes each toss does not depend on the one before.
● Gambler ‘s fallacy: After so many heads, a tail has a better chance of coming next.

11
Basic Notations in Math/Statistics
◦ Sample Space is a set of all possible outcomes, commonly denoted by capital
Greek letters, such as Ω
Die example: Ω = {1,2,3,4,5,6}
◦ An Event is a subset of the Sample Space commonly denoted by a capital letter
“event of an even side”: A={2,4,6}

The sum of all probabilities for all possible outcomes is 1

◦ For convenience, ∅ is used to represent the null (or empty) event of “nothing
happens”.

12
Operators on Events
Since sample space and events are defined as sets and their elements are outcomes of
experiment. It is important to understand some basic operators on sets, similar to the
situation of operations on basic numbers. Most operations are best illustrated graphically
known as Venn Diagram.

13
Union
A∪B is the combined area of A and B

2 1
9 12
4 5 3

A
A = {1, 2, 3, 4, 5} and B = {1, 3, 9, 12}. A B
A∪B={1,2,3,4,5,9,12}
Intersection
A∩B is the common (overlap) area of A and B
A = {1, 2, 3, 4, 5} and B = {1, 3, 9, 12}.

15
Intersection and Union
If A∩B = ∅, then the area of A∪B is the sum of area of A and area of B

16
Intersection and Union…
A St. Croix Story
Union – U faces towards you – your heart is
taken; The union of two sets contains all the
elements contained in either set (or both
sets)

Intersection – U faces outwards – you are


still looking! (Not completely on the same
page); The intersection of two sets contains
only the elements that are in both sets.

17
Relationship
Between Events
- Recap
Intersection
◦ Denoted ∩
◦ Both A and B occur

Union
◦ Denoted ∪
◦ Either A or B occur

Complement
◦ Denoted by C (e.g. AC)
◦ A does not occur
◦ We will talk about this more
soon… get excited! 

18
19
Some Probability Rules
The probability of mutually exclusive events is the sum of the probabilities
◦ 𝑃𝑃 𝐴𝐴 ∪ 𝐵𝐵 = 𝑃𝑃 𝐴𝐴 + 𝑃𝑃 𝐵𝐵 , if A and B are mutually exclusive
◦ Called the addition rule, allows probabilities to be summed
◦ P(A1 ∪ ⋯ ∪ Ak) = P(A1) + ⋯ + P(Ak) if A1 ⋯ AK are pairwise disjoint events (mutually exclusive)

The probability of A is less than or equal to the probability of B if A implies B


◦ P(A) ≤ P(B), if A⊆ B

The probability of the compliment of A is 1 minus the probability of A


◦ P(Ac) = 1 – P(A).

The probability of the the union of A and B is equal to the sum of the probability
of A and the probability of B, minus the probability of the intersection of A and B
◦ P(A∪B) = P(A) + P(B) – P(A∩B)

20
Union and Intersection –
Can happen for more than 2 events!
Intersection and union can be defined for more than two events:
◦ A∩B∩C∩D
◦ A∪B∪C∪D
In general intersection “distributes”
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)

Union:
A∪B∪C is the event which is true if any of
A, B or C is true. In a Venn diagram, it is
the combined area of the three events.
A∪B ∪C={a,b,c,d,e,f,g,h}

21
Union and Intersection –
Can happen for more than 2 events!
Intersection:

A∩B∩C is the event that is common to A, B and C, that is, it is true only when A, B and C
are all true. In Venn diagram, it is the common area belonging to A, B and C.

𝐴𝐴 ∩ 𝐵𝐵 ∩ 𝐶𝐶 = 𝑓𝑓

Complement: 𝐴𝐴𝑐𝑐 = 𝑐𝑐, 𝑑𝑑, 𝑒𝑒, 𝑔𝑔, 𝑖𝑖


22
Complement
The complement of an event A is the event that A does not occur, denoted Ac or A’ or 𝐴𝐴.̅

The complement of A
will be all the gray!

• Complementary events are two mutually exclusive events whose


probabilities that add up to 1.
• A cat has one kitten. If we know that the kitten is not male, what is the
sex of the kitten? { M, F } Male and Female are complementary
outcomes.
• A cat has two kittens, if we know that they are not both Females, what
are the possible sex combinations for these kittens?
23
Disjoint vs. Non-Disjoint Outcomes
Disjoint (mutually exclusive) outcomes: Cannot happen at the same time.
The outcome of a single coin toss cannot be a head and a tail.
A student both cannot fail and pass a class.
A single card drawn from a deck cannot be an ace and a queen.

Non-disjoint outcomes: Can happen at the same time.


A student can get an A in biostatistics and A in biochemistry in the same semester.

If A∩B = ∅, event
A and B are
disjoint, or
mutually exclusive

24
Union of Non-Disjoint Events
What is the probability of drawing a jack or a red card from a
well shuffled full deck?

Figure from http://www.milefoot.com/math/discrete/counting/cardfreq.htm


25
Union of Non-Disjoint Events
What is the probability of drawing a jack or a red card from a
well shuffled full deck?

Figure from http://www.milefoot.com/math/discrete/counting/cardfreq.htm


26
Try It!
What is the probability that a randomly sampled student thinks marijuana should be legalized or they agree with their parents' political views?

(a) (40 + 36 - 78) / 165

(b) (114 + 118 - 78) / 165

(c) 78 / 165

(d) 78 / 188

(e) 11 / 47

27
The Addition Rule
𝑃𝑃 𝐴𝐴 ∪ 𝐵𝐵 = 𝑃𝑃 𝐴𝐴 + 𝑃𝑃 𝐵𝐵 , if A and B are mutually exclusive
Using a di as an example, the probability of rolling each outcome is 1/6.
◦ P(1) = 1/6
◦ P(2) = 1/6

What is the probability of rolling a 1 or a 2?


◦ Rolling a 1 or a 2 are mutually exclusive
◦ So… P(1 ∪ 2) = P(1) + P(2)
◦ P(1 ∪ 2) = 1/6 + 1/6 = 2/6 = 1/3

28
Recap
General addition rule
P(A or B) = P(A) + P(B) - P(A and B)

Note: For disjoint events P(A and B) = 0, so the above formula simplifies to P(A or B) =
P(A) + P(B)

29
Probabilities

Coming Attractions… Things to be Excited About! 

More Information: https://www.dummies.com/education/math/probability/principles-of-probability/ 30


Probability Distribution
A probability distribution lists all possible events and the
probabilities with which they occur.
The probability distribution for the sex of one kitten:

31
Probability Distribution
A probability distribution lists all possible events and the probabilities with which they
occur.
The probability distribution for the sex of one kitten:

Rules for probability distributions:


1. The events listed must be disjoint
2. Each probability must be between 0 and 1
3. The probabilities must total 1

32
Probability Distribution
A probability distribution lists all possible events and the probabilities with which they occur.

The probability distribution for the sex of one kitten:

Rules for probability distributions:

1. The events listed must be disjoint

2. Each probability must be between 0 and 1

3. The probabilities must total 1

The probability distribution for the sexes of 2 kittens:

33
Sample Space and Complements
Sample space is the collection of all possible outcomes of a
trial.
◦ A cat has one kitten, what is the sample space for the sex of
the kitten? S = {M, F}

◦ A cat has two kittens, what is the sample space for the sex of
these kittens? S = {MM, FF, FM, MF}

34
Independence
Two processes are independent if knowing the
outcome of one provides no useful information about
the outcome of the other.
◦ Knowing that the coin landed on a head on the first toss does not provide any useful
information for determining what the coin will land on in the second toss.
>> Outcomes of two tosses of a coin are independent.
◦ Knowing that the first card drawn from a deck is an ace does provide useful information for
determining the probability of drawing an ace in the second draw.
>> Outcomes of two draws from a deck of cards (without replacement) are dependent.

35
Independence
How can we define independence?
P(A⋂B) = P(A)P(B)
Generalized: P(A1⋂⋯⋂An) = P(A1)⋯P(An)
Also called the multiplication rule
P(A|B)=P(A)
Example of independence: using two die

36
Marginal, Joint, and
Conditional Probabilities

37
Marginal, Joint, and
Conditional Probabilities
Marginal probability: the probability of an event occurring (p(A)), it may be thought of as an
unconditional probability. It is not conditioned on another event. Example: the probability that a
card drawn is red (p(red) = 0.5). Another example: the probability that a card drawn is a 4
(p(four)=1/13).

Joint probability: p(A and B). The probability of event A and event B occurring. It is the probability
of the intersection of two or more events. The probability of the intersection of A and B may be
written p(A ∩ B). Example: the probability that a card is a four and red =p(four and red) = 2/52=1/26.
(There are two red fours in a deck of 52, the 4 of hearts and the 4 of diamonds).

Conditional probability: p(A|B) is the probability of event A occurring, given that event B occurs.
Example: given that you drew a red card, what’s the probability that it’s a four
(p(four|red))=2/26=1/13. So out of the 26 red cards (given a red card), there are two fours so
2/26=1/13.

For More Information: https://sites.nicholas.duke.edu/statsreview/jmc/ 38


Let’s Practice!
Example: Relapse
Researchers randomly assigned 72 chronic users of cocaine into
three groups: desipramine (antidepressant), lithium (standard
treatment for cocaine) and placebo. Results of the study are
summarized below:

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 39


Let’s Practice!
Example: Relapse – Marginal Probability

What is the probability that a patient


relapsed?

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 40


Let’s Practice!
Example: Relapse
Researchers randomly assigned 72 chronic users of cocaine into three groups:
desipramine (antidepressant), lithium (standard treatment for cocaine) and
placebo. Results of the study are summarized below:

P(relapsed) = 48 / 72 ~ 0.67

For More Information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 41


Let’s Practice!
Example: Relapse – Joint Probability

What is the probability that a patient received the


antidepressant (desipramine) and relapsed?

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 42


Let’s Practice!
Example: Relapse – Joint Probability
What is the probability that a patient received the
antidepressant (desipramine) and relapsed?

P(relapsed and desipramine) = 10 / 72 ~ 0.14

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 43


Let’s Practice!
Example: Relapse – Conditional Probability
If we know that a patient received the antidepressant
(desipramine), what is the probability that they relapsed?

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 44


Let’s Practice!
Example: Relapse – Conditional Probability

If we know that a patient received the antidepressant


(desipramine), what is the probability that they relapsed?

P(relapse | desipramine) = 10 / 24 ~ 0.42

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 45


Let’s Practice!
Example: Relapse – Conditional Probability
If we know that a patient received the antidepressant
(lithium), what is the probability that they relapsed?

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 46


Let’s Practice!
Example: Relapse – Conditional Probability

If we know that a patient received the antidepressant


(lithium), what is the probability that they relapsed?

P(relapse | lithium) = 18 / 24 ~ 0.75


(and similarly for placebo)
For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 47
Let’s Practice!
Example: Relapse – Conditional Probability

If we know that a patient relapsed, what is the probability


that they received the antidepressant (desipramine)?

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 48


Let’s Practice!
Example: Relapse – Conditional Probability

If we know that a patient relapsed, what is the probability


that they received the antidepressant (desipramine)?

P(desipramine | relapse) = 10 / 48 ~ 0.21

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 49


Let’s Practice!
Example: Relapse – Conditional Probability

If we know that a patient relapsed, what is the probability


that they received the antidepressant (desipramine)?

P(desipramine | relapse) = 10 / 48 ~ 0.21


And similarly for the other treatments given relapse:
P(lithium | relapse) = 18 / 48 ~ 0.38
P(placebo | relapse) = 20 / 48 ~ 0.42

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 50


Conditional Probability
The conditional probability of the outcome of interest A
given condition B is calculated as

Now let's go back and look at what we just did…

51
Let’s Practice! - RECALL
Example: Relapse – Conditional Probability

If we know that a patient received the antidepressant


(desipramine), what is the probability that they relapsed?

P(relapse | desipramine) = 10 / 24 ~ 0.42

For more information: http://www.oswego.edu/~srp/stats/2_way_tbl_1.htm 52


Conditional Probability
If we know that a patient received the antidepressant (desipramine), what is the probability that they relapsed?

The conditional probability of the outcome of interest A given condition B is


calculated as

53
Independence and Conditional
Probabilities
Consider the following (hypothetical) distribution of gender
and major of students in an introductory statistics class:

The probability that a randomly selected student is a social


science major is?

54
Independence and Conditional
Probabilities
Consider the following (hypothetical) distribution of gender and
major of students in an introductory statistics class:

The probability that a randomly selected student is a social


science major is? 60/100 = 0.6
The probability that a randomly selected student is a social
science major given that they are female is 30 / 50 = .6 or 60%
55
Independence and Conditional
Probabilities
Consider the following (hypothetical) distribution of gender and major of
students in an introductory statistics class:

The probability that a randomly selected student is a social science major is?
60/100 = 0.6
The probability that a randomly selected student is a social science major
given that they are female is 30 / 50 = .6 or 60%
Since P(SS | M) also equals 0.6, major of students in this class does not
depend on their gender: P(SS | F) = P(SS).
56
Independence and Conditional
Probabilities
Generically, if P(A | B) = P(A) then the events A and B are said to be independent.
• Conceptually: Giving B doesn’t tell us anything about A.
• Formally: if P(A | B) = P(A), then A and B are independent

• Mathematically: We know that if events A and B are


independent, P(A and B) = P(A) x P(B). Then,

57
Inverting Probabilities
And Bayes’ Theorem

58
Inverting Probabilities
When a patient goes through breast cancer screening there are
two competing claims: patient has cancer and patient doesn't
have cancer. If a mammogram yields a positive result, what is
the probability that patient actually has cancer?
◦ American Cancer Society estimates that about 1.7% of women have breast cancer.
http://www.cancer.org/cancer/cancerbasics/cancer-prevalence

◦ Susan G. Komen For The Cure Foundation states that mammography correctly
identifies about 78% of women who truly have breast cancer.
http://ww5.komen.org/BreastCancer/AccuracyofMammograms.html
◦ An article published in 2003 suggests that up to 10% of all mammograms result in
false positives for patients who do not have cancer.
http://www.ncbi.nlm.nih.gov/pmc/articles/PMC1360940

Note: These percentages are approximate, and very difficult to estimate. 59


Inverting Probabilities
When a patient goes through breast cancer screening there are two
competing claims: patient has cancer and patient doesn't have cancer. If a
mammogram yields a positive result, what is the probability that patient
actually has cancer?

60
Inverting Probabilities
When a patient goes through breast cancer screening there are two
competing claims: patient has cancer and patient doesn't have cancer. If a
mammogram yields a positive result, what is the probability that patient
actually has cancer?

61
Inverting Probabilities
When a patient goes through breast cancer screening there are two
competing claims: patient has cancer and patient doesn't have cancer. If a
mammogram yields a positive result, what is the probability that patient
actually has cancer?

Note: Tree diagrams are useful for inverting probabilities: we are given P(+|C) and asked for P(C|+). 62
Inverting Probability and Bayes’ Rule
There is a formal Rule for inverting probability: It is called Bayes’ Theorem.

The conditional probability formula we have seen so far is a


special case of the Bayes' Theorem,
Bayes’ Theorem

P (outcome A of variable 1 | outcome B of variable 2) =


𝑃𝑃 𝐵𝐵 𝐴𝐴 𝑃𝑃(𝐴𝐴)
𝑃𝑃 𝐴𝐴 𝐵𝐵 =
𝑃𝑃 𝐵𝐵 𝐴𝐴 𝑃𝑃 𝐴𝐴 + 𝑃𝑃 𝐵𝐵 𝐴𝐴′ 𝑃𝑃(𝐴𝐴′ )

63
Bayes’ Theorem
Bayes’ theorem is a means to “invert” a conditional probability
Bayes’ theorem applies to events with P>0
P(A|B) = P(B|A)*P(A)/P(B)
Law of total probability
◦ Generalization of Bayes’ theorem
◦ P(Ai|B) = P(B|Ai)*P(Ai)/P(B)
◦ Example of application = diagnosis of patients given a set of symptoms

64
Application: Inverting Probabilities
A common epidemiological model for the spread of diseases is the SIR model,
where the population is partitioned into three groups: Susceptible, Infected, and
Recovered. This assumes infection occurs once (eg. chicken pox)
Imagine a population in the midst of an epidemic where 60% of the population is
susceptible, 10% is infected, and 30% is recovered. The only test for the disease
is accurate 95% of the time for susceptible individuals, 99% for infected
individuals, but 65% for recovered individuals. (Accurate means a negative result
for susceptible and recovered individuals and a positive result for infected
individuals).
-probability tree?
-If test is positive, what is the probability of having disease?

65
Application: Inverting Probabilities

66
Screening Tests
Generally, less invasive procedures are used to screen (or predict) the presence of a
disease or condition
◦ PSA test (prostate cancer)
◦ Blood pressure (hypertension)
◦ Mammography (breast cancer)

Accurate screening tests predict disease with a high probability

Let A = screen is positive and B = disease

67
Test Validity
• Validity of a test is defined as its ability to distinguish
between who has a disease and who does not. Simply…
– ability of a measuring instrument to give a true measure

• Can be evaluated only if an accepted and


independent method for confirming the test
measurement exists (or ‘gold standard’ exists)
– i.e., there must be a way to know the “truth”

68
Sensitivity and Specificity
Validity has two components: Sensitivity & Specificity

• Sensitivity = the ability of the test to identify correctly

those who have the disease


– percentage of cases with the disease who were identified as having the disease by the test

• Specificity = the ability of the test to identify correctly those who do not have the disease
– percentage of cases without the disease who were identified as having no disease by
the test

69
Sample 2x2 Table for Assessing the Validity of the Test with
Dichotomous Results
Gold Standard
Disease (+) No Disease (-) Total

a b
Positive (+) a +b
(True Positives, TP) (False Positives, FP)

Test
Result c d
Negative (-) c +d
(False Negatives, FN) (True Negatives, TN)

Total a +c b +d a+b+c+d

•Sensitivity = a/(a+c) = TP/(TP+FN)


(proportion of people with disease who were correctly identified)
•Specificity = d/(b+d) = TN/(FP+TN)
(proportion of people without disease who were correctly identified)
70
Application of Conditional Probability
Often there is need to evaluate probability that is conditional on certain
events. Given a person has a particular disease, the probability of
being able to identify them is of great importance.

Sensitivity: The probability of a test showing positive (screening)


when the person actually has a disease.
P(positive | D )

Predictive Value Positive (PV+): The probability of actually having the


disease given the test is positive.
P(D | positive)

71
PV+ and Sensitivity
PV+
◦ The probability of disease given a positive screening test

𝑃𝑃 𝐵𝐵|𝐴𝐴 or P(D|T+)
Sensitivity (Se)
◦ The probability of a positive screen test given disease

𝑃𝑃 𝐴𝐴|𝐵𝐵 or P(T+|D)

72
PV- and Specificity
(Predictive Value Negative) PV-
◦ The probability of NO disease given a negative screening test)

� 𝐴𝐴)̅ or P(ND|T-)
𝑃𝑃(𝐵𝐵|

Specificity (Sp)
◦ The probability of a negative screen test, given NO disease
𝑃𝑃 𝐴𝐴|̅ 𝐵𝐵� or P(T-|ND)

73
PV+, PV-, Specificity, and Sensitivity
When a person has a disease, the screening test should have
◦ High PV+
◦ High Se

When a person does NOT have a disease, the screening test


should have
◦ High PV-
◦ High Sp

This Photo by Unknown Author is licensed under CC BY-


SA-NC
74
75
Another Way to Look at This….

Notice that the sign in the notation is the result of the test, “true” qualifies if the result
of the Test matches the real disease status

For Further Reading: https://www.technologynetworks.com/analysis/articles/sensitivity-vs-specificity-318222 76


Related Concepts
False negative
◦ Negative test, but person has disease
◦ P(False-) = 1 – Sensitivity
◦ P(𝐹𝐹−)=P(𝑇𝑇−│𝐷𝐷)=1−P(𝑇𝑇+|𝐷𝐷)

False positive
◦ Positive test, but person is free of disease
◦ P(False+) = 1 – Specificity
◦ P(𝐹𝐹+)=P(𝑇𝑇+│𝑁𝑁𝐷𝐷)=1−P(𝑇𝑇−|𝑁𝑁𝐷𝐷)

77
Let’s Try It!
PSA and Prostate Cancer Association.
◦ Calculate the: Sensitivity & Specificity
◦ Can you also do the probability of a false positive and negative??

Prostate Cancer
D+ D-

T+
test results

119
PSA

T- 118

138 99 78
Check Yourself!
Sensitivity = P(T+|D+)
= P(T+ and D+)/P(D+)
= 92/138 = 0.667

Specificity = P(T-|D-)
= P(T- and D-)/P(D-)
= 72/99 = 0.727

P(False positive) =1 - Specificity


= 1 – 0.727 = 0.273

P(False negative) = 1-Sensitivity


= 1-0.667 = 0.333

79
Let’s Try Another One!
Example: Hypertension
Suppose that 84% of hypertensive people and 23% of non-hypertensive people are
classified as hypertensive by a given test

If the prevalence of hypertension in the population is 20%, what is the quality of the test?

Draw a Table!!!

80
Table!
Example: Hypertension
Individual has Individual does not have
Hypertension Hypertension
Positive Test 84% 23%
Negative Test 16% 77%
100% 100%

What percentage is a true positive?


What percentage is a false positive?
What percentage is a true negative?
What percentage is a false negative?

81
Example: Hypertension Answers
Sensitivity = P(+|D) = 0.84

Specificity = P(-|D-) = 1 – 0.23 = 0.77

P(D) = 0.20

P(D-) = 1 – 0.20 = 0.80

82
Predictive Value Positive

𝑃𝑃 +|𝐷𝐷 𝑃𝑃 𝐷𝐷
𝑃𝑃𝑃𝑃 + = 𝑃𝑃 𝐷𝐷| + =
� 𝑃𝑃 𝐷𝐷
𝑃𝑃 +|𝐷𝐷 𝑃𝑃 𝐷𝐷 + 𝑃𝑃 +|𝐷𝐷 �

0.84 0.2
= = 0.477
0.84 0.2 + 1 − .77 0.8

The positive test result is not very predictive since we are less than 50% sure that a person
has hypertension if he/she has a positive test based on this machine.
Hey! We are using Bayes’ Theorem!
83
Predictive Value Negative
𝑃𝑃 −| � 𝑃𝑃 𝐷𝐷
𝐷𝐷 �
�| − =
𝑃𝑃𝑃𝑃 − = 𝑃𝑃 𝐷𝐷
� 𝑃𝑃 𝐷𝐷
𝑃𝑃 −|𝐷𝐷 � + 𝑃𝑃 −|𝐷𝐷 P(𝐷𝐷)

1 − 0.23 ∗ 0.8
= = 0.95
1 − 0.23 ∗ 0.8 + 1 − 0.84 0.2

The negative test result is very informative since we are 95% sure that a person with negative
result are not hypertensive.

84

You might also like