Probability of card being 7 of diamonds given the card is red

124 Views Asked by At

Question: Given the prior probability in hypothesis H The card is the seven of diamonds is 1/52, and then I acquire a piece of evidence E, where E is The card is red what is the posterior?

Answer: $$ \begin{align*} p(H|E) &= \dfrac{p(E|H)p(H)}{p(E|H)p(H)+ p(E|\lnot H)p(\lnot H)}\\ p(H|E) &= \dfrac{1/26 \times 26/52}{1/26 \times 26/52 + 1/26 \times 25/26}\\ p(H|E) &= 0.34\\ \end{align*} $$ This doesn't seem correct since the E is redundant because seven of diamonds is red.

1

There are 1 best solutions below

1
On

The formula is correct, but your computation is wrong.

$p(H)=\frac{1}{52}$ because only one of your 52 cards is the seven of diamonds.

$p(E|H)=1$ because if you draw the seven of diamonds, the card is red.

$p(E|\lnot H)=\frac{25}{51}$ because if we know we didn't draw the seven of diamonds, we have 51 choices and only 25 of them are red cards.

$p(\lnot H)=\frac{51}{52}$ because $p(\lnot H)=1-p(H)$.

Therefore: $$P(H|E)=\frac{1 \cdot 1/52}{1 \cdot 1/52 + 25/51 \cdot 51/52}=\frac{1}{26}$$

Without using Bayes' formula, you could directly say that if we know that the card is red, we have 26 choices, and only one of them is the seven of diamonds.