Hello, I am studying Variance for a binomial distribution and I am hoping if someone can help me understand where n^2 comes from.
E(Y|P) =np V(Y|P)=npq
V(Y) = E[V(Y|P)] + V[E(Y|P)]
=E(npq) +V(np) = nE[p(1-P)] + n^2V(P)
Hello, I am studying Variance for a binomial distribution and I am hoping if someone can help me understand where n^2 comes from.
E(Y|P) =np V(Y|P)=npq
V(Y) = E[V(Y|P)] + V[E(Y|P)]
=E(npq) +V(np) = nE[p(1-P)] + n^2V(P)
It looks like you're placing a distribution on P.
But the n is fixed.
If all you want is.... $\displaystyle V(aX+b)=a^2V(X)$, well that's easy.
The definition of variance is $\displaystyle V(Y)=E\bigl((Y-\mu_y)^2\bigr)$.
Let $\displaystyle Y=aX+b$, so $\displaystyle \mu_Y=a\mu_X+b$.
Hence $\displaystyle V(Y)=E(aX+b-(a\mu_x+b))^2=E(aX-a\mu_x)^2$
$\displaystyle =E(a(X-\mu_x))^2=a^2E(X-\mu_x)^2=a^2V(X)$ .