# Homework Help: Tossing a fair coin

1. May 10, 2010

### uva123

1. The problem statement, all variables and given/known data

Suppose that a fair coin is tossed repeatedly until a head is obtained for the first time.

(a) What is the expected number of tosses that will be required?
(b) What is the expected number of tails that will be obtained before the first head is
obtained?

2. Relevant equations

E(x)= from -infinity to +infinity (continuous case)
E(x)= for all x (discrete case)

3. The attempt at a solution

q=tail=1-p=1/2

Pr(X>1)=1 for n=2,3,.....

Pr(X>n)=qn-1

E(x)=1/(1-q)=1/p=2

-if only 2 tosses are expected to obtain a head then only one tail would be obtained before a head

-does this make sense???

2. May 11, 2010

### lanedance

helps if you show you steps to make it clear what you did... i'd start like this
$$\begin{matrix} P(1) & = P(H) & = 1/2 & &\to P(X \leq 1) = 1/2 &\to P(X>1) = 1/2 \\ P(2) & = P(TH) &= (1/2)(1/2) &= 1/4 & \to P(X \leq 2) = 3/4 & \to P(X>2) = 1/4\\ P(3) & = P(TTH) &= (1/4)(1/2) &= 1/8 & \to P(X \leq 2) = 7/8 & \to P(X>1) = 1/8 \end{matrix}$$

which looks like you're close for P(X>n) but not quite, assuming X is number of tosses for a head - should be able to write out P(X=n) from here and set up a sum for the expected value
$$E(x) = \sum_{n=0}^{\infty} n P(X=n)$$

3. May 11, 2010

### lanedance

not too sure what you meant by