A partition consists of disjoint cases that exhaust the sample space. For cases \(H_i\), the probability of evidence \(E\) is \(\sum_i P(H_i)P(E\mid H_i)\), found by summing the evidence branch from every case.
Bayes’ theorem gives \(P(H_i\mid E)=P(H_i)P(E\mid H_i)/P(E)\) when the evidence has positive probability. The denominator includes all ways to obtain the evidence.
List each possible value \(x\) beside its probability \(p(x)\). All probabilities must be nonnegative and sum to 1. Then \(E(X)=\sum_x x p(x)\) is the weighted mean over repeated trials.