The concept of statistical expectation is actually quite an easy
one. It is an arithmetic average, just one calculated from
probabilities instead of being calculated from samples. So, for
example, if
is the probability that we find
alleles
in our sample, the expected number of
alleles in
our sample is just

Now consider the expected value of our sample estimate of the
population allele frequency,
, where
now refers to
the number of
alleles we actually found.

What about estimating the frequency of heterozygotes within a
population? The obvious estimator is
. Well,

If you've ever wondered why you typically divide the sum of squared
deviations about the mean by
instead of
when calculating the
variance of a sample, this is why. Dividing by
gives you a
(slightly) biased estimator.