This section presents some probability relations that will be useful in the next section.
In the discrete case, we define the probability mass function (probability mass function, PMF) as
 |
(2.82) |
whereas, in the continuous case,
denotes the probability density function (probability density function, PDF).
Bayes' theorem (or Bayes' rule) is obtained by combining the multiplication rule with the law of total probability.
Starting from the definition of conditional probability
(multiplication rule), we obtain:
 |
(2.83) |
and, conversely,
 |
(2.84) |
noting that
gives
 |
(2.85) |
The same reasoning can be applied to three variables:
 |
(2.86) |
which gives Bayes' rule
 |
(2.87) |
showing how dependence on a third variable
propagates.
Another important relation, used in the next chapter, is the law of total probability (law of total probability):
 |
(2.88) |
or, in the continuous case,
 |
(2.89) |
the marginal density of
.
Paolo medici
2026-10-19