In doing an expert task, such as medical diagnosis, the goal is to determine identifications (diseases) given observations (symptoms). Bayes' Theorem provides such a relationship.

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

Suppose: *A* = Patient has measles, *B* = has a rash

Then:
*P(measles/rash) =
P(rash/measles) * P(measles) / P(rash)*

The desired diagnostic relationship on the left can be calculated based on the known statistical quantities on the right.