# When coin 1 is flipped, it lands on heads with probability .4; when coin 2 is flipped, it lands on heads with probability .7.

When coin 1 is flipped, it lands on heads with probability .4; when coin 2 is flipped, it lands on heads with probability .7. One of these coins is randomly chosen and flipped 10 times.

(a) What is the probability that the coin lands on heads on exactly 7 of the 10 flips?
(b) Given that the first of these 10 flips lands heads, what is the conditional probability that exactly 7 of the 10 flips land on heads?

I know how to to do by finding the probability of coin 1 being chosen then finding the probability it gets exactly 7 heads by using a bernoulli sum and adding that probability to the probability of coin 2 being chosen and doing another bernoulli sum for that coin, but is there a better or more efficient way of calculating the probability of part a instead of doing it the long way like I did?

and part b does not make sense to me because if it's given that the first 10 flips are heads how can you find the probability that exactly 7 of the 10 landed on heads if it's given that they all landed on heads?

• Hint: the idea in b) is that seeing that first $H$ should lead you to revise your notions about which coin you have (absent any data you have equal probability, seeing the $H$ makes you reweight the odds). – lulu Oct 30 '15 at 15:56
• Only the first one of the ten is known to be heads, not all ten of them. – Empy2 Oct 30 '15 at 15:57
• Rather than a "bernoulli sum", you could use the binomial distribution, but that is probably the only shortcut for (a). – Henry Oct 30 '15 at 16:03

## 3 Answers

As stressed in the comments, the extra information available in part b) is that fact that the first toss gives you Heads. Conceptually, the problem is "how do you use the new information?". Informally, the fact that you see $H$ on the first trial increases the probability that you have coin #$2$. But by how much?

To answer that, suppose you toss each coin ten times. You'll see $4$ Heads from coin #$1$ and $7$ from coin #$2$. Thus you'll see $11$ Head all in all, $7$ of which come from coin #$2$. Thus, if all you are told was that you saw Heads, the probability that it came from coin #2 is $\frac 7{11}$.

Accordingly, you can now redo part a), looking for exactly $6$ Heads out of the next $9$ tosses where you have coin #$1$ with probability $\frac 4{11}$ and coin #$2$ with probability $\frac 7{11}$.

• so for part b, since we assume that the first flip is heads I do a bernoulli sum for both coins with only 9 flips instead of 10. so, for coin 1 it's: (4/11)*(9 choose 6) * (.4)^6 * (.6)^3, and I would do this for coin 2 and add up the probabilities, correct? – idknuttin Oct 30 '15 at 16:42
• @idknuttin Exactly. – lulu Oct 30 '15 at 18:06

for question a)

Do some conditionnal expectation

P being the probability of your event

P is a random variable that you have no idea what it is.

However

P knowing What coin you are using is a known distribution

Therefore

P | Coin one ~ binomial(10, 0.4) => P(binomial(10, 0.4) = 7)

+

P | Coin two ~ binomial(10, 0.7) => P(binomial(10, 0.7) = 7)

and since you have 1/2 of picking either one coin, the expected value of P is the sum of the two previous probability, each one multiplied by 1/2 :)

for question b)

you have to re-ponder the 1/2 of my previous question since you have new information about which coin was selected.

Since it went on head, it means that the probabiltiy of having the first coin selected is smaller than the probability of second one. from that point i believe your text book will let you know what formula to use :)

a) Denote X to be the number of heads observed. If coin 1 is chosen, X~Bin(n,0.4) and if coin 2 is chosen X~Bin(n,0.7). Each coin is chosen randomly, implying there is 0.5 chance of picking coin 1 or coin 2. Hence we need to multiply the 2 probabilities by 0.5 and add them together to get the expected value.

P(X=7) = P(Coin 1 and X=7) OR P(Coin 2 and X=7)

P(X=7) = (0.5)(10C7)(0.4^7)(0.6^3) + (0.5)(10C7)(0.7^7)(0.7^3) = 0.1548

b)P(X=7|First is head) = P(X=7 AND First is head)/ P(First is head)

 =((0.5)(9C6)(0.4^6)(0.6^3) + (0.5)(9C6)(0.7^6)(0.7^3))/((0.5)(0.4) + (0.5)(0.7))


=0.310