Pages

Tuesday, August 7, 2018

Choose the Coin, Then Flip it n Times

Say there are two coins to choose from, and you choose one of them randomly with each one just as likely to be chosen as the other. Then you flip that coin n times with a flip ending up as heads being a success. Say the probability of coin 1 landing heads is $p_{1}$ and the probability of coin 2 landing heads is $p_{2}$. Let X be the number of times a coin lands heads.

(a) What's the Probability Mass Function for this distribution?

We can look at the beginnings of a tree diagram and get an idea of how to proceed.


If we choose Coin 1, we proceed along a path that has nothing to do with Coin 2, and the same logic holds if we choose Coin 2. So, we're looking at combining two cases. 
Case 1:

$P_{1}(X=k) = \frac{1}{2}\binom{n}{k}p_{1}^{k}(1-p_{1})^{n-k}$

Case 2:

$P_{2}(X=k) = \frac{1}{2}\binom{n}{k}p_{2}^{k}(1-p_{2})^{n-k}$

Combine the two to get:

$P(X=k) = \frac{1}{2}\binom{n}{k}p_{1}^{k}(1-p_{1})^{n-k} + \frac{1}{2}\binom{n}{k}p_{2}^{k}(1-p_{2})^{n-k}$

Verify this result using the Law of Total Probability (LOTP):

$P(X=k) = P\left ( X=k | C_{1} \right )P(C_{1}) + P\left ( X=k | C_{2} \right )P(C_{2})$

Where $C_{1}$ is the event Coin 1 is chosen and similarly for Coin 2. 
$P\left ( C_{1} \right )= P\left ( C_{2} \right )= \frac{1}{2}$


No comments:

Post a Comment