I have the following problem: Suppose an unbiased coin is tossed 10 times. Let D be the random variable that denotes the number of heads minus the number of tails. What is the variance of D?
My solution is: Let X be the number of heads and Y be the number of tails, so $X~Bin(10,\frac{1}{2})$ and $Y~Bin(10,\frac{1}{2})$ and $D=X-Y$
Now $Var(D)=Var(X)+Var(Y)-2COV(X,Y)$ but since X and Y are Independent we have that covariance will be 0 i.e, $COV(X,Y)=0$
so $Var(D)=Var(X)+Var(Y)=2np(1-p)=2\cdot10\cdot\frac{1}{2}(1-\frac{1}{2})=5$
Where am i wrong in this? Any help is appreciated!