Probability – Expected Number of Flips and Probability in Coin Toss Experiment

expected valueprobabilityprobability distributionsprobability theory

I'm currently studying probability and I've come across a problem that I'm finding quite challenging. I would appreciate any help or guidance.

Problem Statement:

A fair coin is continually flipped until both heads and tails have appeared. I need to find:

(a) The expected number of flips
(b) The probability that the last flip lands on heads

My Attempt:

For part (a), I understand that the expected value is the long-run average or mean of a random variable. Since the coin is fair, the probability of getting heads or tails is 0.5. However, I'm not sure how to apply this concept when the coin is flipped until both heads and tails have appeared.

For part (b), I'm a bit confused. My initial thought was that since the coin is fair, the probability that the last flip lands on heads would be 0.5. But I'm not sure if this is correct because the experiment doesn't stop until both heads and tails have appeared.

Background:

I'm an undergraduate student majoring in Mathematics. I've taken courses in Calculus and Linear Algebra, and I'm currently taking a course in Probability and Statistics. I'm familiar with the basics of probability, but this problem seems to involve concepts that I haven't fully grasped yet.

I found this problem in my textbook (unfortunately, I don't have the name of the book right now), in the chapter on expected values. I've tried to solve it using the concepts explained in the book, but I'm stuck.

I would really appreciate it if someone could explain the solution in a way that a beginner in probability could understand. Thank you in advance for your help!

Best Answer

A simple yet rigorous argument for (b) is that the last flip is a head if and only if the first flip is a tail, which has probability $1/2$ since the coin is fair.