find the mean and variance of binomial distribution statistics code example Example: variance of binomial distribution Var(X)=np(1-p)