Probabilities sorted high to low: 0.95, 0.90, 0.85, 0.80, 0.70, 0.65, 0.55, 0.45, 0.40, 0.30, 0.20, 0.10; the true spam labels are 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0 — five spam, seven not. Predict 1 when p ≥ t:
| t | TP | FP | FN | TN | Precision | Recall | F1 | Accuracy |
|---|
| 0.30 | 5 | 5 | 0 | 2 | 0.5000 | 1.0000 | 0.6667 | 0.5833 |
| 0.50 | 5 | 2 | 0 | 5 | 0.7143 | 1.0000 | 0.8333 | 0.8333 |
| 0.80 | 3 | 1 | 2 | 6 | 0.7500 | 0.6000 | 0.6667 | 0.7500 |
| 0.90 | 2 | 0 | 3 | 7 | 1.0000 | 0.4000 | 0.5714 | 0.7500 |
Watch what each move buys. Raising t from 0.5 to 0.8 removes the false alarm at 0.85·(y=0) and the one at 0.70·(y=0), improving precision from 0.7143 to 0.75, but it also drops the true spam at 0.65 and 0.55, cutting recall from 1.0 to 0.6. Accuracy alone would have called t = 0.9 (0.75) worse than t = 0.5 (0.8333) while its precision is perfect — accuracy hides which errors you are making.