Tutorials › VEE Mathematical Statistics › Estimating Both Uniform Endpoints

VEE Mathematical Statistics · Estimators and Moments Methods · Tutorial 442 of 880

Estimating Both Uniform Endpoints

Use the first two moments of a continuous uniform model to estimate its lower and upper endpoints, and check the calculations and assumptions.

Intermediate 10 min read

What You'll Learn

  • Write the population mean and variance for a continuous uniform distribution with unknown endpoints.
  • Solve the two method-of-moments equations for both endpoints.
  • Use the sample central moment with divisor n, including when the reported variance uses divisor n − 1.
  • Interpret the midpoint and width represented by the two estimates.
  • Check endpoint estimates and avoid confusing method-of-moments estimates with sample extremes.

Why Two Moments Are Needed

A continuous uniform model on an interval has two unknown parameters: its lower endpoint and its upper endpoint. The first population moment, the mean, identifies the center of the interval but does not identify its width. The variance provides information about that width. Matching the sample mean and sample variance to their population counterparts therefore gives a system of two equations for the two endpoints.

This tutorial develops that method-of-moments calculation. It assumes a random sample from one continuous uniform distribution; it does not assume that the observed minimum and maximum are the endpoints. The examples use hypothetical measurements and data.

Definition: If \(X\sim U(a,b)\), where \(a<b\), its density is \(f_X(x)=1/(b-a)\) for \(a\le x\le b\), and zero otherwise. For a sample \(X_1,\ldots,X_n\), define the sample mean by \(\bar{X}=(1/n)\sum_{i=1}^n X_i\) and the sample second central moment by \(m_2=(1/n)\sum_{i=1}^n(X_i-\bar{X})^2\). The method-of-moments estimates equate the population mean and variance to \(\bar{X}\) and \(m_2\), respectively.

Population Moments and the Endpoint Equations

For \(X\sim U(a,b)\), integrate the density over its interval to find the first two raw moments. The variance follows by subtracting the square of the mean from the second raw moment.

$$ E[X]=\int_a^b \frac{x}{b-a}\,dx =\frac{a+b}{2}, \qquad E[X^2]=\int_a^b \frac{x^2}{b-a}\,dx =\frac{a^2+ab+b^2}{3}. $$

Consequently,

$$ \operatorname{Var}(X) =E[X^2]-\{E[X]\}^2 =\frac{(b-a)^2}{12}. $$

Set these population moments equal to their sample counterparts. The first equation estimates the interval's midpoint, and the second estimates its width.

$$ \bar{X}=\frac{a+b}{2}, \qquad m_2=\frac{(b-a)^2}{12}. $$

Since \(b>a\), the width \(b-a\) is positive. Taking its positive square root gives \(b-a=\sqrt{12m_2}\). Solving the midpoint and width equations yields the two estimates.

Theorem: For a method-of-moments fit of \(U(a,b)\), using the sample central moment \(m_2\) with divisor \(n\), the endpoint estimates are
$$ \hat{a}_{\mathrm{MM}}=\bar{X}-\sqrt{3m_2}, \qquad \hat{b}_{\mathrm{MM}}=\bar{X}+\sqrt{3m_2}. $$

The square root is real for any sample because \(m_2\ge 0\). If \(m_2=0\), both estimates coincide at \(\bar{X}\), which is a degenerate boundary case rather than a nondegenerate uniform interval. A continuous uniform model with \(a<b\) requires positive variance.

Deriving the Midpoint-and-Width Form

The endpoint formula can be obtained directly from the two moment equations. This also explains why the estimated endpoints are equally far from the sample mean.

1
Estimate the midpoint.
From \(\bar{X}=(a+b)/2\), the estimated midpoint is \(\bar{X}\). Equivalently, the estimated sum of the endpoints is \(a+b=2\bar{X}\).
2
Estimate the width.
From \(m_2=(b-a)^2/12\), and because \(b-a>0\), the estimated width is \(b-a=\sqrt{12m_2}\).
3
Recover each endpoint.
Half the estimated width is \(\sqrt{12m_2}/2=\sqrt{3m_2}\). Subtract this half-width from the midpoint for the lower endpoint and add it for the upper endpoint.

