# Flip a biased coin until a head appears

I'm having some trouble with this problem

Suppose you flip a biased coin until a head appears. The coin has a $75%$ chance of coming up tails. Let $n$ be the number of flips that you need to do. What is the probability of the following events:

a) $n$ is at most $3$?

b) $n$ is even (note that a geometric series of the form $a + ar + ar^2 + ar^3 + ...$ is equal to $\frac{a}{1-r}$

We really haven't talked much about biased coins, or even how to use variables like $n$ in answers.

• Have you done any work on Geometric Distributions? – Graham Kemp Apr 2 '15 at 4:40
• For the first, we could have H, or TH, or TTH. Probability of $H$ is $1/4$. Probability of TH is $(3/4)(1/4)$. Probability of TTH is $(3/4)(3/4)(1/4)$. Add up. A fancier way: We have $n\gt 3$ if the first three tosses are tails, probability $(3/4)^3$. Subtract from $1$. (The first way should give you an idea of how to answer the second question.) – André Nicolas Apr 2 '15 at 4:41

The biased coin in your case only means that $P(T)=\frac{3}{4}$.
First note that to stop at a single Head in $n$ tosses, you need to get Tail in the first $n-1$ tosses and a Head in the last (that is $n^{th}$ toss).

$1.$ When $n\leq3$. You can get a head in these ways - $H,TH,TTH$.
(Here $TH$ implies first toss gives Tail and second toss gives Head)

So the probability is $$P(H) + P(TH) + P(THH)=\frac{1}{4}+\frac{3}{4}.\frac{1}{4}+\frac{3}{4}.\frac{3}{4}.\frac{1}{4}$$

$2.$ When $n$ is even.
Here you can see that your probablity will be given by $$P(TH)+P(TTTH)+P(TTTTTH)+\dots$$ Write the probabilities in a similar way to the first case and you will obtain an infinite G.P, the formula for sum to which is given in the question.

Suppose you flip a biased coin until a head appears. The coin has a 75% chance of coming up tails. Let n be the number of flips that you need to do. What is the probability of :

$n$ has a Geometric Distribution.

Let $q=0.75$ be the probability of getting a head. (We can call this a failure.)

Let $p=0.25$ be the probability of getting a tail. (We can call this a success.)

The probability of requiring $k$ trials until a success is: the probability of $k-1$ failures then one success:$$P(n=k) = q^{k-1}p$$

So the probability of requiring at most three trials is: \begin{align} \mathsf P(n\leq 3) & = \sum_{k=1}^3 \mathsf P(n=k) \\ & = \Big(1+q+q^2\Big)p \end{align}

And the probability of requiring any even number of trials, is the sum of all probabilities for even numbers.

\begin{align} \mathsf P(\operatorname{Even}(n)) & = \sum_{k=1}^\infty \mathsf P(n=2k) \\ & = p \sum_{k=1}^\infty q^{2k-1} \end{align}

For part (2), here is perhaps a simpler way. For every sequence $TT...TH$ that leads to an even $n$, there is a shorter sequence (less by a tail $T$) that leads to an odd $n$. Thus if $p_E$ is the probability of $n$ being even, then $p_E = (1-p_E)\frac34 \implies p_E = \frac37$.