bpet said:
D H said:
P(R|Hi,E) is the conditional probability of getting a red assuming hypothesis i and given the evidence and given the empirical priors:
P(R|H_i,E) = P(R|H_i)P(H_i|E)
Not true (e.g. by a Venn diagram argument). Perhaps you meant to write
P(R,H_i|E) = P(R|H_i,E)P(H_i|E)
so that
P(R|E) = \sum_i P(R,H_i|E)
Cexy said:
Do you have a mistake in calculating the final probabiity P(R|E)? It seems as though you've calculated
P(R|E) = \sum_i P(R|Hi, E)
whereas you should really be calculating
P(R|E) = \sum_i P(R|Hi,E) P(Hi|E)
No and no.
What I should be calculating is exactly what is in that table.
Suppose you have partitioned the sample space Ω into subsets {
Ai} such that
1. Each
Ai is a subset of Ω,
2. The union of all
Ai is Ω, and
3. The intersection of any two members of {
Ai} is the empty set.
Then the probability of some event B is
P(A) = \sum_i P(A|B_i)P(B_i)
This is the total probability theorem. See
http://www.cs.cornell.edu/courses/cs280/2004sp/probability3.pdf (Note: This reference also discusses Bayes' Theorem.)
In the problem at hand, we are randomly drawing one M&M from a partially emptied bag of candies that contains five candies of which zero to five are red. There are six mutually exclusive possibilities: The contents of the bag now include exactly zero (
A0), one (
A1), two (
A2), three (
A3), four (
A4), of five (
A5) red candies. Because ∪
Ai=Ω and
Ai∩
Aj ∀
i≠
j, this a partition of the sample space. Thus the total probability that the next candy drawn from the bag is red is
P(R) = \sum_{i=0}^5 P(R|A_i)P(A_i)
The conditional probabilities
P(
R|
Ai) are easily calculated: They are
i/5. The only remaining issue is to calculate the probabilities
P(
Ai). This has already been done: The conditional probabilities
P(
Hi|
E) are the best guesses available regarding the probabilities
P(
Ai). Thus
<br />
P(R) =<br />
\sum_{i=0}^5 P(R|A_i)P(A_i) =<br />
\sum_{i=0}^5 P(R|H_i\,\text{and}\,E)P(H_i|E)<br />
\,\,\text{where}\,P(R|H_i\,\text{and}\,E)=i/5
It is often handy to give those somewhat awkward
P(
R|
Hi and
E)
P(
Hi|
E) a name. In many texts and articles this name is
P(
R|
Hi,
E).