Estimators and Sampling Distributions
An estimator is a rule for turning data into a guess about an unknown parameter. Since the data are random, the guess is random too, and it has a distribution. Everything in the rest of the course is a claim about that distribution.
1. Statistic, estimator, estimate
Definition. Given a random sample , a sample statistic is any function of the sample, .
A statistic is a random variable, because it is a function of random variables. is a statistic, is a statistic, and so is on its own, and so is the maximum .
An estimator is a statistic used to estimate a parameter. Nothing distinguishes it mathematically from any other statistic; the difference is intent.
An estimate is the number the estimator produces once data arrive.
Both halves of this distinction earn marks and the phrasing matters. The estimator is a rule applied to the random sample before the measurements are observed, and it has a distribution. The estimate is the realized value obtained once the actual measurements are recorded, and it is a fixed number with no distribution.
Concretely, with measurements of an unknown concentration , the estimator is and the estimate is computed from the recorded numbers.
2. The sampling distribution
Definition. The sampling distribution of a statistic is its probability distribution: the distribution of the values it would take across all possible samples of size .
This is the object the course is about, and it is worth being concrete about what it means, because it describes an experiment nobody performs.
Draw a sample of size and compute . Throw the sample away, draw another, compute again. The values differ, because the samples differ. Repeat forever and the histogram of values is its sampling distribution.
You only ever see one sample and one value. The sampling distribution is what lets you say something about how far that one value is likely to be from the truth.
Worked example. Deliveries take minutes, where is preparation and is travel time. The app refunds any order over 45 minutes, so the parameter of interest is .
Define the indicator , which is 1 if order was refunded and 0 otherwise. Then , so and .
The estimator is the sample proportion, which is a sample mean of indicators:
Its mean and variance follow immediately:
The variance step uses independence: the variance of a sum of independent random variables is the sum of the variances.
A detail that reveals whether the sampling distribution is understood. With , can equal 0.15? No. The numerator is a count between 0 and 10, so the estimator can only take the values . The sampling distribution is discrete, and it becomes finer as grows.
3. The mean and variance of the sample mean
Two facts used constantly. For a random sample with and :
The derivations are one line each. For the mean, using linearity:
For the variance, using independence and the fact that constants come out squared:
Which fact needs which assumption is examinable. The mean calculation uses only linearity of expectation, which holds whether or not the are independent. The variance calculation needs independence, because otherwise covariance terms survive:
This matters in the German tank problem, where serial numbers are sampled without replacement and are therefore dependent. The expectation argument still goes through; a variance argument would not.
The consequence of is the reason more data helps. The spread of the estimator shrinks as grows, so the estimate concentrates around the truth. Note that the standard deviation falls as , so halving the spread requires four times the data.
4. Chebyshev’s inequality
Theorem. For a random variable with and , and any ,
In words: the probability of landing more than from the mean is bounded by the variance divided by . Small variance forces the random variable to stay near its mean.
The bound needs no assumption about the shape of the distribution, which makes it universally applicable and usually loose. That combination is exactly its role: it proves things in general, and gives conservative numbers in particular.
Proof. Start from the definition of variance and use the law of the unconscious statistician:
The integrand is non-negative, so restricting the region of integration can only decrease the value:
On that region , so replacing the integrand by again only decreases it:
Rearranging gives the result.
Worked example: how many measurements? A sensor measures a true concentration with independent errors of mean 0 and variance 4. Using , how large must be to guarantee ?
Here and . Chebyshev with :
so
Requiring this to be at least 0.95:
The smallest such is .
5. The law of large numbers
Theorem (weak law of large numbers). Let be independent with common mean and common variance . Then for every , written , and read as converges in probability.
The sample mean concentrates on the true mean as the sample grows. This is the theorem that licenses estimating an expectation by an average.
Proof. Apply Chebyshev to , which has mean and variance :
Since and is fixed, the right side tends to 0 as .
The proof shows why both finiteness conditions appear in the statement: an infinite variance breaks the bound.
Applying the law to something other than the sample mean
The law is stated for a sample mean, and its reach comes from noticing that many statistics are sample means of something.
The recipe. To show , write as an average of i.i.d. random variables , check that and are finite, and conclude .
Worked example: a variance estimator. With known, consider
Set . If the are i.i.d. then so are the , and is their sample mean. Now
and is the extra condition required, which is a statement about the fourth moment of . Given both, the law gives .
Worked example: the empirical CDF. Fix a constant and let be the empirical CDF evaluated at . Writing ,
which is a sample mean of Bernoulli variables. Their mean is , and an indicator has variance . So : the empirical CDF converges to the true CDF at every point.
Worked example: a second moment. For , find with .
is the sample mean of , and all moments of a Poisson are finite, so the law gives . Using the variance identity rearranged,
so .
A warning about transformations
Convergence does not automatically pass through a function. Knowing does not by itself establish , and the corresponding statement about expectations is false in general: . This is the same phenomenon that produces bias in Bias.
6. The central limit theorem
The law of large numbers says where ends up. The central limit theorem says what its distribution looks like on the way, and that answer is the same for every starting distribution.
Theorem (central limit theorem). Let for any with finite mean and finite variance . Then equivalently, for large , is approximately .
The phrase carrying the weight is “any .” The sample mean of exponentials, Poissons, or Bernoullis is approximately normal for large , which is why normal-based procedures apply to data that are not remotely normal.
Standardization
Standardizing subtracts the mean and divides by the standard deviation, producing a variable with mean 0 and variance 1.
The two forms of are the same expression, since dividing by is multiplying by . The denominator is the standard deviation of , not of , which is the step most often got wrong.
The sample proportion
Applying the theorem to indicators gives the result used constantly.
Let and let be the proportion of independent trials in which occurs. Then , , and for large , is approximately .
Worked example. Each customer leaves a review independently with probability . What is the probability that more than 40 of the next 100 do?
Let indicate that customer leaves a review, so and .
Exact. , which is 1 - pbinom(40, 100, .3) .
By the central limit theorem. Convert the count to a proportion by dividing both sides by :
with approximately . Standardizing,
which is 1 - pnorm(.4, mean = .3, sd = sqrt(.3 * .7 / 100)) .
The two differ because is not infinite. The approximation improves with : at the sampling distribution of a proportion is visibly discrete and lumpy, by it is indistinguishable from a normal curve.
Chebyshev against the central limit theorem
Both bound the probability that is far from , and they answer different questions.
- Chebyshev gives a guaranteed bound with no distributional assumption, valid at any , and conservative.
- The central limit theorem gives an approximation, requires to be large, and is far tighter.
Use Chebyshev when the question says “guarantee” or gives no distributional information; use the central limit theorem when it says “approximately” or is large.
7. Distributions built from the normal
Three distributions arise from normal samples. They matter because the sample variance is itself random, and accounting for that randomness produces these shapes.
Chi-squared
Definition. The distribution is the distribution of where are independent standard normals. Its mean is .
The parameter is the degrees of freedom.
Result. For ,
The degrees of freedom is rather than because the deviations are taken from rather than . Once of the deviations are known the last is determined, since they sum to zero, so one degree of freedom has been spent estimating the mean.
The t distribution
Definition. The distribution is the distribution of where , , and the two are independent.
Result. For ,
This is the reason the t distribution exists. Standardizing with the true gives a standard normal. Replacing by the estimate puts a random quantity in the denominator, and that extra randomness makes the ratio more spread out than a normal. The density is bell-shaped and symmetric but with heavier tails.
As the distribution converges to the standard normal, because converges to and the denominator stops being random. At the is visibly heavy-tailed; by it is close to normal.
The F distribution
Definition. The distribution is the distribution of where , , independent.
A ratio of scaled chi-squared variables, used to compare two variances.
Vocabulary to deploy
- Sample statistic ; estimator against estimate.
- Sampling distribution: the distribution of a statistic across repeated samples.
- Converges in probability, ; converges in distribution, .
- Chebyshev’s inequality, distribution-free and conservative.
- Weak law of large numbers, proved from Chebyshev.
- Central limit theorem, valid for any distribution with finite mean and variance.
- Standardization .
- Degrees of freedom; chi-squared, t and F distributions.
- Linearity of expectation, which needs no independence, against the variance-of-a-sum rule, which does.