# Why don't we use the harmonic mean of sensitivity and specificity?

There is this question on the F-1 score, asking why we compute the harmonic mean of precision and recall rather than its arithmetic mean. There were good arguments in the answers in favor of the harmonic mean, in particular that it is suited to take the average of ratios and drops to zero whenever one of the other does.

Which begs the question, why is the harmonic mean of sensitivity and specificity not a thing (to my knowledge)? There are both ratios and the same fine arguments could apply.

• – Dave
Commented Mar 22, 2023 at 21:47
• Specificity, as a KPI to be optimized, presupposes a very specific cost structure (as well as that there are only two actions possible, a heroic assumption). Sensitivity assumes a different, but still specific cost structure. Optimizing the harmonic mean assumes yet a third cost structure. Compare this. It is far better to create probabilistic classifications and cleanly separate the modeling from the decision aspect, where costs of possible actions enter in the decision-making step. See here. Commented Mar 23, 2023 at 7:20
• I understand that harmonic and arithmetic means assume different cost structure. My question is why they are consistently chosen differently for the se/sp and p/r pairs. Why the difference in treatment, what is the fundamental difference between the two that underlies this? Commented Mar 23, 2023 at 10:15

Suppose I'm deciding whether 1000 people have cancer, but I win $$1 for each correct guess and I want to maximise money. Unlike positive predictive value, sensitivity and specificity and purely measures of how good the *test* is and are independent of the *data.* Suppose I want a test that will be good regardless of the data because I have no idea whether 90% or 10% of the 1000 have cancer. If I use a test with 80% sensitivity and 30% specificity (higher arithmetic mean), I win either$$350 or $$750, average$$550. If I use a test with 50% sensitivity and 50% specificity (higher harmonic mean), I win \$500.