Analytical expression for variance as a function of the mean value I have a research problem that seems analogous to a 'draw balls from a bin' problem.
Imagine an experiment where $N$ balls are drawn from an infinite bin containing '0' balls and '1' balls, where $N$ is a large number and the probability of drawing a '1' or '0' ball is the same. 
After each experiment, the mean of the values (sum of the values from all of the balls divided by $N$) and the variance about this mean are calculated. A large number of experiments is conducted with the aim of relating the variance, $v$, to the mean value, $m$. 
Is there an analytical expression for $v = f(m)$ for large $N$? 
From induction, it seems as if this expression is 
$$
v = m \times (1-m).
$$
Does this seem correct? This may have a well-known result, but I don't have the statistics expertise to prove that this is the correct expression.
Ideally, I would like this analytical expression and an idea of how this expression might change if the likelihood of getting a '1' ball is different than that of getting a '0' ball.
 A: Since the mean is $m$, the total is $mN$, which must be the number of ones, whence the number of zeros is $N-mN = (1-m)N$.  Each $1$ contributes $(1-m)^2$ to the variance and each $0$ contributes $(0-m)^2$ to the variance.  The sum of these squares therefore equals
$$(mN)\times(1-m)^2 + ((1-m)N)\times(0-m)^2 = m(1-m)N.$$
If you compute the variance by dividing this by $N-1$ you will get $$v=m(1-m)\frac{N}{N-1};$$ otherwise, upon dividing by $N$, you will get the simpler $$v^\prime=m(1-m),$$
exactly as you discovered experimentally.  Evidently the two values grow closer as $N$ increases.
Notice this result has nothing to do with the probabilities of drawing the ones or zeros: the data are whatever they are, regardless of the process used to generate them, and $m$ and $v$ depend only on the data.
A: Look at the binomial distribution. If you divide its variance by its mean, having $p=1/2$, you get $1/n$.
I think this will be your solution, but don't have a proof. Your experiments is set up slightly differently than the straight case of application of this expression, but I think it'll end up with the same or very close answer asymptotically.
