码迷,mamicode.com
首页 > 其他好文 > 详细

Bias of an estimator

时间:2015-06-14 00:20:48      阅读:152      评论:0      收藏:0      [点我收藏+]

标签:

Bias of an estimator

In?statistics, the?bias?(or?bias function) of an?estimator?is the difference between this estimator‘s?expected value?and the true value of the parameter being estimated. An estimator or decision rule with zero bias is called?unbiased. Otherwise the estimator is said to be?biased. In statistics, "bias" is an objective statement about a function, and while not a desired property, it is not pejorative, unlike the ordinary English use of the term "bias".

All else equal, an unbiased estimator is preferable to a biased estimator, but in practice all else is not equal, and biased estimators are frequently used, generally with small bias. When a biased estimator is used, the bias is also estimated. A biased estimator may be used for various reasons: because an unbiased estimator does not exist without further assumptions about a population or is difficult to compute (as in?unbiased estimation of standard deviation); because an estimator is median-unbiased but not mean-unbiased (or the reverse); because a biased estimator reduces some?loss function?(particularly?mean squared error) compared with unbiased estimators (notably in?shrinkage estimators); or because in some cases being unbiased is too strong a condition, and the only unbiased estimators are not useful. Further, mean-unbiasedness is not preserved under non-linear transformations, though median-unbiasedness is (see?effect of transformations); for example, the?sample variance?is an unbiased estimator for the population variance, but its square root, the?sample standard deviation, is a biased estimator for the population standard deviation. These are all illustrated below.

Definition

Suppose we have a?statistical model, parameterized by a real number?技术分享, giving rise to a probability distribution for observed data,?技术分享, and a statistic?技术分享 which serves as an?estimator?of?技术分享?based on any observed data?技术分享. That is, we assume that our data follows some unknown distribution?技术分享?(where?技术分享?is a fixed constant that is part of this distribution, but is unknown), and then we construct some estimator?技术分享?that maps observed data to values that we hope are close to?技术分享. Then the?bias?of this estimator (relative to the parameter?技术分享) is defined to be

技术分享

where?技术分享denotes?expected value?over the distribution?技术分享, i.e. averaging over all possible observations?技术分享. The second equation follows since?技术分享?is measurable with respect to the conditional distribution?技术分享.

An estimator is said to be?unbiased?if its bias is equal to zero for all values of parameter?技术分享.

There are more general notions of bias and unbiasedness. What this article calls "bias" is called "mean-bias", to distinguish?mean-bias from the other notions, with the notable ones being "median-unbiased" estimators. For more details, the general theory of unbiased estimators is briefly discussed near the end of this article.

Terminology

This article uses the following symbols and definitions:

技术分享?is the population mean

技术分享 is the sample mean

技术分享is the population variance

技术分享 is the biased sample variance (i.e. without Bessel‘s correction)

技术分享 is the unbiased sample variance (i.e. with Bessel‘s correction)

The standard deviations will then be the square roots of the respective variances. Since the square root introduces bias, the terminology "uncorrected" and "corrected" is preferred for the standard deviation estimators:

技术分享 is the uncorrected sample standard deviation (i.e. without Bessel‘s correction)

技术分享?is the corrected sample standard deviation (i.e. with Bessel‘s correction), which is less biased, but still biased

Population variance

In general, the?population variance?of a?finite?population?of size?技术分享?with values?技术分享 is given by

技术分享

Where

技术分享

is the population mean. The population variance therefore is the variance of the underlying probability distribution. In this sense, the concept of population can be extended to continuous random variables with infinite populations.

Sample variance

In many practical situations, the true variance of a population is not known?a priori?and must be computed somehow. When dealing with extremely large populations, it is not possible to count every object in the population, so the computation must be performed on a?sample?of the population.[7]?Sample variance can also be applied to the estimation of the variance of a continuous distribution from a sample of that distribution.

The?sample variance?of a random variable demonstrates two aspects of estimator bias: firstly, the naive estimator is biased, which can be corrected by a scale factor; second, the unbiased estimator is not optimal in terms of?mean squared error?(MSE), which can be minimized by using a different scale factor, resulting in a biased estimator with lower MSE than the unbiased estimator. Concretely, the naive estimator sums the squared deviations and divides by?n,?which is biased. Dividing instead by?n???1 yields an unbiased estimator. Conversely, MSE can be minimized by dividing by a different number (depending on distribution), but this results in a biased estimator. This number is always larger than?n???1, so this is known as a?shrinkage estimator, as it "shrinks" the unbiased estimator towards zero; for the normal distribution the optimal value is?n?+?1.

Suppose we take a?sample with replacement?of?n?values?技术分享 from the population(with?expectation?技术分享?and?variance?技术分享), where?n?<?N, and estimate the variance on the basis of this sample. If the?sample mean?and uncorrected?sample variance?are defined as

