The definition of conditional probability allows us to immediately obtain the following fundamental result:
In this case,
with
will yield:
The 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, and Bayes' theorem, given the prior probabilities of the different causes, allows for the assignment of probabilities to the causes given an effect
. The probabilities
with
can be interpreted as the a priori knowledge (usually denoted by
), which is the knowledge available before conducting a statistical experiment. The probabilities
with
are interpreted as the likelihood or information regarding
that can be obtained by performing an appropriate statistical experiment. Thus, Bayes' formula suggests a mechanism for learning from experience: by combining some a priori knowledge about the event
provided by
with the knowledge that can be acquired from a statistical experiment given by
, one arrives at a better understanding represented by
of the event
, also referred to as posterior probability after conducting the experiment.
We can have, for example, the probability distribution for the color of apples, as well as that for oranges. To use 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 event color
conditioned on the fact that the state is apple, and
that it is orange.
During the training phase, it is possible to construct the probability distribution of for
apple or orange. In addition to this knowledge, the prior probabilities
and
are always known, which simply represent the total number of apples compared to the number of oranges.
What we are looking for is a formula that indicates the probability of a fruit being an apple or an orange, given that a certain color has been observed.
The Bayes' formula (4.7) allows precisely this:
In general, for classes, the Bayesian estimator can be defined as a discriminant function:
It is also possible to calculate an index, given the prior knowledge of the problem, indicating how much this reasoning will be subject to errors. The probability of making an error given an observed feature will depend on the maximum value of the
curves of the distribution in
:
| (4.10) |
Paolo medici