estimator
estimator
The sample mean and variance (computed by the MATLAB functions mean and var)
are often used to estimate the true mean and variance of a random variable y from the
random sample y1,y2,...,yn.
The definition of the sample mean my is:
The definition of the sample variance sy2 depends on whether the true mean is known. If the true mean
is known and is used in the sample variance calculation, the sample variance definition is:
If the sample mean (rather than the true mean) is used in the sample variance calculation in the
Note that the second definition divides the sum by n -1 rather than n . This is to insure that the
variance estimate is unbiased. We will use this second definition (since we will generally not know the
true mean). If n is large the two definitions are practically equivalent.
In order to assess the properties of these estimators we evaluate their means and
variances.
Mean and Variance of my:
The mean and variance of my are obtained by applying the linearity properties of the
expectation and by noting that the measurements in a random sample are
independent and identically distributed (so the covariances between different
measurements are zero):
These results show that the sample mean is unbiased and consistent.
Mean and Variance of sy2:
The mean and variance of sy2 are obtained by applying the same properties.
The derivation of E[sy2] is complicated by the dependence of the sample mean (inside
the variance summation) on the measurements. However, it is possible after some
manipulation to show that the 1/(n-1) version of the sample variance is an unbiased
estimate of the true variance.
The derivation of Var[sy2] is more difficult but can be found in advanced statistics
texts. The result indicates that the variance of sy2 is proportional to 1/n for large n, so
the sample variance is a consistent estimator of the true variance.
Suppose that we wish to estimate the parameters a and b of a uniform probability density fy(y) from a random
sample y1, y2,...,yn:
1. Express the mean and variance of the random variable in terms of the unknown
parameters:
E[y] = (a + b) / 2
Var[y] = (b - a)2 / 12
2. Replace the unknown parameters in these expressions by the estimates and and
replace the true mean and variance by the sample mean my and the sample variance sy2 :
Note the tendency of the estimates to cluster around the true values of a =1 and b = 4. The estimates are both
unbiased, with E[ ] = 1.0092 and E[ ] =3.9917. Deviations from these means can be significant (as large
as 0.5) with n = 20.
This plot of the variances of and vs. sample size (n) indicates that the method of moment estimates are
consistent since both variances decrease as 1/n.
The method of moments extends to more than two parameters and can be used with
other probability distributions. However, there is no guarantee that the approach will
give either an unbiased or minimum variance estimate.
The primary alternative to the method of moments is maximum likelihood
estimation. Maximum likelihood estimators have desirable large sample properties
but can be biased and may not yield minimum variance estimates for small samples.
In practice, ad hoc estimation approaches for deriving estimators may prove best in
certain applications. The performance of such estimators should be checked with
stochastic simulation.
For large samples this statistic has a unit normal probability distribution with a mean of 0.0 and a
variance of 1.0.
The unit normal cumulative distribution function is widely tabulated in statistics texts
and reference books.
The unit normal provides a reasonable approximation to probabilities away from the
tails of the distribution. For example, the probability that za is between -1 and +1 is
close to 0.68 for both the original standardized statistic and the unit normal
approximation.