# What is the difference between Bayes theorem and Total Probability theorem?

Total probability theorem:
If $E_1,E_2,E_3,.............E_n$ are mutually exclusive and exhaustive events,
with non zero probability of a random experiment and
if $A$ is any arbitrary event of the same random experiment which occurs
with $E_1\:or\:E_2\:or.......or\:.E_n$ so that $P(A)\neq 0$, then
$P(A)=P(E_1).P(A/E_1)+P(E_2).P(A/E_2)+...........P(E_n).P(A/E_n)$
$i.e.,\:P(A)=\sum_{i=1}^{n}\:P(E_i).P(A/E_i)$
Baye's Theorem:
If $E_1,E_2,E_3,.............E_n$ are mutually exclusive and exhaustive events,
with non zero probability of a random experiment and
if $A$ is any arbitrary event of the same random experiment which occurs
with $E_1\:or\:E_2\:or.......or\:.E_n$ so that $P(A)\neq 0$, then
$P(E_i/A)=\large\frac{P(E_i).P(A/E_i)}{P(A)}$
where $P(A)=$Total probability$=\sum_{i=1}^{n}\:P(E_i).P(A/E_i)$