Thus the estimates are centered at \(\bar{X}\), with estimated half-width \(\sqrt{3m_2}\). Substitution checks the fit: their midpoint is \(\bar{X}\), and their difference is \(2\sqrt{3m_2}\), whose square divided by 12 is \(m_2\).

Worked Calculations

Worked Example: Estimating Endpoints From Four Measurements

Suppose four hypothetical measurements are \(3,5,7,9\). Model them as an independent random sample from \(U(a,b)\), with both endpoints unknown. Find the method-of-moments estimates.

Method and sample mean. Use the first two moments of the continuous uniform distribution. The sample mean is

$$ \bar{X}=\frac{3+5+7+9}{4}=\frac{24}{4}=6. $$

Sample central moment. The deviations from 6 are \(-3,-1,1,3\), so

$$ m_2=\frac{(-3)^2+(-1)^2+1^2+3^2}{4} =\frac{9+1+1+9}{4} =\frac{20}{4}=5. $$

Endpoint estimates. The estimated half-width is \(\sqrt{3m_2}=\sqrt{15}\). Therefore

$$ \hat{a}_{\mathrm{MM}}=6-\sqrt{15}\approx 2.127, \qquad \hat{b}_{\mathrm{MM}}=6+\sqrt{15}\approx 9.873. $$

The estimates are reported to three decimal places. As a check, their midpoint is 6 and their width is \(2\sqrt{15}\), so the fitted variance is \((2\sqrt{15})^2/12=60/12=5\), equal to \(m_2\). A common mistake is to treat the smallest and largest observations, 3 and 9, as the estimated endpoints. The moment estimates come from the two moment equations, not from setting the endpoints equal to the sample extremes.

Worked Example: Converting an Unbiased Sample Variance

A hypothetical sample of five claim-processing durations, measured in days, has sample mean 8 days and reported unbiased sample variance \(s^2=10\) days squared. Assume the durations are an independent sample from \(U(a,b)\). Find the method-of-moments endpoint estimates.

Method and variance convention. The reported \(s^2\) uses divisor \(n-1\), but the method-of-moments equation uses \(m_2\), with divisor \(n\). The relation is \(m_2=((n-1)/n)s^2\). Here,

$$ m_2=\frac{5-1}{5}(10)=\frac45(10)=8. $$

Estimated half-width. Use the continuous uniform variance equation:

$$ \sqrt{3m_2}=\sqrt{3(8)}=\sqrt{24}\approx 4.899. $$

Endpoint estimates. With \(\bar{X}=8\),

$$ \hat{a}_{\mathrm{MM}}=8-\sqrt{24}\approx 3.101, \qquad \hat{b}_{\mathrm{MM}}=8+\sqrt{24}\approx 12.899. $$

The estimates are reported to three decimal places, in days. Their midpoint is 8, and their fitted variance is \((2\sqrt{24})^2/12=96/12=8\), matching \(m_2\). The common mistake is to put \(s^2=10\) directly into the formula. That would produce \(8\pm\sqrt{30}\), which corresponds to matching the population variance to the wrong sample moment for the usual method-of-moments convention.

Worked Example: Using a Reported Sample Standard Deviation

In a hypothetical study, six independent waiting times, measured in minutes, are modeled as a sample from \(U(a,b)\). The sample mean is 50 minutes and the usual sample standard deviation is \(s=6\) minutes, calculated with divisor \(n-1\). Estimate both endpoints.

Method and conversion. First convert the reported sample variance \(s^2=6^2=36\) to the central moment with divisor \(n\):

$$ m_2=\frac{n-1}{n}s^2 =\frac{5}{6}(36)=30\text{ minutes}^2. $$

Estimated half-width.

$$ \sqrt{3m_2}=\sqrt{3(30)}=\sqrt{90}\approx 9.487\text{ minutes}. $$

Endpoint estimates.

$$ \hat{a}_{\mathrm{MM}}=50-\sqrt{90}\approx 40.513, \qquad \hat{b}_{\mathrm{MM}}=50+\sqrt{90}\approx 59.487. $$

