Bayes’ theorem is given by: P(Y=k∣X=x)=∑l=1Kπlfl(x)πkfk(x) For multiple events: P(Bi∣A)=∑k=0nP(Bk)P(A∣Bk)P(Bi)P(A∣Bi)