Correcting an Observed Flag Rate for an Imperfect Spam Classifier
Last updated: November 29, 2026
Quick Overview
A spam classifier with 90% sensitivity and 97% specificity flags 5% of a random sample of Facebook Groups posts. Estimate the true spam prevalence and explain how uncertainty in the classifier's error rates affects the estimate.
Meta
November 29, 20260
0
0 solved
A spam classifier with 90% sensitivity and 97% specificity flags 5% of a random sample of Facebook Groups posts. Estimate the true spam prevalence and explain how uncertainty in the classifier's error rates affects the estimate.
Meta publishes prevalence metrics for harmful content, and integrity data scientists must turn imperfect classifier output into honest prevalence estimates. The interviewer wants the misclassification correction derived from first principles and a clear sense of when it becomes unstable.
What the Interviewer Expects
- Writes the observed flag rate as a mixture of true and false positives
- Solves for prevalence (Rogan-Gladen estimator)
- Computes the numeric estimate correctly
- Explains instability when sensitivity plus specificity is near 1 or when flags are below the false positive rate
- Proposes estimating error rates from labeled samples
Key Topics to Cover
How to Approach This
- Define your hypotheses (H0 and H1) clearly before performing any test.
- Calculate required sample size BEFORE running an experiment, using power analysis.
- Remember the Central Limit Theorem: sample means become approximately normal with large n.
- Watch for Simpson's paradox. Always segment data by key dimensions.
- Distinguish between statistical significance and practical significance.
Possible Follow-up Questions
- What happens if the observed rate is 2%?
- How would you get a confidence interval that includes uncertainty in sensitivity and specificity?
- Why might specificity measured on reviewed content not apply to the random sample?
- Would you rather report prevalence from human labels on a random sample directly?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Browse Statistics QuestionsSample Answer
Clarify
Let true prevalence be , sensitivity , specificity (so false positive rate 3%), observed flag rate . The sample is random over posts, and I assume error rates are the s...
Approach
Every flag is either a true positive or a false positive: . Solve for ....