Sensitivity, Specificity and Predictive Value

Diagnostic tests are rarely perfect and all-conclusive. Therefore the we need to able to interpret the probability of obtaining different results and calculating their predictive values. In medical diagnostic tests, the lab technicians for testing devices look for presence, absense or abnormal quantities for specific substances (molecules). Suppose we wish to analyze a new device which detects AIDS virus. There could be 4 possible results:

Disease present Disease Absent
Test Positive True Positive (TP) False Positive (FP)
Test Negative True Negative (TN) False Negative (FN)

Sensitivity: is the proportion of persons who are infected with the AIDS virus and were diagnosed to have the disease.
P(T+|D+) = TP / (TP + FN)

Specificity: is the proportion of patients without disease who test negative.
P(T-|D-) = TN / (TN + FP)

Sensitivity and specificity describe how well a test discriminates between persons with and without and disease. Given that someone is tested positive for AIDS with this new device, what is that probability that he actually has the disease. In other words, what is the predictive value of this test.

Predictive value of a positive test: is the proportion of persons with the disease who were tested positive.
P(D+|T+) = TP / (TP + FP)

Predictive value of a negative test: is the proportion of healthy persons diagnosed to not have the disease.
P(D-|T-) = TN / (TN + FN)