I am trying to calculate the mean and the variance from sample has generated from Binomial distribution .with p=0.1, m=number of trials is 100, n =sample size is 100 and N=nc 10^5.My equation is why the mean and variance sometimes are equal . M=V. about 10% from the data. here is my code
nc=10^5
m=100
n=100
p=0.1
for(k in 1:nc){
b[k,]=rbinom(n,m,p)
M=mean(b[k,])
V=var(b[k,])
if( M==V){
print(M)
}
}