Bayes' Theorem - NayiPathshala

Breaking

Total Pageviews

Loading...

Search Here

1/05/2018

Bayes' Theorem

Bayes' Theorem
We may use Example 3.5 to motivate another important result. Suppose that
one item is chosen from the stockpile and is found to be defective. What is the
probability that it was produced in factory l ?
Using the notation introduced previously, we require P(B 1 I A). We can evaluate
this probability as a consequence of the following discussion. Let Bi. .. . , Bk be
a partition of the sample space S and let A be an event associated with S. Applying
the definition of conditional probability, we may write

                           \[\text{P(}\frac{{{\text{B}}_{i}}}{A}\text{A) =}\frac{p(\frac{A}{{{B}_{i}}})p({{B}_{i}})}{\sum\limits_{i=1}^{k}{p(\frac{A}{{{B}_{i}}})p({{B}_{i}})}}\]                              i = l, 2, ... 'k. (3.5)

This result is known as Bayes' theorem. It is also called the formula for the
probability of "causes." Since the B;'s are a partition of the sample space, one
and only one of the events Bi occurs. (That is, one of the events Bi must occur and
only one can occur.) Hence the above formula gives us the probability of a particular
Bi (that is, a "cause"), given that the event A has occurred. In order to
apply this theorem we must know the values of the P(Bi)'s. Quite often these
values are not known, and this limits the applicability of the result. There has been
considerable controversy about Bayes' theorem. It is perfectly correct mathematically;
only the improper choice for P(Bi) makes the result questionable.
Returning to the question posed above, and now applying Eq. (3.5), we obtain


\[P(\frac{{{B}_{I}}}{A})=\frac{\text{(0}\text{.02)(1/2)}}{\text{(0}\text{.02)(1/2) + (0}\text{.02)(1/4) + (0}\text{.04)( 1/4) }}\text{= 0}\text{.40}\]

 we have solutions of the same salt, but of different concentrations. Suppose that the total volume of the solutions is one liter. Denoting the volume of the solution in the ith beaker by P(Bi) and denoting the concentration of the salt in the ith beaker by P(A/Bi), we find that Eq. (3.5) yields the proportion of the entire amount of salt which is found in the ith beaker. The following illustration of Bayes' theorem will give us an opportunity to introduce the idea of a tree diagram, a rather useful device for analyzing certain problems. Suppose that a large number of containers of candy are made up of two types, say A and B. Type A contains 70 percent sweet and 30 percent sour ones while for type B 'these percentages are reversed. Furthermore, suppose that 60 percent of all candy jars are of type A while the remainder are of type B. You are now confronted with the following decision problem. A jar of unknown type is given to you. You are allowed to sample one piece of candy (an admittedly unrealistic situation but one which will allow us to introduce the relevant ideas without getting too involved), and with this information, you must decide whether to guess that type A or type B has been offered to you. The following "tree diagram" (so called because of the various paths or branches which appear) will help us to analyze the problem. (sW and S0 stand for choosing a sweet or sour candy, respectively.)


Let us make a few computations:

\[\begin{align}
  & \text{P(A) = 0}\text{.6; P(B) = 0}\text{.4; P(}\frac{{{\text{S}}_{w}}}{A}\text{) = 0}\text{.7;} \\
 & \text{P(So I A)= 0}\text{.3; P(}\frac{{{\text{S}}_{0}}}{B}\text{) 0}\text{.3; P(}\frac{{{\text{S}}_{0}}}{B}\text{) = 0}\text{.7}\text{.} \\
\end{align}\]

What we really wish to know is P(A / sW ), P(A /S0 ), P(B / sW ), and P(B / S0 ).
That is, suppose we actually pick a sweet piece of candy. What decision would we

be most tempted to make? Let us compare P(A / sW ) and P(B / sW ). Using Bayes' formula we have


\[\begin{align}
  & \text{P(}\frac{A}{{{S}_{w}}}\text{ )}=\frac{\text{P(}\frac{{{S}_{w}}}{A}\text{ )P(A)}}{\text{P(}\frac{{{S}_{w}}}{A}\text{ )P(A)+P(}\frac{{{S}_{w}}}{B}\text{ )P(B)}}=\frac{\text{(0}\text{.7)(0}\text{.6)}}{\text{(0}\text{.7)(0}\text{.6) + (0}\text{.3)(0}\text{.4)}}=\frac{7}{9} \\
 &  \\
 &  \\
\end{align}\]

A similar computation yields P(B I Sw) = 2/9.

Thus, based on the evidence we have (i.e., the obtaining of a sweet candy) it is
2t times as likely that we are dealing with a container of type A rather than one
of type B. Hence we would, presumably, decide that a container of type A was
involved. (We could, of course, be wrong. The point of the above analysis is
that we are choosing that alternative which appears most likely based on the
limited evidence we have.)
In terms of the tree diagram, what was really required (and done) in the preceding
calculation was a "backward" analysis. That is, given what we observed,
Sw in this case, how probable is it that type A is involved?
A somewhat more interesting situation arises if we are allowed to choose two
pieces of candy before deciding whether type A or type B is involved. In this case,

the tree diagram would appear as follows.


No comments:

Post a Comment