SlideShare a Scribd company logo
1 of 55
Download to read offline
Sensitivity &
Specificity
& Monitoring
“Contact”, 1997. Warner Bros.
Who’s this guy?
● Dan Slimmon
● Senior Platform Engineer at Exosite
● Previously Operations Team Manager at
Blue State Digital
● https://twitter.com/danslimmon
Sensitivity & Specificity

● Medical testing concepts
● “How good is your test?”
● Medical concepts often work great for ops
This talk
contains some
math.
A word problem
You’ve invented an automated test for
plagiarism.
A word problem
● If a paper contains plagiarism, you have a
90% chance of a positive result.
● If a paper doesn’t contain plagiarism, you
still have a 20% chance of a positive result.
● Jerkwad kids plagiarize 30% of the time
Question 1
Given a random paper, what’s the probability
that you’ll get a negative result?
● Plagiarism: 90% chance of positive
● No plagiarism: 20% chance of positive
● 30% chance of plagiarism
Question 2
If there’s plagiarism, what’s the probability you’ll
detect it?
● Plagiarism: 90% chance of positive
● No plagiarism: 20% chance of positive
● 30% chance of plagiarism
Question 2
If there’s plagiarism, what’s the probability you’ll
detect it?
● Plagiarism: 90% chance of positive
● No plagiarism: 20% chance of positive
● 30% chance of plagiarism
Question 3
If you get a positive result, what’s the
probability that the paper is plagiarized?
● Plagiarism: 90% chance of positive
● No plagiarism: 20% chance of positive
● 30% chance of plagiarism
No Plagiarism

Plagiarism
No Plagiarism

Negative

Positive
No Plagiarism

Plagiarism
Negative

Negative
Positive

Positive
Question 1
Given a random paper, what’s the probability
that you’ll get a negative result?
No Plagiarism

Plagiarism
Negative

Negative
Positive

Positive
Question 2
If the paper is plagiarized, what’s the probability
that you’ll get a positive result?
No Plagiarism

Plagiarism
Negative

Negative
Positive

Positive
Question 3
If you get a positive result, what’s the
probability that the paper was plagiarized?
No Plagiarism

Plagiarism
Negative

Negative
Positive

Positive
Question 3
If you get a positive result, what’s the
probability that the paper was plagiarized?
Dark Green
-----------------------------------------(Dark Blue) + (Dark Green)
Question 3
If you get a positive result, what’s the
probability that the paper was plagiarized?
27
-----------------------------------------14 + 27
Question 3
If you get a positive result, what’s the
probability that the paper was plagiarized?

65.8%
Sensitivity & Specificity
Sensitivity:

Specificity:

Proportion of actual
positives that are
identified as such.

Proportion of actual
negatives that are
identified as such.
Sensitivity & Specificity
Sensitivity:

Specificity:

High sensitivity

High specificity

Test is very sensitive to Test works for a
problems
specific type of
problem
Sensitivity & Specificity
Sensitivity:

Specificity:

High sensitivity

High specificity

High true positive rate

High true negative rate
Sensitivity & Specificity
Sensitivity:
Probability that, if a
paper is plagiarized,
you’ll get a positive.

Specificity:
Probability that, if a
paper isn’t plagiarized,
you’ll get a negative.

90%

80%
Prevalence

Specificity
Sensitivity
Questions so
far?
Positive Predictive Value
The probability that
If you get a positive result,
Then it’s a true positive.
Condition
Absent

Condition
Present

Negative
Result

True
Negative

False
Negative

Positive
Result

False
Positive

True
Positive
When you get paged at 3
AM, Positive Predictive
Value is the probability that
something is actually
wrong.
Imagine if you will...

● Service S has 99.9% uptime
● Probe P for service S has 99% sensitivity
● Probe P has 99% specificity
Pretty decent, right?
Let’s calculate the PPV.
Condition
Absent

Condition
Present

Negative
Result

True
Negative

False
Negative

Positive
Result

False
Positive

True
Positive
The true-positive probability
Let’s calculate the probability that any given
probe run will produce a true positive.
P(TP) = (prob. of service failure) * (sensitivity)
P(TP) = 0.1% * 99%
P(TP) = 0.099%
The true-positive probability
P(TP) = 0.099%
So roughly 1 in every 1000 checks will be a
true positive.
The false-positive probability
P(FP) = (prob. working) * (100% - specificity)
P(FP) = 99.9% * 1%
P(FP) = 0.99%
So roughly 1 in every 100 checks will be a false
positive.
“Star Wars Episode V: The Empire Strikes Back”, 1980. Lucasfilm.
Positive predictive value
PPV = P(TP) / [P(TP) + P(FP)]
PPV = 0.099% / (0.099% + 0.99%)
PPV = 9.1%
If you get a positive, there’s only a 1 in 10
chance that something’s actually wrong.
Why is this terrible?
Car Alarms

