Model and Estimation Goal
Suppose observations are sampled from a discrete uniform distribution on the consecutive integers \(1,2,\ldots,N\), where the upper endpoint \(N\) is unknown. The endpoint is restricted to a positive integer. This support condition matters: a numerical estimate such as \(6.2\) may solve a moment equation, but it cannot itself be the endpoint of this model.
The method of moments equates a population moment to the corresponding sample moment and solves for the unknown parameter. For this one-parameter model, the first raw moment—the population mean—is enough to form an estimate. The resulting equation has a simple solution, but interpreting that solution requires a separate check of the integer parameter space and the observed data.
Deriving the Mean-Based Estimate
Each integer in the support has probability \(1/N\). Therefore, the population mean is the average of the integers from \(1\) through \(N\):
The sum formula follows by pairing terms: \(1+N\), \(2+(N-1)\), and so on each sum to \(N+1\); equivalently, the arithmetic sequence has \(N\) terms and average \((1+N)/2\). The sample first raw moment is \(\bar X\). Equating these moments gives
The tilde emphasizes that this is initially a real-valued moment solution. Because a sample mean can be noninteger, the raw solution need not be an allowed endpoint. In addition, any endpoint consistent with the observed sample must be at least as large as the largest observation.
Here, “admissible integer” means a value allowed by this model’s parameter space and support. It does not refer to the separate decision-theory meaning of admissibility. Since every observation is at least one, \(\bar X\ge1\) and the raw estimate is at least one; in practice, the key checks are integrality and whether the estimate reaches the sample maximum.
Worked Examples
Worked Example: A Noninteger Moment Solution That Can Be Rounded Feasibly
A quality-control analyst records the numbers of calibration marks found on five randomly selected, independent gauges. The counts are \(2,4,3,5,4\). Assume each count follows the discrete uniform model on \(1,\ldots,N\), with the same unknown positive integer \(N\). Find the raw moment estimate and assess an integer estimate.
Method. Calculate the sample mean, equate it to \((N+1)/2\), and then check the result against both integer validity and the observed maximum.
Step 1: Calculate the sample mean. The sample size is \(n=5\), and the sum is \(2+4+3+5+4=18\). Thus
Step 2: Solve the moment equation.
The raw estimate is not an integer, so it is not an exact admissible endpoint. The largest observation is \(X_{(n)}=5\). If an integer-valued estimate is wanted, the nearest integer to \(6.2\) is \(6\), which is at least \(5\) and is therefore feasible as an endpoint.
This rounding is an adjustment, not an exact solution to the method-of-moments equation. At \(N=6\), the model mean is \((6+1)/2=3.5\), which differs from the observed mean \(3.6\) by \(0.1\). Check: endpoint \(6\) includes every observed count, but it does not make the sample mean equal the model mean.
Common mistake avoided: Do not report \(6.2\) as a valid upper integer endpoint. If asked for a rounded integer estimate, identify it as rounded and still verify that it is no smaller than the sample maximum.
Worked Example: An Exact and Feasible Integer Solution
A laboratory records the numbers of usable readings from six independent test panels: \(1,2,3,4,5,3\). Assume the readings follow the stated discrete uniform model with unknown positive integer endpoint \(N\). Determine whether the mean-based estimate is exact and admissible.
Method. Use the first-moment equation, then check both the integer restriction and the support bound from the data.
Step 1: Calculate the sample mean. There are \(n=6\) observations, and their sum is \(1+2+3+4+5+3=18\). Hence
Step 2: Apply the moment formula.
This is an integer. The largest observation is \(X_{(n)}=5\), so the estimate also satisfies \(N\ge X_{(n)}\). Thus \(N=5\) is an exact, admissible integer solution to the first-moment equation. Check: the model mean at \(N=5\) is \((5+1)/2=3\), exactly the sample mean.
Common mistake avoided: Checking only that the estimate is an integer is not enough. If the sample had contained a value greater than \(5\), this endpoint would not have supported the observations, even though the moment equation still produced the integer \(5\).
Worked Example: The Raw Estimate Falls Below the Observed Maximum
An auditor records the numbers of flagged records in four independently sampled batches: \(1,1,1,8\). Suppose each count is modeled as discrete uniform on \(1,\ldots,N\), with a common unknown positive integer endpoint. Find the raw estimate and the nearest feasible integer adjustment.
Method. First solve the unrestricted moment equation. Then impose the necessary support condition \(N\ge X_{(n)}\) before choosing any integer adjustment.
Step 1: Calculate the sample mean. The sample size is \(4\), the sum is \(1+1+1+8=11\), and therefore
Step 2: Find the raw moment solution.
The raw solution is not an integer. More importantly, \(X_{(n)}=8\), so any endpoint that can contain the observed sample must satisfy \(N\ge8\). Rounding \(4.5\) to \(5\) would still give an impossible endpoint because the observation \(8\) would lie outside its support.
Among feasible integers \(8,9,10,\ldots\), the one closest to \(4.5\) is \(8\). Thus \(8\) is the nearest feasible integer adjustment, but it is not an exact moment solution: its model mean is \((8+1)/2=4.5\), not \(2.75\). Check: endpoint \(8\) includes all four observations, while the raw mean equation remains unmatched.
Common mistake avoided: Rounding before checking the sample maximum can produce an integer that is still impossible for the observed data. The support check must come before calling a rounded value feasible.
Exact Solutions, Rounding, and Feasibility
It is useful to separate three questions that can otherwise be confused:
- What does the moment equation give? It gives the real-valued quantity \(2\bar X-1\).
- Does that quantity solve the model exactly? Only if it is an integer, since the parameter \(N\) must be an integer.
- Can that endpoint contain the observed sample? Only if \(N\ge X_{(n)}\).
The possible endpoints consistent with the sample’s support are the integers \(X_{(n)},X_{(n)}+1,\ldots\). This condition does not say that every such endpoint matches the sample mean; it says only that none of the observations is outside the model’s support. Thus a fractional moment solution may have feasible integer candidates nearby, while an integer moment solution can still fail the support check.
If a problem specifically asks for a practical integer adjustment, one transparent convention is to choose the feasible integer closest to the raw estimate. Let \(q=2\bar X-1\) and \(M=X_{(n)}\). Rounding to the nearest integer, with half-way cases rounded upward, and enforcing the support bound gives
This formula describes a constrained rounding rule; it is not a new exact moment equation. If the task gives a different rule for choosing among integers, follow that rule. If it asks whether the method-of-moments estimate itself is an admissible integer, report the raw value and state whether it passes both checks rather than silently replacing it with a rounded value.
Add all observations and divide by the sample size.
For the model on \(1,\ldots,N\), equate \(\bar X\) to \((N+1)/2\) and solve \(q=2\bar X-1\).
If \(q\) is not an integer, it is not an exact parameter value.
Any endpoint proposed for the observed sample must be at least \(X_{(n)}\).
If rounding or constraining the estimate, state the rule and do not present the adjusted value as an exact moment solution.
Why the Checks Matter
The population mean is a theoretical expectation, while the sample mean varies from sample to sample. Equating them is the moment-matching rule, not a claim that every observed sample mean must equal its population mean. That distinction explains why \(2\bar X-1\) can be fractional or can fall below the largest observation. Such outcomes do not change the algebra; they signal that the raw moment solution should not be mistaken for a valid endpoint without further qualification.
A frequent exam trap is to use the formula for a continuous uniform distribution instead. The mean of a continuous uniform distribution on an interval depends on the two interval endpoints, whereas this model assigns equal probabilities to the \(N\) integers from \(1\) through \(N\). Here the first and last support values are \(1\) and \(N\), and their average is \((N+1)/2\), not \(N/2\).
Check Your Understanding
For each sample, calculate the raw moment estimate and decide whether it is an exact admissible integer. If needed, give the nearest feasible integer adjustment.
- A sample of four readings is \(1,3,2,4\). Find the mean, the raw endpoint estimate, and assess the endpoint against the sample maximum. (Answer: \(\bar X=2.5\), raw estimate \(4\); exact and admissible because the maximum is \(4\).)
- Five batch counts are \(2,2,5,3,4\). Find the raw estimate and state whether it is an exact admissible integer. (Answer: \(\bar X=16/5=3.2\), raw estimate \(5.4\); not an integer, so no exact integer solution; nearest feasible integer adjustment is \(5\), which equals the sample maximum.)
- Six observations are \(1,2,2,3,4,4\). Compute the mean-based estimate and the nearest feasible integer adjustment. (Answer: sum \(16\), \(\bar X=16/6=8/3\), raw estimate \(13/3\); no exact integer solution; nearest feasible integer is \(4\), equal to the sample maximum.)
- Four observed counts are \(1,1,2,9\). Calculate the raw estimate, check it against the maximum, and give the nearest feasible integer adjustment. (Answer: sum \(13\), \(\bar X=13/4=3.25\), raw estimate \(5.5\); it is noninteger and below the maximum \(9\); nearest feasible integer adjustment is \(9\).)
- Five measurements are \(2,3,3,4,6\). Determine whether rounding the raw estimate to the nearest integer gives a feasible endpoint, and check the model mean at that endpoint. (Answer: sum \(18\), \(\bar X=3.6\), raw estimate \(6.2\); rounded endpoint \(6\) is feasible since the maximum is \(6\), and its model mean is \(3.5\), so it is not an exact moment match.)