Beruflich Dokumente
Kultur Dokumente
B. Mag-ili Date:
September 1, 2010
Course: BSIT -3 Subject: Opersea
Thomas Bayes
Bayes' theorem
In probability theory and applications, Bayes' theorem shows the relation between a conditional
probability and its reverse form. For example, the probability of a hypothesis given some observed
pieces of evidence and the probability of that evidence given the hypothesis. This theorem is named
for Thomas Bayes (pronounced /ˈbeɪz/ or "bays") and often called Bayes' law or Bayes' rule. Bayes'
theorem relates the conditional and marginal probabilities of events A and B, where B has a non-
vanishing probability:
P(A) is the prior probability or marginal probability of A. It is "prior" in the sense that it
does not take into account any information about B.
P(A|B) is the conditional probability of A, given B. It is also called the posterior
probability because it is derived from or depends upon the specified value of B.
P(B|A) is the conditional probability of B given A. It is also called the likelihood.
P(B) is the prior or marginal probability of B, and acts as a normalizing constant.
Bayes' theorem in this form gives a mathematical representation of how the conditional probability
of event A given B is related to the converse conditional probability of B given A.
Bayes' theorem derived via conditional probabilities
To derive Bayes' theorem, start from the definition of conditional probability. The probability of the event
A given the event B is
This lemma is sometimes called the product rule for probabilities. Discarding the middle
term and dividing both sides by P(B), provided that neither P(B) nor P(A) is 0, we obtain
Bayes' theorem:
Of course, this lemma is symmetric in A and B, since A and B are arbitrarily-chosen symbols,
and dividing by P(A), provided that it is non-zero, gives a statement of Bayes' theorem in which the two
symbols have changed places.
Consider now the defining relation for the conditional probability P(An|B), where the Ai are mutually
exclusive and their union is the entire sample space. Substitution of P(An)P(B|An) in the numerator of equation (4)
and substitution of the right-hand side of the law of total probability in the denominator yields a result known as
Bayes’s theorem (after the 18th-century English clergyman Thomas Bayes) or the law of inverse probability.
Bayes' theorem describes the relationships that exist within an array of simple and conditional
probabilities. For example: Suppose there is a certain disease randomly found in one-half of one
percent (.005) of the general population. A certain clinical blood test is 99 percent (.99) effective in
detecting the presence of this disease; that is, it will yield an accurate positive result in 99 percent of the
cases where the disease is actually present. But it also yields false-positive results in 5 percent (.05) of
the cases where the disease is not present. The following table shows (in red) the probabilities that are
stipulated in the example and (in blue) the probabilities that can be inferred from the stipulated
information:
the probability that the disease will be present in any particular
P(A) = .005
person
the probability that the disease will not be present in any particular
P(~A) = 1—.005 = .995
person
P(B|A) = .99 the probability that the test will yield a positive result [B] if the
disease is present [A]
the probability that the test will yield a negative result [~B] if the
P(~B|A) = 1—.99 = .01
disease is present [A]
the probability that the test will yield a positive result [B] if the
P(B|~A) = .05
disease is not present [~A]
the probability that the test will yield a negative result [~B] if the
P(~B|~A) = 1—.05 = .95
disease is not present [~A]
Given this information, Bayes' theorem allows for the derivation of the two
simple probabilities
which in turn allows for the calculation of the four remaining conditional
probabilities
To perform calculations using Bayes' theorem, enter the probability for one or the other of
the items in each of the following pairs (the remaining item in each pair will be calculated
automatically). A probability value can be entered as either a decimal fraction such as .25
or a common fraction such as 1/4. Whenever possible, it is better to enter the common
fraction rather than a rounded decimal fraction: 1/3 rather than .3333; 1/6 rather
than .1667; and so forth.
P(A) or P(~A) After the three probability values (one from
P(B|~A) or P(~B|~A) each pair) have been entered, click the cursor
P(B|A) or P(~B|A) anywhere in the gray field of the table to
complete the intermediate calculations, then
click the "Calculate" button. ~~Note that no
probability value can be less than 0.0 or greater
than 1.0.