Bayes Rule^:

Is a critical tool for avoiding errors while working with skewed data. Assuming an event A, such as a percentage of patients with cancer, or the number of actual drug users in a population. And an event B which is a positive test result for cancer, drug use, whatever... If the test is positive when the actual event has occurred some percentage of the time p(B|A), and negative when it should be by some percentage p(¬B|¬A) aka the opposite of it being positive when it should not be p(B|¬A), Bayes Rule tells us what the actual chance that the event A has happened give a positive test result B.

p(A|B) = ( p(B|A) * p(A) ) / p(B)

Where A and B are events. p(A) and p(B) are the probabilities of those events. p(B|A) is the probability of seeing B if A is true. p(B) can be calculated as p(B|A) * p(A) + p(B|¬A) * p(¬A) where ¬ denotes NOT. e.g. p(¬A) = 1 - p(A)

The javascript in this form calculates it. Values are preloaded from the cMV1.0 Test
Test Sensitivity p(B|A) % Test specificity p(¬B|¬A) % Probability A % Actual percent chance of A given B %

Also: