If you double the positive instances in a test set by duplicating them, how do precision, recall, and accuracy change?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: medium
Interview Round: Other
A binary classifier has already been trained and its decision threshold is fixed. You evaluate it on a test set, then build a second test set by duplicating every positive instance, so each positive row appears twice and the negatives are unchanged. How do precision, recall, and accuracy change between the two evaluations?
```hint Count the cells
Write out what happens to TP, FN, FP and TN when every positive row appears twice, then put the new counts into each formula.
```
```hint Accuracy has two parts
Try writing accuracy in terms of the model's accuracy on positives, its accuracy on negatives, and the share of positives in the set.
```
### What a Strong Answer Covers
- Which confusion-matrix cells double and which stay fixed, and why the predictions on the copies match the originals
- The effect on recall and on precision, shown with the formulas, including the edge cases where precision cannot move
- The direction of the accuracy change and the condition that decides it
- Which metrics depend on class prevalence and what that implies for how a test set should be built
### Follow-up Questions
- What happens to F1, ROC-AUC and PR-AUC under the same change?
- If you duplicate the negatives instead, how does each metric move?
- Your labeled test set is 50% positive but production traffic is 1% positive. How would you estimate the precision the model will have in production?
- How does duplicating positives in the training set differ in effect from duplicating them in the test set?
Overview: Asks how duplicating every positive example in a test set changes precision, recall, and accuracy for a fixed binary classifier. Tests confusion-matrix reasoning and whether you know which evaluation metrics depend on class prevalence.