Artificial intelligent assistant

What is the probability the two-headed coin is chosen from among the coins that came up heads? An urn contains 3 coins; 2 biased with $P(H) = p$, and the other is a two-headed coin. All the coins are tossed at once. If a coin is selected from those that came up heads, what is the probability that it was the two-headed coin?

**Hint:** For each $n\in\\{0,1,2,3\\}$,

* calculate the probability $P_n$ that there are exactly $n$ heads.

* calculate the probability $Q_n$ that, if $n$ heads have appeared, then the two-headed coin is chosen




Then the probability that the two-headed coin is chosen overall is $$P_0Q_0+P_1Q_1+P_2Q_2+P_3Q_3.$$ (Do you understand why?)

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 0b59a007b2f37d3347690bd5720bf87d