Events E1, E2, E3 and S be the events defined as follows:
E1: The patient had disease d1
E2: The patient had disease d2
E3: The patient had disease d3
S: The patient showed the symptom
E1, E2, and E3 are mutually exclusive and exhaustive events.
Now,
= Probability that the patient showed symptom given that patient had disease d1 =
= Probability that the patient showed symptom given that patient had disease d2 =
= Probability that the patient showed symptom given that patient had disease d3 =
Using Bayes theorem, we have
Probability that patient had disease d1 such that symptom of d1 showed =
Probability that patient had disease d2 such that symptom of d2 showed =
Probability that patient had disease d3 such that symptom of d3 showed =
Thus, the patient is most likely to have the disease d1.