http://inserbia.info/news/wp-content/uploads/2013/06/carthief.jpg
Smoke Alarms

http://www.props.eric-hart.com/wp-content/uploads/2011/03/nysf_firedrill_2011.jpg
You want smoke alarms,
not car alarms.
Semi-Practical Advice
Semi-Practical Advice
As your uptime increases, so must your
specificity.
It affects your PPV much more than sensitivity.
Uptime

Prevalence
False
Negative
Rate

Specificity
Sensitivity

False
Positive
Rate
Uptime

Specificity
Sensitivity
Semi-Practical Advice

Undetected outages are embarrassing, so we
tend to focus on sensitivity.
But be careful with thresholds.
Semi-Practical Advice
Positive
Predictive
Value

Response Time Threshold
Semi-Practical Advice

Use hysteresis (stateful probes, trend analysis,
etc.)
Semi-Practical Advice

Separate the concerns of problem detection
and problem identification
A Pony I Want

Something like Nagios, but which
● Is SNR-aware
● Helps you separate detection from diagnosis
Other useful stuff
● Medical paper with a nice visualization:
http://tinyurl.com/specsens
● Blog post with some algebra:
http://tinyurl.com/carsmoke
● Base rate fallacy:
http://tinyurl.com/brfallacy
● Differential diagnosis:
http://tinyurl.com/sbddx

More Related Content

What's hot

How Significant is Statistically Significant? The case of Audio Music Similar...
How Significant is Statistically Significant? The case of Audio Music Similar...How Significant is Statistically Significant? The case of Audio Music Similar...
How Significant is Statistically Significant? The case of Audio Music Similar...
Julián Urbano
 

What's hot (13)

Hypothesis testing and p-value, www.eyenirvaan.com
Hypothesis testing and p-value, www.eyenirvaan.comHypothesis testing and p-value, www.eyenirvaan.com
Hypothesis testing and p-value, www.eyenirvaan.com
 
Hypothesis testing 1.0
Hypothesis testing 1.0Hypothesis testing 1.0
Hypothesis testing 1.0
 
Lesson p values
Lesson   p valuesLesson   p values
Lesson p values
 
Hypothesis
HypothesisHypothesis
Hypothesis
 
Lecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic ModelingLecture6 Applied Econometrics and Economic Modeling
Lecture6 Applied Econometrics and Economic Modeling
 
RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3RESEARCH METHODS LESSON 3
RESEARCH METHODS LESSON 3
 
Test for proportion
Test for proportionTest for proportion
Test for proportion
 
How Significant is Statistically Significant? The case of Audio Music Similar...
How Significant is Statistically Significant? The case of Audio Music Similar...How Significant is Statistically Significant? The case of Audio Music Similar...
How Significant is Statistically Significant? The case of Audio Music Similar...
 
Hypothesis testing Part1
Hypothesis testing Part1Hypothesis testing Part1
Hypothesis testing Part1
 
What So Funny About Proportion Testv3
What So Funny About Proportion Testv3What So Funny About Proportion Testv3
What So Funny About Proportion Testv3
 
Testing Of Hypothesis
Testing Of HypothesisTesting Of Hypothesis
Testing Of Hypothesis
 
Presentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin PremPresentation on Hypothesis Test by Ashik Amin Prem
Presentation on Hypothesis Test by Ashik Amin Prem
 
Hypothesis
HypothesisHypothesis
Hypothesis
 

Viewers also liked (6)

Error, bias and confounding
Error, bias and confoundingError, bias and confounding
Error, bias and confounding
 
Bias and validity
Bias and validityBias and validity
Bias and validity
 
Diagnotic and screening tests
Diagnotic and screening testsDiagnotic and screening tests
Diagnotic and screening tests
 
Bias and confounding
Bias and confoundingBias and confounding
Bias and confounding
 
Sensitivity, specificity and likelihood ratios
Sensitivity, specificity and likelihood ratiosSensitivity, specificity and likelihood ratios
Sensitivity, specificity and likelihood ratios
 
Bias and errors
Bias and errorsBias and errors
Bias and errors
 

Similar to Sensitivity specificity

Slides February 23rd
Slides February 23rdSlides February 23rd
Slides February 23rd
heviatar
 
Statistik Chapter 5 (1)
Statistik Chapter 5 (1)Statistik Chapter 5 (1)
Statistik Chapter 5 (1)
WanBK Leo
 
