A test result is accurate if the result equals to the truth. Consider the pair of random variables: (X, Y),
X is the true status of the patients, can be either + (HIV) or - (non HIV).
Y is the test result of the patient from the hospital, + (test says HIV +) or - (test says HIV -).
There 4 possible non-overlapping results of the test:
(+, +), (-, -), (+, -) or (-, +).
The first two cases are accurate (i.e., X=Y), the last two cases are failures. The accuracy of the test is defined as P(X=Y) or statistically, #of (++) and (--) over the total # of samples.