技术分享, 技术分享

then?技术分享 is a biased estimator of?技术分享, because

技术分享

In other words, the expected value of the uncorrected sample variance does not equal the population variance?技术分享, unless multiplied by a normalization factor. The sample mean, on the other hand, is an unbiased?estimator of the population mean?技术分享.

The reason that?技术分享?is biased stems from the fact that the sample mean is an?ordinary least squares?(OLS) estimator for?技术分享:?技术分享?is the number that makes the sum?技术分享?as small as possible. That is, when any other number is plugged into this sum, the sum can only increase. In particular, the choice?技术分享?gives,

技术分享

and then

技术分享

Note that the usual definition of sample variance is

技术分享

and this is an unbiased estimator of the population variance. This can be seen by noting the following formula, which follows from the?Bienaymé formula, for the term in the inequality for the expectation of the uncorrected sample variance above:

技术分享

The ratio 技术分享 between the biased (uncorrected) and unbiased estimates of the variance is known as?Bessel‘s correction.

Source of bias

Suppose the mean of the whole population is 2050, but the statistician does not know that, and must estimate it based on this small sample chosen randomly from the population:

技术分享

One may compute the sample average:

技术分享

This may serve as an observable estimate of the unobservable population average, which is?2050. Now we face the problem of estimating the population variance. That is the average of the squares of the deviations from?2050. If we knew that the population average is 2050, we could proceed as follows:

技术分享

But our estimate of the population average is the sample average,?2052, not?2050. Therefore we do what we can:

技术分享

This is a substantially smaller estimate. Now a question arises: is the estimate of the population variance that arises in this way using the sample mean?always?smaller than what we would get if we used the population mean? The answer is?yes?except when the sample mean happens to be the same as the population mean.

We are seeking the sum of squared distances from the population mean, but end up calculating the sum of squared differences from the sample mean, which, as will be seen, is the number that minimizes that sum of squared distances. So unless the sample happens to have the same mean as the population, this estimate will always underestimate the population variance.

To see why this happens, we use a simple identity in algebra:

技术分享

With 技术分享?representing the deviation from an individual to the sample mean, and 技术分享?representing the deviation from the sample mean to the population mean. Note that we‘ve simply decomposed the actual deviation from the (unknown) population mean into two components: the deviation to the sample mean, which we can compute, and the additional deviation to the population mean, which we can not. Now apply that identity to the squares of deviations from the population mean:

技术分享

Now apply this to all five observations and observe certain patterns:

技术分享

The sum of the entries in the middle column must be zero because the sum of the deviations from the sample average must be zero. When the middle column has vanished, we then observe that

  • The sum of the entries in the first column (技术分享) is the sum of the squares of the deviations from the sample mean;
  • The sum of?all?of the entries in the remaining two columns (技术分享?and?技术分享) is the sum of squares of the deviations from the population mean, because of the way we started with?[2053???2050]2, and did the same with the other four entries;
  • The sum of?all?the entries must be bigger than the sum of the entries in the first column, since all the entries that have not vanished are positive (except when the population mean is the same as the sample mean, in which case all of the numbers in the last column will be?0).

Therefore:

  • The sum of squares of the deviations from the?population?mean will be bigger than the sum of squares of the deviations from the?sample?mean (except when the population mean is the same as the sample mean, in which case the two are equal).

That is why the sum of squares of the deviations from the?sample?mean is too small to give an unbiased estimate of the population variance when the average of those squares is found.

Bessel‘s correction

In?statistics,?Bessel‘s correction, named after?Friedrich Bessel, is the use of 技术分享 instead of 技术分享?in the formula for the?sample variance?and?sample standard deviation, where?技术分享?is the number of observations in a sample. This corrects the bias in the estimation of the population variance, and some (but not all) of the bias in the estimation of the population standard deviation, but often increases the?mean squared error?in these estimations.

That is, when?estimating?the population?variance?and?standard deviation?from a sample when the population mean is unknown, the sample variance estimated as the?mean?of the squared deviations of sample values from their mean (that is, using a multiplicative factor?技术分享) is a?biased estimator?of the population variance, and for the average sample underestimates it. Multiplying the standard sample variance as computed in that fashion by?技术分享(equivalently, using?技术分享 instead of?技术分享 in the estimator‘s formula) corrects for this, and gives an unbiased estimator of the population variance. In some terminology, the factor?技术分享 is itself called?Bessel‘s correction.

One can understand Bessel‘s correction intuitively as the?degrees of freedom?in the?residuals?vector (residuals, not errors, because the population mean is unknown):

技术分享

where?技术分享?is the sample mean. While there are?技术分享 independent samples, there are only?技术分享 independent residuals, as they sum to 0.

