I've been stuck on this problem for a while; I can get the expected number of heads, but the solution set I saw gives $\frac{11n}{16}$ for the variance, whereas I get $\frac{9n}{16}$:
Each coin flip, $X_i$ for $0,\ldots,n$, can be represented by a Bernoulli random variable with $E(X_i) = p = 0.5$. The total number of heads for the initial round of throws is then a binomial random variable, $N$, with $E(N) = np = \frac{1}{2}n$.
The expected total number of heads for the second set of throws, $N'$ is conditional on $N$, $$ E(N') = E(E(N' \vert N)) = E(N)E(X_i) = \frac{1}{4}n $$
To get the expected total number of heads we sum these two expectations, $$E(N + N') = E(N) + E(N') = \frac{1}{4}n$$
So the expected total number of heads is a function of a random variable, $h(N) = N + E(X_i)N$. Using the fact that $Var(Y) = Var[E(Y \vert X)] + E[Var(Y \vert X)] $
$$ Var(N + E(X_i)N) = Var[E(N + E(X_i)N \vert N)] + E[Var(N + E(X_i)N \vert N)] \\ = Var\left[E\left(\frac{3}{2}N \mid N \right)\right] + E\left[Var\left(\frac{3}{2}N \mid N \right) \right] \\ = \left(\frac{3}{2}\right)^2Var[E(N \mid N)] + \left( \frac{3}{2}\right)^2E[Var(N\mid N)] $$
Factoring out the $\left(\frac{3}{2}\right)^2$, we're left with an expression that is equivalent to $Var(N) = \frac{n}{4}$ (per the equality above), hence $Var(N + N') = \frac{9n}{16}$.
What am I missing?
For $i\in\{1,\dots,n\}$ define $$H_i=\begin{cases} 0\text{ if tails on the }i^{\text{th}}\text{ toss,}\\ 1\text{ if heads on the }i^{\text{th}}\text{ toss, tails on the corresponding second round toss,}\\ 2\text{ if heads on the }i^{\text{th}}\text{ toss, heads on the corresponding second round toss}. \end{cases}$$
Then $$\operatorname{Var}(H_i)=E(H_i^2)-E(H_i)^2=\frac54-\left(\frac34\right)^2=\frac{11}{16}.$$
The total number of heads is $$H=H_1+\cdots+H_n.$$ Since the variables $H_1,\dots,H_n$ are mutually independent, we have $$\operatorname{Var}(H)=\operatorname{Var}(H_1)+\cdots+\operatorname{Var}(H_n)=\frac{11}{16}+\cdots+\frac{11}{16}=\frac{11n}{16}.$$