# Generate the outcome of the flip of a fair coin (A question from A First Course In Probability by Ross)

The book asks the question:

Suppose that we want to generate the outcome of the flip of a fair coin, but that all we have at our disposal is a biased coin which lands on heads with some unknown probability p that need not be equal to 0.5. Could we use the procedure that continues to flip the coin until the last two flips are different and then lets the result be the outcome of the final flip to generate the outcome of the flip of a fair coin ?

An analysis made showed that the probability of answering H is $p(1-p)$ [this is since the only case that answers H is the case that the curent flip is H and the previews flip is T]. the same argument shows that the probability of answering T is also $p(1-p)$.

I have 2 questions:

1. Why, even if $p=0.5$ we get the conclusion that the probability of answering H is not 0.5 ? [I know $p(1-p) \not=0.5$ for any real p, but what is the reason intuitivly ? My intuition sais that by symmetry the answer is 0.5]

2. How is it possible that we got $P(H)+P(T)\not=1$ ?

-

## 1 Answer

Your calculations of the probabilities of getting a string of tails followed by a head and a string of heads followed by a tail are incorrect. The probability of getting $k$ heads followed by a tail is $p^k(1-p)$, so the probability of getting a string of heads followed by a tail is

$$\sum_{k\ge 1}p^k(1-p)=(1-p)\frac{p}{1-p}=p\;.$$

Similarly, the probability of getting a string of tails followed by a head is

$$\sum_{k\ge 1}p(1-p)^k=p\sum_{k\ge 1}(1-p)^k=p\frac{1-p}p=1-p\;.$$

-
Are you sure you understood the procedure ? It does not say to answer H after a string of tails followed by a head but rather after getting a string with the 2 last flips different and the last flip is the answer... –  Belgi Apr 12 '12 at 21:02
@Belgi: You flip the coin until the last two flips are different. If this takes $n$ flips, the first $n-1$ flips must have been the same, and the $n$-th flip must have been different from the first $n-1$. If the $n$-th flip is $H$, for instance, you must have had $n-1$ $T$’s followed by $H$. Thus, the only way the procedure can answer $H$ is to be of the form $T^kH$ for some $k\ge 1$. –  Brian M. Scott Apr 12 '12 at 21:23
I think that you are correct, but I do think that thq question (if to make it more formal) ment: 1.Flip the coin, 2.Flip it again, if both flips were the same return to 1 otherwise the answer is the result of the last flip. giving that this is the procedure I'm guessing that I am still wrong but I don't know why...thank you for your time and help! –  Belgi Apr 12 '12 at 21:28