Expected Value with random variables for coin toss scenario

expected valueprobabilityprobability theoryrandom variables

Question:

I flip a fair coin, independently, 6 times, resulting in a sequence of heads (H) and tails (T). For each (consecutive) HTH in this sequence, you win $5.

Define the random variable X to be the "amount of dollars that you win".

For example, if the sequence is THTHTH; then X=10. What is the expected value of X?

Answer: $\frac{5}{2}$

Attempt:

I am very confused on how to approach this. Like do I have to count the amount HTH possible and find the probability of it for all $64$ sequences and mulitply by 5? Writing out all the sequences will take me forever to do…

Best Answer

For any three consecutive tosses, there is a $1/8$ chance of hitting HTH, so on tosses 1-3, you expect to win $5(1/8)$ dollars. Similarly for tosses 2-4, 3-5, and 4-6. By Linearity of Expectation, the expected winnings for the whole game is $4(5/8)=5/2$ dollars.