2
$\begingroup$

Here is a probability interview questions: two independent unfair coins with probabilities of head, $p_1,p_2\sim U(0,1).$ Then what's the probability of $p_1>p_2$ if we tossed each coin 3 times with 2 head for $p_1$ and 1 head for $p_2?$ We simply denote as:

$$P(p_1>p_2| 2H^1,1H^2).$$

I know we should use Bayes formula: $$P(p_1>p_2| 2H^1,1H^2)P(2H^1)P(1H^1) = P(p_1>p_2,2H^1, 1H^2).$$

And I know we can calculate $P(2H^1),P(1H^2)$ by $$P(2H^1) = \int^1_0p_1P(2H^1|p_1)dp_1.$$

But how to calculate the joint distribution $P(p_1>p_2,2H^1, 1H^2)?$ Am I right to calculate as: $$P(p_1>p_2,2H^1, 1H^1) = \int_{p_1,p_2\in [0,1],p_1 > p_2}P(2H^1|p_1)P(1H^2|p_2)dp_1dp_2?$$

$\endgroup$

1 Answer 1

2
$\begingroup$

Yes, the integral is correct. We can see it more explicitly, using total probability theorem from the beginning:

$$\begin{align}\mathbb P(p_1>p_2,2H^1,1H^2)&=\int_{[0,1]\times[0,1]} \mathbb P(p_1>p_2,2H^1,1H^2|p_1,p_2)\underbrace{f_{P_1,P_2}(p_1,p_2)}_{f_{P_1}(p_1)f_{P_2}(p_2)=1}dp_1dp_2\\&=\int_{[0,1]\times[0,1]}\mathbb P(p_1>p_2|p_1,p_2)\mathbb P(2H^1|p_1,p_2)\mathbb P(1H^2|p_1,p_2)dp_1dp_2\\&=\int_{[0,1]\times[0,1]} \mathbb I(p_1>p_2)\mathbb P(2H^1|p_1)\mathbb P(1H^2|p_2)dp_1dp_2\\&=\int_{p_1,p_2\in [0,1] \cap p_1>p_2}\mathbb P(2H^1|p_1)\mathbb P(1H^2|p_2)dp_1dp_2\end{align}$$

$\endgroup$
2
  • $\begingroup$ for the second equation, why is $P(p_1>p_2|p_1,p_2)$ independent on the $P(2H^1|p_1,p_2)?$ $\endgroup$ Nov 22, 2020 at 5:47
  • $\begingroup$ Because given $p_i$, the event $p_1>p_2$ is deterministic and doesn’t depend any other event $\endgroup$
    – gunes
    Nov 22, 2020 at 7:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.