- #1
DerekJ
- 1
- 0
Homework Statement
Given a sequence of Heads and Tails, let’s say that the sequence has a switch each time one toss is different than the toss before it. For instance, the sequence HHTHTTTHTH has 6 switches.
Suppose you toss a fair coin N times and record the resulting sequence of Heads and Tails. If X is the number of switches in the sequence, find E(X).
Homework Equations
We are assuming that the expected value, E(X) = ∑x_i*P(X=x_i) (the sum of each element of X, multiplied by the respective probability of that element occurring)
The Attempt at a Solution
I understand that this is going to have something to do with the number of heads and tails in the sequence and the relationship between the two. Clearly 2/n of the sequences have 0 switches, and 2/n of the sequences have n-1 switches, however I'm unsure of how to work out the values in between in general.