Why Estimate Both Binomial Parameters?
A binomial observation counts successes in a fixed number of trials. In some applications, the success probability is unknown, but the number of trials is unknown as well. For example, a hypothetical quality-control study might record the number of components passing inspection in each batch, while both the batch size and the probability that an individual component passes are to be estimated.
The method of moments uses the distribution’s mean and variance to produce two equations for the two unknown parameters. Solving those equations is straightforward; checking the answers is essential. The algebra can produce a negative probability, a non-integer trial count, or a trial count smaller than an observed count. Such results are not valid binomial parameter values, even if the equations were solved correctly.
The Two Moment Equations
For a binomial random variable, the population mean is \(\mu=E[X]=np\), and the population variance is \(\sigma^2=\operatorname{Var}(X)=np(1-p)\). The method of moments replaces the population moments by their sample counterparts and solves the resulting equations for the parameters.
Write the sample mean as \(\bar X\). Use the empirical second central moment \(m_2=\frac{1}{r}\sum_{j=1}^{r}(X_j-\bar X)^2\). Its divisor is \(r\), not \(r-1\): method of moments matches population moments to empirical moments. The quantity with divisor \(r-1\) is the usual unbiased sample variance, but it is not the empirical central moment used in these equations.
When \(\bar X>0\), divide the second equation by the first to isolate \(p\). Then use the mean equation to solve for \(n\). The resulting algebraic moment estimates are
Feasibility: Check the Estimates, Not Just the Algebra
A binomial distribution has \(0\le p\le1\), a positive-integer trial count, and support restricted to the integers from 0 through \(n\). For positive \(\bar X\), the formula for \(\widehat p_{\mathrm{MM}}\) is between 0 and 1 only if \(0\le m_2\le\bar X\). This is a necessary moment check, not a guarantee that the estimates are valid binomial parameters.
- If \(0<m_2<\bar X\), the formulas give \(0<\widehat p_{\mathrm{MM}}<1\) and a positive real \(\widehat n_{\mathrm{MM}}\). For a binomial model, however, \(n\) must be an integer; also, \(n\) must be at least as large as every observed count.
- If \(m_2=0\) and \(\bar X>0\), the formulas give \(\widehat p_{\mathrm{MM}}=1\) and \(\widehat n_{\mathrm{MM}}=\bar X\). This is feasible only if \(\bar X\) is a positive integer and all observations equal that count.
- If \(m_2=\bar X>0\), the probability formula gives \(p=0\), but a finite binomial distribution with \(p=0\) has mean 0. The equations do not provide a finite trial-count estimate for positive \(\bar X\).
- If \(m_2>\bar X>0\), the probability estimate is negative, so the moment estimates are infeasible.
- If \(\bar X=0\), all observed counts are zero and \(m_2=0\). The equations do not identify \(n\): any positive-integer \(n\) with \(p=0\) has this mean and variance.
A non-integer \(\widehat n_{\mathrm{MM}}\) should not be silently rounded and presented as the method-of-moments solution. It is the result of the unconstrained moment equations, but it is not itself a valid binomial trial count. Choosing an integer by some additional fitting rule is a different step and may not preserve the moment equations.
Worked Calculations
Worked Example: Two Feasible Moment Estimates
In a hypothetical study, four batches produce success counts \(1,1,3,3\). Assume the counts are independent observations from a common \(\operatorname{Binomial}(n,p)\) model, with unknown \(n\) and \(p\). Find the method-of-moments estimates and check feasibility.
Method: match the empirical mean and central moment to the binomial mean and variance. The sample size is \(r=4\), and \[ \bar X=\frac{1+1+3+3}{4}=\frac{8}{4}=2. \] The deviations from 2 are \(-1,-1,1,1\). Thus \[ m_2=\frac{(-1)^2+(-1)^2+1^2+1^2}{4} =\frac{4}{4}=1. \]
Substitute these moments: \[ \widehat p_{\mathrm{MM}}=\frac{2-1}{2}=\frac12=0.5, \qquad \widehat n_{\mathrm{MM}}=\frac{2^2}{2-1}=\frac{4}{1}=4. \] The estimated trial count is a positive integer, and the largest observed count, 3, is no greater than 4. The estimates are therefore feasible: \(n=4\) and \(p=0.5\).
Check: These estimates imply mean \(4(0.5)=2\) and variance \(4(0.5)(1-0.5)=1\), matching the empirical moments. The common mistake avoided here is checking only the probability and overlooking that the estimated trial count must also be an integer large enough to contain the observed counts.
Worked Example: Sample Moments That Are Infeasible
A hypothetical monitoring program records four independent success counts, \(0,0,3,3\), modeled as observations from a common \(\operatorname{Binomial}(n,p)\) distribution. Calculate the moment estimates and assess whether they are valid.
Method: calculate both empirical moments before judging feasibility. The mean is \[ \bar X=\frac{0+0+3+3}{4}=\frac{6}{4}=1.5. \] The deviations are \(-1.5,-1.5,1.5,1.5\), so \[ m_2=\frac{4(1.5^2)}{4} =\frac{4(2.25)}{4}=2.25. \]
The algebraic estimates are \[ \widehat p_{\mathrm{MM}}=\frac{1.5-2.25}{1.5} =\frac{-0.75}{1.5}=-0.5, \qquad \widehat n_{\mathrm{MM}}=\frac{1.5^2}{1.5-2.25} =\frac{2.25}{-0.75}=-3. \] Neither value is feasible: a probability cannot be \(-0.5\), and a binomial trial count cannot be \(-3\).
Check: The empirical variance \(2.25\) exceeds the empirical mean \(1.5\), violating the binomial moment condition \(\sigma^2=np(1-p)\le np=\mu\). These data could occur in a finite sample from a binomial population, but their observed moments do not produce feasible unrestricted method-of-moments estimates. The mistake avoided is treating every algebraic solution as an admissible parameter estimate.
Worked Example: Using the Correct Sample-Moment Divisor
In a hypothetical experiment, four independent observations from a common \(\operatorname{Binomial}(n,p)\) model are \(0,2,2,2\). Estimate \(n\) and \(p\) by moments, and compare the result with what happens if the usual unbiased sample variance is substituted.
Method: use the empirical central moment with divisor \(r\). First, \[ \bar X=\frac{0+2+2+2}{4}=\frac{6}{4}=1.5. \] The deviations are \(-1.5,0.5,0.5,0.5\). Their squared sum is \[ (-1.5)^2+3(0.5)^2=2.25+3(0.25)=3. \] Therefore \(m_2=3/4=0.75\), and \[ \widehat p_{\mathrm{MM}}=\frac{1.5-0.75}{1.5} =\frac{0.75}{1.5}=0.5, \qquad \widehat n_{\mathrm{MM}}=\frac{1.5^2}{1.5-0.75} =\frac{2.25}{0.75}=3. \] The estimated trial count is an integer and is at least the largest observed count, 2, so the estimates are feasible.
The unbiased sample variance instead divides the squared-deviation sum by \(r-1=3\), giving \(s^2=3/3=1\). If it is incorrectly substituted for \(m_2\), the formulas give \[ \widehat p=\frac{1.5-1}{1.5}=\frac{1}{3}, \qquad \widehat n=\frac{1.5^2}{1.5-1} =\frac{2.25}{0.5}=4.5. \] These are not the method-of-moments estimates based on empirical moments. The incorrect calculation also produces a non-integer trial count. The trap avoided is using the \(r-1\) divisor in place of the method-of-moments divisor \(r\).
Check: The correct estimates imply mean \(3(0.5)=1.5\) and variance \(3(0.5)(0.5)=0.75\), exactly the empirical mean and central moment.
Practical Interpretation and Exam Checks
The two moment equations are useful because they separate the roles of the parameters. The mean \(np\) alone cannot distinguish a large trial count with a small success probability from a small trial count with a larger probability. The variance supplies the additional information: for a positive mean, the ratio of variance to mean is \(1-p\). Matching both moments therefore gives an estimate for \(p\), followed by an estimate for \(n\).
A reliable solution should show the empirical mean and the empirical central moment before substituting into the formulas. Then check, in order, that the probability lies between 0 and 1, the estimated trial count is a positive integer, and the trial count is at least the largest observed count. State explicitly if the equations yield only algebraic estimates and fail one of these feasibility checks. In particular, a non-integer estimate is not repaired by rounding unless the problem specifically asks for an additional integer-selection procedure.
Check Your Understanding
For each problem, use the empirical central moment with divisor \(r\), unless the moments are supplied directly. Then check feasibility.
- A hypothetical sample of counts is \(2,2,4,4\). Calculate \(\bar X\), \(m_2\), and both moment estimates. Is the trial-count estimate feasible? (Answer: \(\bar X=3\), \(m_2=1\), \(\widehat p_{\mathrm{MM}}=2/3\), \(\widehat n_{\mathrm{MM}}=4.5\); not a feasible integer trial count.)
- Suppose the empirical moments are \(\bar X=2.4\) and \(m_2=0.96\). Calculate both estimates and state whether the moment estimates are feasible, assuming the observed counts do not exceed the estimated trial count. (Answer: \(\widehat p_{\mathrm{MM}}=0.6\), \(\widehat n_{\mathrm{MM}}=4\); feasible under the stated support condition.)
- For empirical moments \(\bar X=1.2\) and \(m_2=1.44\), calculate the algebraic estimates and identify the violated condition. (Answer: \(\widehat p_{\mathrm{MM}}=-0.2\), \(\widehat n_{\mathrm{MM}}=-6\); infeasible because \(m_2>\bar X\) and the probability estimate is negative.)
- A sample consists entirely of the count 2. Use its empirical moments to obtain the estimates and describe the fitted distribution. (Answer: \(\bar X=2\), \(m_2=0\), \(\widehat p_{\mathrm{MM}}=1\), \(\widehat n_{\mathrm{MM}}=2\); the fitted binomial distribution is degenerate at 2.)
- The empirical moments are \(\bar X=0\) and \(m_2=0\). Explain why the two parameters cannot both be identified by these equations. (Answer: the equations are satisfied by \(p=0\) for any positive-integer \(n\), so \(n\) is not identified.)