Flip a fair coin $n$ times. Let $H$ denote the number of heads and $T$ the number of tails. What is $\mathbb{E}[\min(H,T)]$?
We know that $\mathbb{E}[H]=\mathbb{E}[T]=n/2$, and that $H$ and $T$ are distributed according to a binomial distribution, which has mean $n/2$ and variance $n/4$. Also, $T=n-H$ always. How can we find $\mathbb{E}[\min(H,n-H)]$?
Observe that $H$ has binomial distribution with parameters $n$ and $p=\frac12$.
So expectation $\mathbb E[\min(H,n-H)]$ is found by calculating:$$2^{-n}\sum_{k=0}^{n}\binom{n}{k}\min\left(k,n-k\right)$$
addendum:
Hints for special case: $n$ is odd:
$$\sum_{k=0}^{2m+1}\binom{2m+1}{k}\min\left(k,2m+1-k\right)=2\sum_{k=1}^{m}\binom{2m+1}{k}k=2\left(2m+1\right)\sum_{k=1}^{m}\binom{2m}{k-1}$$
and:
$$2\sum_{k=1}^{m}\binom{2m}{k-1}=2\sum_{k=0}^{m-1}\binom{2m}{k}=\sum_{k=0}^{2m}\binom{2m}{k}-\binom{2m}{m}=2^{2m}-\binom{2m}{m}$$
Do check me on mistakes, though. This stuff is slippery.
closed form for odd $n$:$$n\left[\frac{1}{2}-\binom{n-1}{\frac{1}{2}n-\frac{1}{2}}2^{-n}\right]$$
closed form for even $n$:$$n\left[\frac{1}{2}-\binom{n}{\frac{1}{2}n}2^{-n-1}\right]$$