Variance of a modified sum of dice rolls Suppose one rolls 3 (fair) dice with 20 numbered faces and sum the results. Call that sum $X$. The distribution will resemble a normal distribution with mean $3\cdot 10.5=31.5$ and variance $3\cdot\frac{20^2-1}{12}=99.75$.
Define the following random variable $X'$ as follows: $X'$ is the sum of the dice results, plus 1 in case there are more even results than odd results. The mean of $X'$ will be exactly $\mathbb{E}(X)+0.5=32$. However, what will happen to the variance of $X'$?
If I just toss a coin and add 0 or 1 to the sum, depending on the side of the coin, the expectation will too grow by 0.5, and the variance will grow by $\frac{2^2-1}{12}=0.25$. However, $X'$ is not just a coin toss added to the result of the dice - the optional addition of 1 depends on the results of the dice rolls.
So what is $\text{Var}(X)$?
 A: We can compute. Suppose the dice are numbered. Let $X_i$ be the number obtained on the $i$-th die, and let $B$ be the "bonus." We want the variance of $X_1+X_2+X_3+B$. 
Since we know the mean of $X_1+X_2+X_3+B$, it is enough to find $E((X_1+X_2+X_3+B)^2)$.  Expand the square. We get 
$$(X_1+X_2+X_3)^2 +B^2 +2BX_1+2BX_2+2BX_3.$$
We know the expectations of the first two terms. The expectations of the $BX_i$ are all equal, so we only need to find $E(BX_1)$.
Suppose that $X_1$ is even. This has probability $\frac{1}{2}$. Then the probability there are more even than odd is $\frac{3}{4}$. Suppose that $X_1$ is odd. Then the probability there are more even than odd is $\frac{1}{4}$. It follows that
$$E(BX_1)=\frac{1}{2}\cdot\frac{3}{4}(2+4+\cdots +20)+\frac{1}{2}\cdot\frac{1}{4}(1+3+\cdots +19).$$
This can be simplified nicely, for example by viewing $\frac{3}{4}(2+4+\cdots+20)$ as $\frac{1}{4}(2+\cdots +20) +\frac{1}{2}(2+\cdots +20)$. 
The method generalizes readily to any odd number of tosses, and dice with faces numbered $1$ to $2k$. 
