# Are the first flip and second flip of this problem independent events?

Problem
Given 5 coins:

• 2 double-headed coins
• 2 fair coins
• 1 double-tailed coin

A coin is chosen at random and flipped. The coin is then flipped in a second time. What's the probability that face showing is a head?

My attempt was using conditional probability on each type of coin:

P( 1st = whatever, 2nd = head | DH ) * P( DH )
+ P( 1st = whatever, 2nd = head | DT ) * P( DT )
+ P( 1st = whatever, 2nd = head | FC ) * P( FC )

Apparently, P( 1st = whatever, 2nd = head | DT ) = 0. So I ended up with: $$1 \cdot \dfrac{2}{5} + \dfrac{1}{2} \cdot \dfrac{2}{5} = \dfrac{3}{5}$$

But my teacher said the answer is $\dfrac{5}{6}$ which I couldn't understand how did he come up with that solution! So my question is, are the 1st flip and 2nd flip two independent events? I don't see how should we take the 1st flip into account?

-
Looks like your teacher is wrong. – anon Oct 7 '11 at 3:49
If you ignore the result of the first flip, how can it influence anything? You might as well not have done it. Your logic looks good to me. – Ross Millikan Oct 7 '11 at 4:09
I'm guessing that the intended question is "Assume that the first flip was heads; what is the probability that the second flip is heads?" – Greg Martin Oct 7 '11 at 4:26
@Greg: Nice observation. – anon Oct 7 '11 at 4:54

As the comments say, this looks like a matter of checking the question. If the first flip is ignored, then $\frac{3}{5}$ is correct, for the reasons you give. It is also the probability that the first flip is heads.

If you condition on the first flip being heads, then you would have

P( 2nd = head | DH, 1st = head ) * P( DH| 1st = head )
+ P( 2nd = head | FC, 1st = head ) * P( FC| 1st = head )
+ P( 2nd = head | DT, 1st = head ) * P( DT| 1st = head )

which gives

$$1 \cdot \dfrac{2}{3} + \dfrac{1}{2} \cdot \dfrac{1}{3} + ? \cdot 0 = \dfrac{5}{6}.$$

Similarly if you conditioned on the first flip being tails, the probabilitiy of the second being heads would be

$$? \cdot 0 + \dfrac{1}{2} \cdot \dfrac{1}{2} + 0 \cdot \dfrac{1}{2} = \dfrac{1}{4}.$$

Combining these two results for the overall marginal probability that the second flip is heads would give

$$\dfrac{5}{6} \cdot \dfrac{3}{5} + \dfrac{1}{4} \cdot \dfrac{2}{5} = \dfrac{3}{5},$$

confirming your earlier result.

-
Thanks a lot! I guess the problem statement must be wrong. – Chan Oct 7 '11 at 7:23
This problem is also a nice example of the difference between conditional independence and independence. If $H_1$ and $H_2$ are the events that the first flip and the second flip respectively resulted in Heads, then $H_1$ and $H_2$ are conditionally independent given which coin is picked (that is, $P(H_1\cap H_2) \mid C) = P(H_1 \mid C)P(H_2\mid C)$, the two sides having value $1$, or $\frac{1}{4} = \left (\frac{1}{2}\right )^2$ or $0$ depending on $C$, but are not unconditionally independent: $P(H_1 \cap H_2) = \frac{1}{2} \neq P(H_1)P(H_2) = \left(\frac{3}{5}\right)^2$ – Dilip Sarwate Oct 7 '11 at 14:33
@Henry: Could you show me how to derive this formula? P( 2nd = head | DH, 1st = head ) * P( DH| 1st = head ). When it's written this way, how do the precedence of "|" and "," work? Did you mean P( 2nd = head | ( DH, 1st = head ) )? – Chan Oct 7 '11 at 17:09
@Chan: P( 2nd = head | DH, 1st = head ) means the probability that the second flip is heads given both that the coin is double headed and the first flip is heads. Since if the coin is double headed the (first and) second flip will be heads with probability 1, this must be 1. – Henry Oct 7 '11 at 19:43
@Henry: I understand the logic, I just don't see how did you come up with that expression from P(2nd = head | 1st = head). – Chan Oct 8 '11 at 6:24

