Bayes' theorem is used to adjust the probability of having a disease based on the results of a diagnostic test.