The definition of conditional probability allows us to immediately obtain the following fundamental
In this case
with
it follows that:
Bayes' theorem is one of the fundamental elements of the subjectivist, or personal, approach to probability and statistical inference.
The system of alternatives with
is often interpreted as a set of causes; given the initial probabilities of the different causes, Bayes' theorem makes it possible to assign probabilities to the causes given an effect
.
The probabilities
with
can be interpreted as the a priori knowledge (usually denoted by
), that is, the knowledge available before conducting a statistical experiment.
The probabilities
with
are interpreted as the likelihood, or information concerning
, that can be acquired by conducting a suitable statistical experiment.
Bayes' formula therefore suggests a mechanism for learning from experience: combining some a priori knowledge about event
, given by
, with the knowledge acquired from a statistical experiment, given by
, leads to improved knowledge, given by
, of event
, also called the a posteriori probability after the experiment has been performed.
For example, we may have the probability distribution for the color of apples, as well as that for oranges.
Using the notation introduced earlier in the theorem, let denote the state in which the fruit is an apple,
the condition in which the fruit is an orange, and let
be a random variable representing the color of the fruit.
With this notation,
represents the density function for the color event
conditional on the state being an apple, and
conditional on it being an orange.
During training, it is possible to construct the probability distribution of for
apple or orange.
In addition to this information, the prior probabilities
and
are always known; they simply represent the total number of apples and oranges, respectively.
What we seek is a formula giving the probability that a fruit is an apple or an orange, given that a certain color has been observed.
Bayes' formula (5.7) provides precisely this:
In general, for classes, the Bayesian estimator can be defined by a discriminant function:
It is also possible to calculate an index, given the prior knowledge of the problem, indicating how likely this reasoning is to produce errors.
The probability of making an error given an observed feature depends on the maximum value of the
distribution curves at
:
| (5.10) |
Paolo medici