Statistik Chapter 5
Statistik Chapter 5Statistik Chapter 5
Statistik Chapter 5
WanBK Leo
 
1. In the construction of decision trees, which of the following s.docx
1. In the construction of decision trees, which of the following s.docx1. In the construction of decision trees, which of the following s.docx
1. In the construction of decision trees, which of the following s.docx
hyacinthshackley2629
 
7.8 simple probability 2
7.8 simple probability   27.8 simple probability   2
7.8 simple probability 2
bweldon
 
Stat 230 Summer 2014 – Final Exam Page 1 .docx
Stat 230          Summer 2014 – Final Exam Page 1  .docxStat 230          Summer 2014 – Final Exam Page 1  .docx
Stat 230 Summer 2014 – Final Exam Page 1 .docx
dessiechisomjj4
 
Negative Marking v5
Negative Marking v5Negative Marking v5
Negative Marking v5
Martin Bush
 
STATUse the information below to answer Questions 1 through 4..docx
STATUse the information below to answer Questions 1 through 4..docxSTATUse the information below to answer Questions 1 through 4..docx
STATUse the information below to answer Questions 1 through 4..docx
rafaelaj1
 

Similar to Sensitivity specificity (20)

Algebra unit 9.6.2
Algebra unit 9.6.2Algebra unit 9.6.2
Algebra unit 9.6.2
 
Algebra unit 9.6.2
Algebra unit 9.6.2Algebra unit 9.6.2
Algebra unit 9.6.2
 
Applied Math 40S February 25, 2008
Applied Math 40S February 25, 2008Applied Math 40S February 25, 2008
Applied Math 40S February 25, 2008
 
Slides February 23rd
Slides February 23rdSlides February 23rd
Slides February 23rd
 
Statistik Chapter 5 (1)
Statistik Chapter 5 (1)Statistik Chapter 5 (1)
Statistik Chapter 5 (1)
 
Statistik Chapter 5
Statistik Chapter 5Statistik Chapter 5
Statistik Chapter 5
 
Pre-Cal 40S Slides January 10, 2008
Pre-Cal 40S Slides January 10, 2008Pre-Cal 40S Slides January 10, 2008
Pre-Cal 40S Slides January 10, 2008
 
Frontiers of Computational Journalism week 7 - Randomness and Statistical Sig...
Frontiers of Computational Journalism week 7 - Randomness and Statistical Sig...Frontiers of Computational Journalism week 7 - Randomness and Statistical Sig...
Frontiers of Computational Journalism week 7 - Randomness and Statistical Sig...
 
1. In the construction of decision trees, which of the following s.docx
1. In the construction of decision trees, which of the following s.docx1. In the construction of decision trees, which of the following s.docx
1. In the construction of decision trees, which of the following s.docx
 
Unit 11.2 theoretical probability
Unit 11.2 theoretical probabilityUnit 11.2 theoretical probability
Unit 11.2 theoretical probability
 
7.8 simple probability 2
7.8 simple probability   27.8 simple probability   2
7.8 simple probability 2
 
Stat 230 Summer 2014 – Final Exam Page 1 .docx
Stat 230          Summer 2014 – Final Exam Page 1  .docxStat 230          Summer 2014 – Final Exam Page 1  .docx
Stat 230 Summer 2014 – Final Exam Page 1 .docx
 
Introduction to probability
Introduction to probabilityIntroduction to probability
Introduction to probability
 
13-statistics.pptx
13-statistics.pptx13-statistics.pptx
13-statistics.pptx
 
Negative Marking v5
Negative Marking v5Negative Marking v5
Negative Marking v5
 
04 performance metrics v2
04 performance metrics v204 performance metrics v2
04 performance metrics v2
 
Quantitative Methods for Lawyers - Class #15 - R Boot Camp - Part 2 - Profess...
Quantitative Methods for Lawyers - Class #15 - R Boot Camp - Part 2 - Profess...Quantitative Methods for Lawyers - Class #15 - R Boot Camp - Part 2 - Profess...
Quantitative Methods for Lawyers - Class #15 - R Boot Camp - Part 2 - Profess...
 
STATUse the information below to answer Questions 1 through 4..docx
STATUse the information below to answer Questions 1 through 4..docxSTATUse the information below to answer Questions 1 through 4..docx
STATUse the information below to answer Questions 1 through 4..docx
 
Probability
ProbabilityProbability
Probability
 
A/B testing problems
A/B testing problemsA/B testing problems
A/B testing problems
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 

Sensitivity specificity