Let Ij be the indicator
variable for the j-toss
landing on an outcome different from the previous toss for
2≤j≤n. Then, the total number
of such tosses is X=∑nj=2Ij. The
total number of runs is Y=X+1.
Since E(X)=∑nj=2P(Ij=1)=∑nj=212=n−12,
E(Y)=n−12+1=n+12.