A release-checked medium problem for training Exchangeability, Linearity of Expectation, Coins, Expected Value/LOTUS.
Question
A coin that comes up heads with probability $0 < p < 1$ per flip is flipped $n$ times. The outcomes are recorded in order of appearance. On average, how many runs/connected components will there be when $n = 100$ and $p = 1/3$? A run is defined as the longest contiguous sequence of flips of the same parity (heads or tails). For example, $HHTTTHTHH$ has $5$ runs.
Practice focus
This Probability problem is tagged Exchangeability, Linearity of Expectation, Coins, Expected Value/LOTUS. State the random variables and conditioning information explicitly, then check the result against boundary cases before opening hints or a solution.