# Is this application of Bayes' theorem correct?

I want to use Bayes' theorem to calculate the probability that a totally hypothetical religion H is true considering the fact in light of two independent pieces of evidence. I'll make up values for the example, but let's say the prior probability of H being true $P(H) = 0.01$ (let's say one of 100 religions which includes H must be true).

For the first piece of evidence, a hidden skip code in H's ancient scriptures indicates that the ancients had supernatural access to knowledge of future events. If H really were true, we would expect about an 80% chance that some kind of code like that would exist. If H were not true though, there would only be a 10% chance that a code like that would randomly be present anyway. So I'll say $P(E1|H) = 0.8$ and $P(E1|H') = 0.1$.

For the second piece of evidence, archeologists discovered ruins which contradict with a claim in H's scriptures. If H were not true, we would expect a 50% chance of finding some such ruins. And there's only a 1% chance that the archeologists could be wrong or that it is theologically acceptable for this contradiction to exist. So I'll say $P(E2|H) = 0.01$ and $P(E2|H') = 0.5$.

So then I have an equation for Bayes' theorem considering these two separate observations like this:

$$P(H|E1, E2) = \frac{P(E1|H) * P(E2|H) * P(H)}{P(E1|H) * P(E2|H) * P(H) + P(E1|H’) * P(E2|H’) * P(H’)}$$

$$P(H|E1, E2) = \frac{0.8 * 0.01 * 0.01}{0.8 * 0.01 * 0.01 + 0.1 * 0.5 * 0.99}$$

$$P(H|E1, E2) = 0.0016$$

Is this math okay? Or is there a problem calculating it like this, and if so what would be the correct approach?

• A minor quibble: you are not assuming the events are independent. You are assuming they are conditionally independent given $H$ and conditionally independent given $H'$. They are not unconditionally independent. Commented Aug 1, 2017 at 21:44
• @spaceisdarkgreen can you elaborate? How minor of a quibble is it, how significant are the implications, and is there a better calculation? Commented Aug 2, 2017 at 3:20
• Pretty minor. I'm just saying that you've used $P(E_1, E_2|H) = P(E_1|H)P(E_2|H)$ and similarly for $H'$ and you didn't state the assumptions behind that clearly (That $E_1$ and $E_2$ are conditionally independent given $H$ and also independent conditional on $H'$.) I think those assumptions are fine and natural. I also added that this does not mean $E_1$ and $E_2$ are independent, and in fact they aren't, as you can calculate $P(E_1,E_2) \ne P(E_1)P(E_2).$ (This is to be expected: if you found a bible code, H is more probable, so you'd be less likely to find the archeological evidence.) Commented Aug 2, 2017 at 3:58
• @spaceisdarkgreen Oh ok, maybe I'm not so good with the terminology. So I said the observations are independent even though you'd get a better sense of whether one would happen if you knew about the other one. So I should say the events are conditionally independent, meaning if you know whether H is true, then E1 doesn't change P(E2), but that's fine. Is that it? Commented Aug 2, 2017 at 4:58
• Yes, that's right Commented Aug 2, 2017 at 11:57

You've got the correct approach, you are applying Bayes theorem correctly for the numbers in your example.

• This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post. - From Review Commented Jul 31, 2017 at 23:05
• @fonfonx This is one of those questions where they just want confirmation that their work was correct. I believe this does answer the question
– Hugh
Commented Jul 31, 2017 at 23:12
• Thanks for you and the other person for answering. I'll apply the bounty after a little time has passed to see if there is any more significant activity to consider first. Commented Aug 1, 2017 at 2:47

I don't think the calculation itself is wrong, per-se. However, the prior you've chosen ($P(H) = 0.01$) is up for debate.

Regarding the claim of "supernatural access to knowledge of future events" via any sort of "skip code", you may be referring to Bible Codes. I would strongly recommend you make calculations for those numbers (and I do believe those calculations exist).

• Well this is hypothetical. It's inspired by Bible Codes (which AFAIK have not been shown to be statistically significant) but just a stand-in for a hypothetical piece of evidence in favor of a hypothetical religion for the sake of having a properly framed equation. I understand that if I were to apply this to an actual religion it would be a more complex task of calculating various pieces of evidence, and I also understand that there are thousands of religions (though some may be prone to consider all but a few to be so implausible as to not be worthy of consideration). Commented Aug 1, 2017 at 2:10