Precision from sensitivity, specificity and prevalence

How to compute precision from sensitivity, specificity and prevalence

Recently I met task to compute precision from sensitivity, specificity and prevalence. There is nice formula about that.

So, first of all our conditions:

Then several steps to get a formula:

So, say, we have sensitivity of the test 99,8%, specificity 98% and a prevalence of population 2% (2% are ill). Then Precision (positive predictive value, the probability the test is positive) is 9%: