Suppose there are two coins A and B. When tossing a coin $i$, "head" happens with probability $p_i$.

The problem is that $p_i$ itself is a random variable. Say that the associated probability density function is given by $f_i$ for coin $i$.

We also know the conditional probability $f_{p_A|p_B=p}$.

In this setting, what is the formula to compute the probability of head for coin A given that coin B showed head? i.e., $P[A:Head|B:Head]$?


We can use conditional probability formula to get what we want: $$P(A:Head|B:Head)=\frac{P(A:Head\cap B:Head)}{P(B:Head)}$$

First we condition on $p_a,p_b$ (using lowercase for notational simplicity), and use total probability law: $$P(A:Head\cap B:Head)=\int P(A:Head\cap B:Head \ \vert\ p_a,p_b)f_{P_a,P_b}(p_a,p_b)dp_adp_b$$

$P(A:Head\cap B:Head|p_a,p_b)$ simplifies to $p_ap_b$ because we don't need anything else other than the head probabilities, i.e. the events are conditionally independent given the $p_i$'s. Also, the joint density can be written as $f_{P_a,P_b}(p_a,p_b)=f_{P_a|P_b}(p_a|p_b)f_{P_b}(p_b)$. The final expression is something like: $$P(A:Head\cap B:Head)=\int p_ap_b f_{P_a|P_b}(p_a|p_b)f_{P_b}(p_b)dp_adp_b=E[P_aP_b]$$ Similarly, we could find $$P(B:Head)=\int P(B:Head|p_b)f_{P_b}(p_b)dp_b=E[P_b]$$

  • $\begingroup$ I think you have assumed that the two coins are independent to each other? Is that why you have $P(A:H~and~B:H)=\int p_ap_b f_{p_ap_b}(p_a,p_b)dp_adp_b$? Does this also work for possibly correlated case? $\endgroup$ – Andeanlll Sep 12 '19 at 2:00
  • $\begingroup$ No I haven't assumed it, if they were independent, I'd have written $$P(A:Head|B:Head)=P(A:Head)$$ However, note that "given" their head probabilities, they're independent. $\endgroup$ – gunes Sep 12 '19 at 8:19
  • $\begingroup$ Alright! Thanks for the clarification :) $\endgroup$ – Andeanlll Sep 13 '19 at 4:29
  • $\begingroup$ Sorry for keep posting comments, but one last question for clarification. $P_A$ and $P_B$ are random variables here. So, shouldn't $P_A|P_B$ also be an RV? Can we take $E[P_A|P_B]=\frac{E[P_AP_B]}{E[P_B]}?$ $\endgroup$ – Andeanlll Sep 18 '19 at 3:22
  • $\begingroup$ Yes, $P_A|P_B$ represents a random variable. But, the expectation you wrote is wrong. $\endgroup$ – gunes Sep 18 '19 at 3:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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