Unbiased vs consistent estimator
Sometimes code is easier to understand than prose. Here I presented a Python script that illustrates the difference between an unbiased estimator and a consistent estimator. Here are a couple ways to estimate the variance of a sample. The maximum likelihood estimate (MLE) is where x with a bar on top is the average of the x‘s. The unbiased estimate is Our code will generate samples from a normal distribution with mean 3 and variance 49. Both of the estimators above are consistent in the sense that as n, the number of samples, gets large, the estimated values get close to 49 with high probability. This is illustrated in the following graph. The horizontal line is at the expected value, 49. The code below takes samples of size n=10 and estimates the variance both ways. It does this N times and average the estimates. If an estimator is unbiased, these averages should be close to 49 for large values of N. Think of N going to infinity while n is small and fixed. Note that the sample size is
Sometimes code is easier to understand than prose. Here I presented a Python script that illustrates the difference between an unbiased estimator and a consistent estimator. Here are a couple ways to estimate the variance of a sample. The maximum likelihood estimate (MLE) is where x with a bar on top is the average of the x ‘s. The unbiased estimate is Our code will generate samples from a normal distribution with mean 3 and variance 49. Both of the estimators above are consistent in the sense that as n , the number of samples, gets large, the estimated values get close to 49 with high p
Explore this link on the map →related reading
- Approximating KL Divergencejoschu.net
- Maximum likelihood estimation - Wikipediaen.wikipedia.org
- Stein's example - Wikipediaen.wikipedia.org
- Research update: Towards a Law of Iterated Expectations for Heuristic Estimators — Alignment Research Centeralignment.org
- Competing with sampling — Alignment Research Centeralignment.org
- German tank problem - Wikipediaen.wikipedia.org
- X explains Z% of the variance in Y — LessWronglesswrong.com
- Bessel's correction - Wikipediaen.wikipedia.org
- report.dvistat.berkeley.edu
- ARC progress update: Competing with sampling — LessWronglesswrong.com
- Proofs involving ordinary least squares - Wikipediaen.wikipedia.org
- Algorithms for calculating variance - Wikipediaen.wikipedia.org