Caveats

Three caveats must be borne in mind regarding Bessel‘s correction: firstly, it does not yield an unbiased estimator of standard?deviation;?secondly, the corrected estimator often has worse (higher)?mean squared error?(MSE) than the uncorrected estimator, and never has the minimum MSE: a different scale factor can always be chosen to minimize MSE; thirdly it is only necessary when the population mean is unknown (and estimated as the sample mean).

The first is a subtle point: while the sample variance (using Bessel‘s correction) is an unbiased estimate of the population variance, its?square root, the sample standard deviation, is a?biased?estimate of the population standard deviation; because the square root is a?concave function, the bias is downward, by?Jensen‘s inequality. There is no general formula for an unbiased estimator of the population standard deviation, though there are correction factors for particular distributions, such as the normal; seeunbiased estimation of standard deviation?for details. An approximation for the exact correction factor for the normal distribution is given by using?n???1.5 in the formula: the bias decays quadratically (rather than linearly, as in the uncorrected form and Bessel‘s corrected form).

Secondly, the unbiased estimator does not minimize MSE compared with biased estimators, and generally has worse MSE than the uncorrected estimator (this varies with?excess kurtosis). MSE can be minimized by using a different factor. The optimal value depends on excess kurtosis, as discussed in?mean squared error: variance; for the normal distribution this is optimized by dividing by?n?+?1 (instead of?n???1 or?n).

Thirdly, Bessel‘s correction is only necessary when the population mean is unknown, and one is estimating?both?population mean?and?population variance from a given sample set, using the sample mean to estimate the population mean. In that case there aren?degrees of freedom in a sample of?n?points, and simultaneous estimation of mean and variance means one degree of freedom goes to the sample mean and the remaining?n???1 degrees of freedom (the?residuals) go to the sample variance. However, if the population mean is known, then the deviations of the samples from the population mean have?n?degrees of freedom (because the mean is not being estimated – the deviations are not residuals but?errors) and Bessel‘s correction is not applicable.

This correction is so common that the term "sample variation" and "sample standard deviation" are frequently used to mean the corrected estimators (unbiased sample variation, less biased sample standard deviation), using?技术分享. However caution is needed: some calculators and software packages may provide for both or only the more unusual formulation.

Formula

The sample mean is given by

技术分享

The biased sample variance is then written:

技术分享

and the unbiased sample variance is written:

技术分享

Proof of correctness – Alternate 1

As a background fact, we use the identity?技术分享?which follows from the definition of the standard deviation and?linearity of expectation.

A very helpful observation is that for any distribution, the variance equals half the expected value of?技术分享?when?技术分享?are independent samples. To prove this observation we will use that?技术分享?(which follows from the fact that they are independent) as well as linearity of expectation:

技术分享

Now that the observation is proven, it suffices to show that the expected squared difference of two samples from the sample population?技术分享?equals?技术分享?times the expected squared difference of two samples from the original distribution. To see this, note that when we pick?技术分享?and?技术分享?via?技术分享?being integers selected independently and uniformly from 1 to?技术分享, a fraction?技术分享?of the time we will have?技术分享?and therefore the sampled squared difference is zero independent of the original distribution. The remaining?技术分享?of the time, the value of?技术分享?is the expected squared difference between two unrelated samples from the original distribution. Therefore, dividing the sample expected squared difference by?技术分享, or equivalently multiplying by?技术分享gives an unbiased estimate of the original expected squared difference.

Proof of correctness – Alternate 2

Recycling an?identity for variance,

技术分享

So

技术分享

and by definition,

技术分享

Note that, since?技术分享?are a random sample from a distribution with variance?技术分享, it follows that for each?技术分享:

技术分享

and also

技术分享

This is a property of the variance of uncorrelated variables, arising from the?Bienaymé formula. The required result is then obtained by substituting these two formulae:

技术分享

Proof of correctness – Alternate 3

The expected discrepancy between the biased estimator and the true variance is

技术分享

So, the expected value of the biased estimator will be

技术分享

So, an unbiased estimator should be given by

技术分享

Intuition

In the biased estimator, by using the sample mean instead of the true mean, you are underestimating each?技术分享 ?by?技术分享. We know that the variance of a sum is the sum of the variances (for uncorrelated variables). So, to find the discrepancy between the biased estimator and the true variance, we just need to find the variance of?技术分享.

This is just the?variance of the sample mean, which is?技术分享. So, we expect that the biased estimator underestimates?技术分享?by?技术分享, and so the biased estimator = (1???1/n)?×?the unbiased estimator = (n???1)/n?×?the unbiased estimator.

References

Bias of an estimator

标签:

原文地址:http://www.cnblogs.com/yiyuehuan/p/4574303.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!