formula of variance of x of Binomial Distribution code example Example: variance of binomial distribution Var(X)=np(1-p)