Data Science Math Skills
Paul Bendich and Daniel Egger
Duke University
Sets: Medical Testing Example
Video companion
1 Example using set theory
VBS: “very bad syndrome”
X = set of people in a clinical trial
S = {x ∈ X : x has VBS}
H = {x ∈ X : x does not have VBS}
X =S∪H (you either have VBS or you don’t)
S∩H =∅ (no one both has and doesn’t have it)
Point of medial testing to figure out whether a person is in S or in H
2 Test
P = {x ∈ X : x tests positive for VBS}
N = {x ∈ X : x tests negative for VBS}
P ∪N =X (you either test positive or negative)
P ∩N =∅ (no one tests both positive and negative)
In a perfect world, S would equal P —the sick people would always test positive, and H
would equal N —the healthy people would always test negative.
...but this is not always the case.
S∩P H ∩N S∩N H ∩P
true positive true negative false negative false positive
1
Data Science Math Skills
Paul Bendich and Daniel Egger
Duke University
3 Cardinality
|S|
|X|
= proportion of people in the study who do genuinely have VBS
|H|
|X|
= proportion of people in the study without VBS
|S| |H|
|X|
+ |X|
=1
|S∩P |
|S|
true positive rate would like to be close to 1
|H∩P |
|H|
false positive rate would like to be as small as possible
|S∩N |
|S|
false negative rate would like to be as small as possible
|H∩N |
|H|
true negative rate would like to be close to 1