Bayes' theorem
Bayes' rule in odds form

Bayes' theorem in odds form is:

where

is called the Bayes factor or likelihood ratio. The odds between two events is simply the ratio of the probabilities of the two events. Thus

Thus, the rule says that the posterior odds are the prior odds times the Bayes factor, or in other words, the posterior is proportional to the prior times the likelihood.

In the special case that A 1 = A {\displaystyle A_{1}=A} and A 2 = ¬ A {\displaystyle A_{2}=\neg A}, one writes O (A) = O (A: ¬ A) = P (A) / (1 − P (A)) {\displaystyle O(A)=O(A:\neg A)=P(A)/(1-P(A))}, and uses a similar abbreviation for the Bayes factor and for the conditional odds. The odds on A {\displaystyle A} is by definition the odds for and against A {\displaystyle A}. Bayes' rule can then be written in the abbreviated form

or, in words, the posterior odds on A {\displaystyle A} equals the prior odds on A {\displaystyle A} times the likelihood ratio for A {\displaystyle A} given information B {\displaystyle B}. In short, posterior odds equals prior odds times likelihood ratio.

For example, if a medical test has a sensitivity of 90% and a specificity of 91%, then the positive Bayes factor is Λ + = P (True Positive) / P (False Positive) = 90 % / (100 % − 91 %) = 10 {\displaystyle \Lambda _{+}=P({\text{True Positive}})/P({\text{False Positive}})=90\%/(100\%-91\%)=10}. Now, if the prevalence of this disease is 9.09%, and if we take that as the prior probability, then the prior odds is about 1:10. So after receiving a positive test result, the posterior odds of actually having the disease becomes 1:1, which means that the posterior probability of having the disease is 50%. If a second test is performed in serial testing, and that also turns out to be positive, then the posterior odds of actually having the disease becomes 10:1, which means a posterior probability of about 90.91%. The negative Bayes factor can be calculated to be 91%/(100%-90%)=9.1, so if the second test turns out to be negative, then the posterior odds of actually having the disease is 1:9.1, which means a posterior probability of about 9.9%.

The example above can also be understood with more solid numbers: Assume the patient taking the test is from a group of 1000 people, where 91 of them actually have the disease (prevalence of 9.1%). If all these 1000 people take the medical test, 82 of those with the disease will get a true positive result (sensitivity of 90.1%), 9 of those with the disease will get a false negative result (false negative rate of 9.9%), 827 of those without the disease will get a true negative result (specificity of 91.0%), and 82 of those without the disease will get a false positive result (false positive rate of 9.0%). Before taking any test, the patient's odds for having the disease is 91:909. After receiving a positive result, the patient's odds for having the disease is

which is consistent with the fact that there are 82 true positives and 82 false positives in the group of 1000 people.
detectable_content:postscript