Let's say the first time I flip the coin, I get HT. I would then erase the data and start over because I got an equal amount of Heads and Tails.
The second attempt I get HHHTTHTT. At that point, I stop because I have an equal amount of heads and tails. I then start over.
I flip the coin until I get an equal amount of heads and tails, then stop and start over. What would be the average amount of flips needed to get an even number of heads and tails? Sometimes it only takes two flips. Other times it can take many more flips. Consider the coin is fair.