Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

A fair coin is tossed until both heads and tails have been obtained. Let x = the number of tosses needed (for example, if the sequence of tosses is HHT, then x = 3; If the sequence is TTTTTH, then x = 6).

Find the expected value of x aka E(x).

I think E(x) = 1/P, where P is the probability of getting a heads or tails.

share|improve this question

closed as off-topic by Nate Eldredge, Thomas, Davide Giraudo, azimut, Vedran Šego Oct 2 '13 at 15:44

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Thomas, Davide Giraudo, azimut, Vedran Šego
If this question can be reworded to fit the rules in the help center, please edit the question.

1  
What is your attempt? –  tylerc0816 Oct 2 '13 at 14:55
    
Look at the definition of the expectation. $E(x) = (0 \times \text{probability of stopping after 0 tosses}) + (1 \times \text{probability of stopping after 1 tosses}) + \ldots$. –  utdiscant Oct 2 '13 at 14:58

1 Answer 1

up vote 2 down vote accepted

Whatever the result of the first toss is, say tail, we have used up one toss, and are waiting for head to show up.

The waiting time after the first toss has geometric distribution, with mean $\frac{1}{1/2}=2$.

So the expected waiting time until each of head and tail has shown up is $3$.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.