Techniqueintro
Method of moments
Also called moment matching estimation.
Estimate parameters by setting the first few sample moments equal to the population moments and solving for the parameters. Simple and consistent, but often not efficient.
The method of moments is a recipe for building an estimator: write the first population moments as functions of the unknown parameters, replace them by the sample moments, and solve the equations for the parameters. The sample moments converge to the population moments by the law of large numbers, so the estimate is consistent whenever the moment map can be inverted continuously. It needs no likelihood and often has a closed form, but it is usually less precise than maximum likelihood and can give values that the data rule out.
In plain words
A model with unknown numbers predicts what the average of the data should be, what the average of the squares should be, and so on. Compute those averages from the data you have. Then choose the unknown numbers so that the model's predictions match what you computed. With two unknowns you match two averages, with three unknowns three.
The idea is old and simple, and it often needs only a little algebra. With a lot of data the averages settle down, so the answer settles near the truth. With little data, or a model that the data fit badly, the answer can be poor or even impossible, such as a negative count.
When it applies
- The data are iid with law , . The method extends to stationary data whose sample moments converge, as for the Yule-Walker equations.
- There are functions with , usually . Write and .
- The moment map is one-to-one (the parameter is identified by these moments), and the equations can be solved, in closed form or numerically.
- For consistency, must be continuous at . For a normal limit, and must be differentiable with an invertible Jacobian.
The template
MOMENT-ESTIMATE(x_1, ..., x_n)- 1
choose MOMENT-FUNCTIONS g_1, ..., g_k ▷ hole: usually g_j(x) = x^j - 2
for j ← 1 to k do - 3
m_j ← (1/n) Σ_i g_j(x_i) ▷ sample moments - 4
write MOMENT-MAP μ_j(θ) = E_θ[g_j(X)], j = 1..k ▷ hole: from the model - 5
θ̂ ← SOLVE(μ(θ) = m) ▷ hole: algebra or a root finder - 6
if θ̂ does not exist or lies outside Θ then - 7
θ̂ ← REPAIR(m) ▷ hole: report, project or switch method - 8
return θ̂ and the plug-in estimate ψ(θ̂)
The holes are the choice of moment functions (line L1), the moment map of the model (line L4), the solver (line L5) and the rule for an impossible solution (line L7). Central moments may replace raw ones: matching and is the same as matching the mean and the variance , with the sample variance taken with divisor , . Say which divisor is used; the sample variance with divisor gives a slightly different, equally consistent estimator.
Why it is consistent. Fix . By the law of large numbers, in probability. If is continuous at and defined on a neighbourhood of it, then in probability, because continuous maps keep consistency (proved on consistent estimator). The event that line L7 is needed has probability tending to 0. This is proved; it holds for every that meets the conditions.
The asymptotic law. Let be the covariance matrix of , assumed finite, and , assumed invertible and continuous. The multivariate central limit theorem gives , and the delta method applied to gives
Plugging into this matrix gives standard errors.
Classic examples
Normal. For , and , so and , the divisor- variance. For this is and . Here the method agrees with maximum likelihood.
Gamma. For the gamma law with shape and scale , the mean is and the variance is . Solving gives
On the same data, and ; check: and . The maximum likelihood estimate of has no closed form and needs a root finder such as the Newton-Raphson method; the moment estimate is a common starting point for it.
Binomial with both parameters unknown. For Binomial counts, the mean is and the variance is , so and (Casella and Berger, Section 7.2.1). For the counts , and , so and . Both lie outside . This happens whenever , a sample that is more spread out than any binomial law with that mean.
Mixtures. Pearson (1894) fitted a mixture of two normal laws, five parameters, to measurements of crabs by matching five moments. The equations reduce to one polynomial equation of degree nine, which he solved by hand. The modern alternative is expectation-maximization on the Gaussian mixture model.
Autoregressions. The Yule-Walker equations match the sample autocovariances of a stationary series with those of an autoregressive model; for AR(1), .
Variations
- Generalized method of moments. With more moment conditions than parameters, the equations cannot all hold on data, and the generalized method of moments minimizes a weighted quadratic form in the sample moments instead. The plain method is the exactly identified case.
- Estimating equations. Matching for functions that depend on is an M-estimator. Maximum likelihood is the case = the score, which shows that the right moments can recover full efficiency.
- Other moments. Probability-weighted moments, L-moments, factorial moments for counts and moments of are the same template with other .
- Matching other summaries. Matching sample quantiles to population quantiles is the same idea with a different summary; it does not need any moments to exist.
- Simulated moments. When has no formula, estimate it by simulation at each trial and solve by a stochastic search.
Pitfalls
- Estimates the data rule out. For iid Uniform, gives . For the data , , while the largest observation is 10, so is certain. The estimate is still inside ; truly impossible values come from examples such as the binomial one above.
- Low efficiency. In the same uniform model, , while the unbiased estimator has variance . The ratio is , so the moment estimator needs about observations for the accuracy that the maximum reaches with . Fisher (1922) used efficiency to compare the method with maximum likelihood for Pearson's curves.
- The choice of moments matters. For Poisson data, and , so both and are moment estimators of . On they give 8 and 12.8. Use the lowest moments that identify ; higher moments have larger variance and need more moments to be finite.
- Moments that do not exist. For Cauchy data no moment exists, and does not converge. Use quantiles or the likelihood.
- Several roots, or none. Nonlinear moment equations can have several solutions in , as Pearson's degree nine equation does, or none. The template must say which root is reported.
- Cancellation. Computing in floating point loses digits when is large compared with the spread. Compute the central moments by a two-pass formula or by Welford's algorithm.
Exercises
- For iid exponential data with rate (), find the moment estimator, and use the delta method to find its asymptotic variance. Answer. . With , , so . This is also the maximum likelihood estimator.
- For iid Uniform, find the moment estimators from the mean and the divisor- variance, and evaluate them on . Answer. The mean is and the variance is , so and . Here , so ; both agree with the data, since and .
- For the beta law with parameters , with mean and variance , find the moment estimators and the condition on the data for them to lie in . Answer. With , and . They are positive exactly when and .
- Show that for Bernoulli data the moment estimator from and the maximum likelihood estimator are both , and that matching instead gives nothing new. Answer. gives . Since for 0 and 1 data, .
- Prove the efficiency ratio for the uniform example. Answer. , so . The maximum has density on , so and , which give . Divide.
References
- Karl Pearson, Contributions to the mathematical theory of evolution, Philosophical Transactions of the Royal Society A 185, 1894, pp. 71 to 110 (a mixture of two normal curves fitted by its first five moments, through an equation of degree nine)
- George Casella and Roger L. Berger, Statistical Inference, second edition, Duxbury, 2002, Section 7.2.1 (method of moments, with the binomial example in which both k and p are unknown)
- Larry Wasserman, All of Statistics, Springer, 2004, Section 9.2 (method of moments, with its consistency and asymptotic normality)
- R. A. Fisher, On the mathematical foundations of theoretical statistics, Philosophical Transactions of the Royal Society A 222, 1922, pp. 309 to 368 (efficiency, and the loss of efficiency of the method of moments compared with maximum likelihood)
Where this leads
About this page
The build computes these levels from the evidence in the repository. Each row says what the next level needs. Read what the levels mean.
| Ladder | Level | What the next level needs |
|---|---|---|
| Human proof | H0 no proof |
|
| Lean | L0 no Lean part |
|
| Visual | V0 none |
|
| Writing | W2 basic |
|
Tag KGKBYG Edit this page History Report an error Markdown