The estimates are reported to three decimal places. They have midpoint \((40.513+59.487)/2=50\) minutes, subject to rounding; before rounding, the midpoint is exactly 50. Their fitted variance before rounding is \((2\sqrt{90})^2/12=360/12=30\) minutes squared. The main trap is using the standard deviation as though it were a variance; the uniform variance equation requires a variance in squared minutes.

Interpretation and Checks

The pair of estimates has a simple interpretation: \(\bar{X}\) estimates the center of the interval, while \(m_2\) determines its estimated spread. The lower estimate is the center minus the half-width; the upper estimate is the center plus the same half-width. This symmetry follows from the uniform model's moment equations.

The endpoint estimates are not generally the observed minimum and maximum. A sample minimum and maximum are random observations, whereas the method-of-moments estimates are obtained by matching moments. In a particular sample, a method-of-moments interval can even fail to contain every observed value. That does not change the algebra of moment matching; it is a reason to check whether the assumed model and estimation method are suitable for the data.

CheckWhat to verify
ModelThe observations are treated as an independent sample from one continuous \(U(a,b)\) distribution with \(a<b\).
Variance conventionUse \(m_2=(1/n)\sum(X_i-\bar{X})^2\). If given \(s^2\) with divisor \(n-1\), convert using \(m_2=((n-1)/n)s^2\).
Endpoint orderThe lower estimate is \(\bar{X}-\sqrt{3m_2}\); the upper estimate is \(\bar{X}+\sqrt{3m_2}\).
Moment checkThe estimates have midpoint \(\bar{X}\), and their implied uniform variance equals \(m_2\).

These estimates are appropriate only under the stated model and moment-matching convention. They do not by themselves establish that the uniform distribution describes the data well. In particular, do not interpret agreement with the first two sample moments as proof that all features of the population distribution are uniform.

Key takeaway: For an independent sample from \(U(a,b)\), equate the population mean and variance to \(\bar{X}\) and \(m_2\), where \(m_2\) uses divisor \(n\). The resulting estimates are \(\bar{X}\pm\sqrt{3m_2}\).

Check Your Understanding

For each problem, assume a continuous uniform model with unknown endpoints and use the method of moments. Convert any reported unbiased variance before applying the endpoint formula.

  1. A sample \(2,4,6,8\) is drawn independently from \(U(a,b)\). Find both endpoint estimates. (Answer: \(\hat{a}_{\mathrm{MM}}=5-\sqrt{15}\approx1.127,\ \hat{b}_{\mathrm{MM}}=5+\sqrt{15}\approx8.873\))
  2. The sample mean is 30 and the sample central moment with divisor \(n\) is 12. Estimate the endpoints. (Answer: \(\hat{a}_{\mathrm{MM}}=24,\ \hat{b}_{\mathrm{MM}}=36\))
  3. For an independent sample of size 5, \(\bar{X}=10\) and the unbiased sample variance is \(s^2=5\). Estimate both endpoints. (Answer: \(m_2=4,\ \hat{a}_{\mathrm{MM}}=10-\sqrt{12}\approx6.536,\ \hat{b}_{\mathrm{MM}}=10+\sqrt{12}\approx13.464\))
  4. An independent sample of size 8 has mean 100 and unbiased sample standard deviation 4. Find the endpoint estimates. (Answer: \(m_2=(7/8)(16)=14,\ \hat{a}_{\mathrm{MM}}=100-\sqrt{42}\approx93.519,\ \hat{b}_{\mathrm{MM}}=100+\sqrt{42}\approx106.481\))
  5. A sample \(5,7,9,11,13\) is modeled as independent observations from \(U(a,b)\). Compute the sample mean, \(m_2\), and the endpoint estimates. (Answer: \(\bar{X}=9,\ m_2=8,\ \hat{a}_{\mathrm{MM}}=9-\sqrt{24}\approx4.101,\ \hat{b}_{\mathrm{MM}}=9+\sqrt{24}\approx13.899\))
Clinical Biostats