Converting my comment into an answer, the question asked in the title is

"Are the first flip and the second flip independent events?"

to which the answer is

"No, they are not independent events, but they are conditionally independent events conditioned on which coin is drawn."

Let $H_1$ and $H_2$ denote the events that the first flip and the second flip respectively resulted in Heads, and let $H$, $F$, and $T$ denote the events that that the coin drawn is double-Headed, Fair, and double-Tailed respectively, where $P(H) = P(F) = \frac{2}{5}$ and $P(T) = \frac{1}{5}$. Then, given that a colin has been chosen, the two tosses are (conditionally) independent events, that is, \begin{align*} P(H_1 \mid H) = P(H_2 \mid H) = 1; ~~ &P(H_1 \cap H_2 \mid H) = P(H_1 \mid H)P(H_2 \mid H) = 1,\\ P(H_1 \mid F) = P(H_2 \mid F) = \frac{1}{2}; ~~ &P(H_1 \cap H_2 \mid F) = P(H_1 \mid F)P(H_2 \mid F) = \frac{1}{2}\times \frac{1}{2} = \frac{1}{4},\\ P(H_1 \mid T) = P(H_2 \mid T) = 0; ~~ &P(H_1 \cap H_2 \mid T) = P(H_1 \mid T)P(H_2 \mid T) = 0. \end{align*} The law of total probability then gives that for $i = 1, 2$, \begin{align*} P(H_i) &= P(H_i \mid H)P(H) + P(H_i \mid F)P(F) + P(H_i \mid T)P(T)\\ &= 1 \times \frac{2}{5} + \frac{1}{2}\times \frac{2}{5} + 0 \times \frac{1}{5} = \frac{3}{5},\\ P(H_1 \cap H_2) &= P(H_1 \cap H_2 \mid H)P(H) + P(H_1 \cap H_2 \mid F)P(F) + P(H_1 \cap H_2 \mid T)P(T)\\ &= 1 \times \frac{2}{5} + \frac{1}{4}\times \frac{2}{5} + 0 \times \frac{1}{5} = \frac{1}{2} \neq \left ( \frac{3}{5}\right )^2 = P(H_1)P(H_2), \end{align*} showing that $H_1$ and $H_2$ are not independent events. Finally, $$P(H_2 \mid H_1) = \frac{P(H_1 \cap H_2)}{P(H_1)} = \frac{1/2}{3/5} = \frac{5}{6}$$ as calculated by the OP's teacher.

-
Many thanks for your very detailed answer. I wonder if you could help me explain how do you get this expression$$P(H_1 \cap H_2 \mid H) = P(H_1 \mid H)P(H_2 \mid H)$$ – Chan Oct 8 '11 at 6:17
$P(H_1 \cap H_2 \mid H) = P(H_1 \mid H)P(H_2 \mid H)$ is the meaning of conditional independence. Given that event $C$ occurred, where $C$ can be any of $H$, $F$, or $T$ and the chosen coin is tossed twice, what is the probability that both flips resulted in Heads? Formally, what is $P(H_1 \cap H_2 \mid C)$? Well since we are flipping the same coin $C$ twice, this is just the product of the probabilities of getting Heads on each flip for coin $C$, i.e. $P(H_1 \cap H_2 \mid C) = P(H_1 \mid C)P(H_2 \mid C)$. As I said earlier, $H_1$ and $H_2$ are conditionally independent given $C$. – Dilip Sarwate Oct 8 '11 at 12:15
Thanks again. In fact, there is a section about conditional independence in my book ;) – Chan Oct 9 '11 at 1:05
@Chan: Good. Now try to figure out if the following is a true statement: "If $A$ and $B$ are conditionally independent given $C$ and also consitionally independent given $C^c$, they are (unconditionally) independent events." In symbols, do $P(AB|C) = P(A|C)P(B|C)$ and $P(AB|C^c) = P(A|C^c)P(B|C^c)$ together imply that $P(AB) = P(A)P(B)$? – Dilip Sarwate Oct 9 '11 at 1:18