in binomial distribution mean and variance are equal code example Example: variance of binomial distribution Var(X)=np(1-p)