The first article in the series established probability spaces, conditional probability, and random variables; the second article in the series covered common distributions, numerical summaries, joint distributions, and correlation. Those two articles started from a probability model, assuming the distribution or parameters were already known; statistical inference faces the opposite problem: the researcher only has access to finite data, and wants to know the population distribution and unknown parameters that produced it.
This article uses one running set of concrete numbers throughout, distinguishing between a statistic, an estimator, and an estimate, introducing the method of moments and maximum likelihood estimation, and covering bias, variance, mean squared error, and consistency. Finally, it derives why the sample mean is stable starting from the Markov and Chebyshev inequalities, then explains exactly what question each of the law of large numbers, the central limit theorem, and standard error answers.
1. From the Population to a Random Sample
1.1 Population, Sample, and Observations
The population is the entire set of individuals or generating mechanism a research question is concerned with — for example, every part produced on a given production line, every request a service will ever receive in the future, or the complete distribution of a given random variable. The population mean , population variance , and a Bernoulli success probability are all parameters; a parameter describes the population, and is usually unknown and fixed.
A researcher obtains observations from the population. Before observation, are random variables; after observation, are the concrete values already obtained. The distinction between uppercase and lowercase matters: changes across repeated sampling and therefore has a sampling distribution, while computed from one particular dataset is just a single number.
The most commonly used theoretical model is an independent and identically distributed (IID) random sample: every follows the same distribution, and different observations are mutually independent. IID isn’t a property data automatically has. Continuously measured network latency may have temporal dependence, multiple records generated by the same user may cluster together, and convenience sampling may fail to represent the population. When the sampling mechanism violates independence or representativeness, adding more data points doesn’t automatically eliminate a systematic bias.
1.2 Statistic, Estimator, and Estimate
A statistic is a function of the sample, and its formula must not contain any unknown parameter. The sample mean , the sample maximum , and the empirical distribution function are all statistics. contains the unknown , so it isn’t a statistic that can be computed directly from the data.
When a statistic is used to infer an unknown parameter, it’s called an estimator. For example, is an estimator of the population mean. The number obtained by plugging actual data into an estimator is called an estimate; if the five observations are , then . The same estimation formula is a random variable before sampling, and produces a determinate result after sampling.
2. Computing Common Statistics from a Sample
2.1 Central Location, Proportion, Moments, and Variance
Consider five days’ worth of failure counts . The sample mean is , and the sample median is 2. The median only depends on the middle position after sorting, whereas the mean is affected by every value; if the failure count 6 became 60, the median would still be 2, but the mean would increase from 3 to 13.8.
Binary data commonly use the sample proportion. If the inspection results for ten products are , with 1 meaning defective, then the number of defects is and the sample proportion is . Since the mean of binary values also equals the proportion of 1s, a Bernoulli sample satisfies as well.
The -th order sample raw moment is . For the failure data, the first-order raw moment is , and the second-order raw moment is . The -th order sample central moment is ; the second-order central moment is .
The with denominator describes the average squared deviation of the current five data points, and also shows up in the maximum likelihood estimator for the normal distribution. If the goal is an unbiased estimate of the population variance, is usually used instead. The denominators and correspond to different purposes, and shouldn’t be swapped out of habit. The sample standard deviation is , in the same units as the original failure count.
2.2 Empirical Distribution, Quantiles, and Covariance
The empirical cumulative distribution function (empirical CDF) is defined as — that is, the proportion of the sample not exceeding . For the failure data, and . The empirical CDF preserves the full distributional information of a one-dimensional dataset without needing to first assume normal, Poisson, or some other parametric distribution.
Using the empirical quantile definition , the failure data gives , , . Different software may interpolate between adjacent order statistics differently, so quantile results for small samples can differ slightly. When reporting a quantile, note which definition or software default was used — don’t mistake a difference between interpolation rules for a computational error.
Paired data needs to describe how two variables vary together. Suppose the input for four trials is and the output is , with means and respectively. The sample covariance is . A positive sign indicates that a larger input tends to be accompanied by a larger output, but the magnitude of covariance changes depending on the units of measurement.
Standardizing the covariance gives the sample correlation coefficient . A correlation coefficient close to 1 indicates a strong positive linear relationship in the data, but this alone doesn’t prove that the input causes the output to increase — common causes, the sampling method, and nonlinear relationships all need to be analyzed separately. The model-level definitions of joint distributions, marginal distributions, and correlation can be found back in the second article in the series.
3. Estimating Parameters with the Method of Moments and Maximum Likelihood
3.1 The Method of Moments Aligns Theoretical Moments with Sample Moments
The method of moments first writes out the relationship between a distribution’s moments and its parameters, then sets the theoretical moments equal to the corresponding sample moments. If , then ; setting gives . For the ten products above with three defects, the method-of-moments estimate is 0.3. The Poisson distribution satisfies , so the Poisson rate parameter can likewise be estimated with .
If , the first two raw moments satisfy and . Setting the theoretical moments equal to and respectively gives and . The failure data yields and .
The method of moments is usually easy to compute, and also serves well as a starting point for numerical optimization, but it doesn’t necessarily make full use of the distribution’s information. Higher-order sample moments are also easily affected by extreme values. Which moments to choose, and whether the resulting estimate falls within a valid parameter range, both need to be checked against the specific model.
3.2 Maximum Likelihood Selects the Parameter That Best Explains the Data
Given observations , the likelihood function treats the joint PMF or PDF as a function of the parameter , written . With the data held fixed, maximum likelihood estimation (MLE) searches for the parameter value that maximizes . Likelihood is not “the probability that the parameter is true”; in a frequentist model, the parameter isn’t a random variable, and only compares the relative support the same data provides for two parameter values.
For a Bernoulli sample, if there are successes out of trials, the likelihood is . The product is usually rewritten as the log-likelihood , since taking the log doesn’t change the location of the maximum, and turns the product into an easier-to-handle sum. Setting the derivative equal to 0 gives . The three defects out of ten products again gives .
For an IID normal sample, the log-likelihood is . Maximizing separately over and gives and . For the failure data, the normal MLE gives , . The MLE for the normal variance uses denominator , even though it’s the sample variance with denominator that’s unbiased — maximum likelihood and unbiasedness are two different criteria.
MLE’s answer depends on the complete model. If the observations are actually dependent on one another, a censoring mechanism is ignored, or count data is mistakenly treated as normal data, differentiating a formally correct expression can still produce a meaningless estimate. Before starting the optimization, you should clearly write out the distribution of each observation, the parameter range, and how the joint likelihood decomposes.
4. Judging Whether an Estimator Is Reliable
4.1 Bias, Variance, and Mean Squared Error
An estimator needs to be evaluated under “repeatedly drawing samples of the same size.” The bias of an estimate of is defined as ; when the expectation equals the parameter, the estimator is called unbiased. For an IID sample, , so the sample mean is unbiased; the Bernoulli sample proportion is likewise unbiased.
The sample variance with denominator , , satisfies , which systematically underestimates the population variance. The reason is that the same batch of data was already used to estimate first, so the deviations are subject to one linear constraint, leaving only degrees of freedom. Multiplying by gives , which satisfies .
Unbiasedness doesn’t mean an estimate is necessarily close to the true value. An estimator’s mean squared error is . MSE penalizes both sampling fluctuation and systematic bias at the same time, so an estimator with very small bias but very large variance can end up worse than a stable estimator carrying a small amount of bias. Small-sample Bernoulli problems sometimes use Laplace smoothing, ; this estimator is usually biased, but it avoids directly producing an estimate of 0 or 1 when or , and can lower the MSE outside extreme parameter regions.
4.2 Consistency and Standard Error
If converges in probability to as the sample size increases, the estimator is called consistent — that is, for every . Consistency describes a large-sample limit, and doesn’t guarantee accuracy at any particular finite sample size; unbiasedness describes the sampling average at each fixed sample size, and doesn’t guarantee small variance either. The two properties answer different questions.
The standard deviation of an estimator’s sampling distribution is called the standard error (SE). If an IID sample has population variance , then , so ; since is usually unknown, it’s typically replaced with , giving the estimated standard error . The sample standard deviation describes the spread of individual observations, while the standard error describes the sampling fluctuation of the sample mean — the two values can’t be used interchangeably.
5. From Probability Inequalities to Limit Theorems
5.1 The Markov and Chebyshev Inequalities
If a random variable and , the Markov inequality gives , for . If request latency is non-negative with a mean of 100 ms, the Markov inequality can only guarantee . The bound can be quite loose, but the conclusion doesn’t require knowing the full distribution of the latency.
Applying the Markov inequality to the non-negative variable gives the Chebyshev inequality: . Substituting a multiple of the standard deviation, , turns this into . For instance, any distribution with finite variance satisfies ; the Chebyshev inequality assumes nothing about normality, so it can’t be casually swapped out for the normal distribution’s empirical 95% rule.
5.2 The Weak Law of Large Numbers, the Strong Law of Large Numbers, and the Central Limit Theorem
For an IID sample with mean and variance , the sample mean satisfies and . Applying the Chebyshev inequality to gives . The right-hand side approaches 0 as increases, so converges in probability to . This derivation gives the weak law of large numbers under the condition of finite variance.
The strong law of large numbers states a stronger property about the sample path: under suitable conditions, . The weak law says that, at a fixed large sample size, the probability of deviating from approaches 0; the strong law says that, except for a set of sample paths with probability 0, the running average computed along the same infinite sampling sequence converges. Almost-sure convergence doesn’t mean every conceivable sequence converges, and it doesn’t mean any finite-sample average is exactly equal to either.
The law of large numbers answers whether an estimator approaches its target, but doesn’t describe the shape of the remaining error. If an IID sample has finite mean and positive finite variance , the classical central limit theorem (CLT) gives . So, for large samples, this can be approximately written as , with the typical error scale being . Quadrupling the sample size roughly halves the standard error; multiplying the sample size by a hundred shrinks the standard error to roughly a tenth of its original value.
Take a Bernoulli sample of as an example: if is observed, plugging this into the estimated standard error gives . Under the normal approximation, the approximate 95% margin of error is , corresponding to an interval of roughly . This interval is an approximate result based on the sampling distribution; extremely small samples, very rare success events, strongly dependent data, or infinite-variance distributions can all cause the normal approximation to break down.
The central limit theorem also doesn’t mean the original data’s distribution itself becomes normal. What approaches normality is the centered and rescaled sample sum or sample mean. The law of large numbers is concerned with whether the location of is stable, while the central limit theorem is concerned with the scale and approximate shape of the fluctuation of . To extend both limit theorems to partial sums, random walks, and Brownian motion, continue on to Stochastic Processes 4: The Law of Large Numbers and the Central Limit Theorem.
The complete chain of statistical inference can be summarized as follows: the sampling design determines whether the data is representative, a statistic compresses the data into an interpretable number, an estimation method connects the statistic to the unknown parameter, bias and MSE assess the quality of a finite sample, and the law of large numbers together with the central limit theorem explain how an estimator stabilizes and fluctuates as the sample grows. Every step depends on explicit model assumptions; no formula on its own can compensate for a flawed sampling method or an inappropriate probability model.