In a sequence of coin flips, a run is a series of consecutive coin flips that are all the same. For example, in the sequence
the red letters form a run.
TTHHHTTHHHTH,
If a fair coin is flipped four times, what is the expected length of the longest run?
Because we are dealing with 4 coins, the easiest way (imo) is to list out all 16 cases and count the average
The 16 cases are:
HHHH HTHT TTTT THTT
HHHT HTTH TTTH THHT
HHTH HTTT TTHT THTH
HHTT HTHH TTHH THTH
We see that 2 have a run of 4, 4 have a run of 3, 8 have a run of 2, and 2 have a run of 1.
So the expected value is (2×4)+(4×3)+(8×2)+(2×1)16=2.375