Key Takeaways: Logistic Regression & Binary Classification
2. Logistic Regression Basics
- Predicts the probability that an event occurs:
[ p = ]
- Works by modeling log-odds, creating a linear relationship with predictors.
- Coefficients become odds ratios when exponentiated (easy interpretation).
3. Applying Logistic Regression
- Fits classification tasks: recidivism, disease risk, loan default, spam detection.
- Model predicts probabilities → we must choose a threshold to classify 0/1.
- Threshold choice depends on relative costs of false positives vs. false negatives.
4. Evaluating Binary Predictions
- Confusion matrix summarizes TP, FP, TN, FN.
- Key metrics:
- Sensitivity (Recall): TP / (TP + FN)
- Specificity: TN / (TN + FP)
- Precision: TP / (TP + FP)
- No single metric fits all policy contexts—depends on consequences.
5. Threshold Trade-offs
- Lower threshold → higher sensitivity, more false positives.
- Higher threshold → higher specificity, more false negatives.
- Threshold selection is a policy decision, not a statistical one.
6. ROC Curves & AUC
- ROC curve visualizes sensitivity vs. false positive rate across thresholds.
- AUC measures overall discrimination ability:
- 0.5 = random guessing
- 0.7–0.8 = acceptable
- 0.8–0.9 = good
- 0.9+ = excellent
- ROC does not select thresholds; it only summarizes performance.
7. Fairness & Equity Considerations
- Models can have similar overall accuracy but unequal error rates across groups.
- False positive rate disparities can produce harmful, unequal impacts.
- Case example: COMPAS recidivism tool (higher false positive rate for Black defendants).
- Thresholds may need group-level evaluation to avoid disparate impact.
8. Choosing a Threshold in Practice
- Must consider:
- Policy goals
- Costs of errors
- Stakeholder impacts
- Group-level fairness
- Best practice:
- Evaluate multiple thresholds
- Compare metrics across groups
- Examine real-world consequences
- Document decisions transparently
9. Core Ideas to Remember
- Logistic regression predicts probabilities, not classes.
- Classification requires choosing a threshold, and this is context-dependent.
- Evaluation must use multiple metrics, not accuracy alone.
- ROC/AUC help assess discrimination quality but do not dictate thresholds.
- Error rates can differ by group—even with similar accuracy—raising equity issues.
- Policy-sensitive applications (e.g., criminal justice) require extra caution.