Tutorials › VEE Mathematical Statistics › Boundary MLEs in the Uniform Distribution

VEE Mathematical Statistics · Maximum Likelihood Estimation · Tutorial 469 of 880

Boundary MLEs in the Uniform Distribution

Learn to derive and verify uniform endpoint MLEs by combining the likelihood with the requirement that every observation lie within the candidate interval.

Intermediate 10 min read

What You'll Learn

  • Write the likelihood for an independent sample from a uniform distribution with two unknown endpoints.
  • Use the observed range to derive both endpoint MLEs.
  • Check whether a proposed interval is feasible before comparing likelihood values.
  • Recognize why the likelihood is largest at the sample minimum and maximum when the sample has a positive range.
  • Identify samples for which no MLE exists because the likelihood is unbounded.

Why Uniform Endpoint Estimation Is Different

For many familiar models, maximizing the likelihood means solving an equation involving derivatives. An unknown uniform interval has an additional feature: changing either endpoint can change whether the observed data are possible at all. The likelihood is therefore zero for intervals that exclude even one observation, and positive only for intervals that contain the entire sample.

That support condition determines the answer. Once an interval contains all the observations, making it wider lowers the density at every point. The most likely feasible interval is consequently the narrowest one that contains the data. This makes the sample minimum and maximum central to the calculation.

Definition: Let \(X_1,\ldots,X_n\) be an independent random sample from a continuous uniform distribution on \([a,b]\), where the unknown endpoints satisfy \(a<b\). The density is \(f(x\mid a,b)=1/(b-a)\) for \(a\le x\le b\), and is \(0\) otherwise. Write \(X_{(1)}=\min(X_1,\ldots,X_n)\) and \(X_{(n)}=\max(X_1,\ldots,X_n)\) for the sample minimum and sample maximum.

The model assumes that each observation is generated independently from the same distribution and that the endpoints are fixed parameters. The observed values must be treated as exact measurements under this continuous model. If data have been rounded, ties may reflect rounding rather than genuinely identical underlying observations.

Likelihood and the Feasible Intervals

For observed values \(x_1,\ldots,x_n\), independence makes the likelihood the product of the individual densities. Every observation must be inside the proposed interval for that product to be positive. In terms of the sample extremes, the full likelihood is

$$ L(a,b;x_1,\ldots,x_n) = \begin{cases} (b-a)^{-n}, & a\le x_{(1)}\text{ and }b\ge x_{(n)},\quad a<b,\\ 0, & \text{otherwise}. \end{cases} $$

Thus, the feasible parameter pairs satisfy \(a\le x_{(1)}\) and \(b\ge x_{(n)}\), as well as \(a<b\). Among feasible pairs, the likelihood depends on the endpoints only through the width \(b-a\). The interval cannot be narrower than the observed range \(x_{(n)}-x_{(1)}\).

Theorem: If the observed sample has positive range, \(x_{(1)}<x_{(n)}\), the likelihood is maximized at \(\hat a=x_{(1)}\) and \(\hat b=x_{(n)}\). The maximum likelihood estimates are the sample minimum and sample maximum.

Why the Sample Extremes Maximize the Likelihood

The argument uses both parts of the likelihood: feasibility and the value of the density for a feasible interval. For any feasible \(a,b\), the inequalities \(a\le x_{(1)}\) and \(b\ge x_{(n)}\) imply

$$ b-a\ge x_{(n)}-x_{(1)}. $$

When the range is positive, its value is an allowable interval width: choose \(a=x_{(1)}\) and \(b=x_{(n)}\). For any feasible interval, the width is at least this large. Since \(n\) is positive, increasing the width decreases \((b-a)^{-n}\). Therefore the likelihood is largest at the smallest feasible width, and that width is attained by the sample extremes.

$$ L(\hat a,\hat b) = \frac{1}{\bigl(x_{(n)}-x_{(1)}\bigr)^n} \quad\text{when }x_{(1)}<x_{(n)}. $$

This also explains why differentiating the positive part of the likelihood is not the useful route to the answer. Its parameter dependence within the feasible region is through the width, while the feasibility conditions determine the limits on that width. The maximizing pair lies at the edge of the feasible region.

Worked Example: Finding Both Endpoints From a Sample

Suppose five independent hypothetical claim-processing durations, in hours, are modeled as Uniform\((a,b)\), with both endpoints unknown. The observed durations are \(2,5,3,8,6\). Find the endpoint MLEs, calculate the maximum likelihood, and compare it with the likelihood at the feasible candidate interval \([1,9]\).

Method. Find the sample extremes, then use the likelihood’s dependence on interval width. This avoids treating the endpoint estimates as solutions to an ordinary interior score equation.

Step 1: Find the extremes and range. The sorted data are \(2,3,5,6,8\). Hence \(x_{(1)}=2\), \(x_{(n)}=8\), and the observed range is \(8-2=6\) hours.

Step 2: Estimate the endpoints. The interval \([2,8]\) contains all observations and has the smallest feasible width, so \(\hat a=2\) hours and \(\hat b=8\) hours.

Step 3: Calculate the maximum likelihood. There are \(n=5\) observations and the fitted width is 6 hours: \(L(2,8)=1/6^5=1/7776=0.0001286\) hours\(^{-5}\), rounded to seven decimal places.

Step 4: Compare the proposed interval. The candidate \([1,9]\) contains the sample and has width \(9-1=8\) hours. Its likelihood is \(1/8^5=1/32768\) hours\(^{-5}\). The ratio of its likelihood to the maximum is \( (1/32768)/(1/7776)=7776/32768=243/1024=0.2373046875\).

The candidate interval is feasible but less likely because it is wider. The MLE pair and maximum likelihood are consistent with the rule that the narrowest interval covering the observations maximizes the likelihood.

Feasibility Comes Before Comparing Likelihoods

A candidate interval that excludes an observation has likelihood zero, regardless of how narrow it is. For instance, if \(a>x_{(1)}\), the sample minimum lies below the proposed interval. If \(b<x_{(n)}\), the sample maximum lies above it. In either case, the likelihood is zero under the stated model.

If a candidate interval is feasible, its likelihood can be compared with the maximum using only its width. For a positive-range sample, the likelihood ratio of a feasible interval of width \(w\) to the maximum likelihood is

$$ \frac{L(a,b)}{L(\hat a,\hat b)} = \left(\frac{x_{(n)}-x_{(1)}}{w}\right)^n, \qquad w=b-a. $$

The ratio is at most 1 because every feasible width \(w\) is at least the observed range. This provides a convenient check on a numerical likelihood comparison.

Worked Example: Tied Extremes and an Infeasible Candidate

Six hypothetical component lifetimes, measured in days, are modeled as independent Uniform\((a,b)\) observations. The data are \(13.2,12.5,15.1,14.0,15.1,13.7\). Find the MLEs and maximum likelihood. Then evaluate the likelihood at \([12.6,15.4]\) and compare it with the likelihood at the feasible interval \([12,16]\).

Method. Use the sample extremes to obtain the narrowest feasible interval, and check the candidate endpoints against those extremes before calculating a positive likelihood. This avoids assigning a positive likelihood to an interval that excludes an observed value.

Step 1: Find the extremes. The minimum is \(12.5\) days and the maximum is \(15.1\) days. The range is \(15.1-12.5=2.6\) days. The repeated maximum does not change the sample maximum.

Step 2: Find the endpoint MLEs. The narrowest feasible interval is \([12.5,15.1]\). Thus, \(\hat a=12.5\) days and \(\hat b=15.1\) days.

Step 3: Calculate the maximum likelihood. The width is 2.6 days and \(n=6\). The successive powers are \(2.6^2=6.76\), \(2.6^3=17.576\), \(2.6^4=45.6976\), \(2.6^5=118.81376\), and \(2.6^6=308.915776\). Therefore, \(L(\hat a,\hat b)=1/308.915776=0.003237\) days\(^{-6}\), rounded to six decimal places.

Step 4: Check the candidate \([12.6,15.4]\). Its lower endpoint, \(12.6\), is greater than the observed minimum, \(12.5\). The interval excludes an observation, so its likelihood is \(0\).

Step 5: Check the feasible interval \([12,16]\). It contains all six data values and has width \(16-12=4\) days. Its likelihood is \(1/4^6=1/4096=0.000244140625\) days\(^{-6}\). This is below the maximum; the ratio is \((2.6/4)^6=0.065536\).

The calculation checks out: the excluded-data candidate has zero likelihood, and the wider feasible interval has a positive but smaller likelihood than the MLE interval.

When the Sample Range Is Zero

The endpoint formula requires a positive observed range. If all observations are identical, setting both endpoints equal to that common value would give \(a=b\), which is not an allowed uniform distribution with a density of the stated form. Instead, feasible intervals can be made arbitrarily narrow while still containing the observations. Their likelihoods then grow without bound.

Worked Example: Identical Observations and No MLE

Four hypothetical sensor readings, in volts, are recorded as \(7,7,7,7\). Treat the readings as exact observations from an independent sample of a continuous Uniform\((a,b)\) distribution with \(a<b\). Determine whether an MLE exists.

Method. Construct feasible intervals with widths tending to zero and check what happens to the likelihood. This avoids incorrectly setting both estimated endpoints equal when that would violate \(a<b\).

Step 1: Write a family of feasible intervals. For any \(\varepsilon>0\), the interval \([7-\varepsilon,7+\varepsilon]\) contains all four observations and has width \(2\varepsilon\).

Step 2: Evaluate likelihoods for specific widths. If \(\varepsilon=0.5\), the width is \(1\) and the likelihood is \(1/1^4=1\). If \(\varepsilon=0.1\), the width is \(0.2\) and the likelihood is \(1/0.2^4=625\). If \(\varepsilon=0.01\), the width is \(0.02\) and the likelihood is \(1/0.02^4=6{,}250{,}000\).

Step 3: Take the limit. In general, the likelihood is \(1/(2\varepsilon)^4\), which tends to infinity as \(\varepsilon\) approaches zero through positive values. No admissible interval attains an infinite likelihood, so there is no MLE.

Under an exact continuous model, a sample with all observations equal has probability zero. In practice, identical recorded readings can arise from rounding; that is a warning that the exact continuous-data model may not describe the recorded values as assumed.

Common Mistakes and Why the Result Matters

  • Using the sample mean for an endpoint. The mean need not equal either sample extreme. The likelihood is maximized by minimizing the feasible interval width, which puts its endpoints at the minimum and maximum.
  • Ignoring the support condition. A pair of endpoints that excludes an observation has likelihood zero, not a positive likelihood based on its width.
  • Choosing an interval wider than necessary. A wider feasible interval gives a lower density, and therefore a lower likelihood, because its likelihood is \((b-a)^{-n}\).
  • Allowing the endpoints to coincide. The model requires \(a<b\). When the sample range is zero, the likelihood is unbounded rather than maximized at equal endpoints.
  • Confusing likelihood with the probability of the exact sample. For continuous observations, the likelihood uses density values. It is not the probability of observing one exact vector of values.

The endpoint result is useful because it makes the role of parameter-dependent support explicit: sample information appears not only in the height of the density but also in the condition that the support must cover every observed value. For a positive-range sample, that condition and the decreasing density together identify both MLEs directly.

Key takeaway: For an independent sample from Uniform\((a,b)\) with unknown endpoints, a positive sample range gives \(\hat a=X_{(1)}\) and \(\hat b=X_{(n)}\). If the range is zero, the likelihood is unbounded under \(a<b\), so no MLE exists.

Check Your Understanding

For each problem, first check whether the proposed interval is feasible, then use the likelihood’s dependence on interval width.

  1. An independent sample from Uniform\((a,b)\) is \( -1,2,0,7,3\). Find both endpoint MLEs and the maximum likelihood. (Answer: \(\hat a=-1,\ \hat b=7\); \(L_{\max}=1/8^5=1/32768\).)
  2. Five observations are \(12,15,11,19,15\). Compare the likelihood at the MLE with the likelihood at the candidate interval \([10,20]\). Give their ratio, candidate likelihood divided by maximum likelihood. (Answer: MLE \([11,19]\); ratio \( (8/10)^5=0.32768\).)
  3. Four exact observations are \(7,7,7,7\) under the continuous Uniform\((a,b)\) model with \(a<b\). Does an MLE exist? Give a feasible family illustrating the likelihood behavior. (Answer: No; for \([7-\varepsilon,7+\varepsilon]\), the likelihood is \((2\varepsilon)^{-4}\), which is unbounded as \(\varepsilon\downarrow0\).)
  4. A sample is \(4,9,6,9,5\). Compare candidate intervals \(A=[3,10]\), \(B=[4,9]\), and \(C=[5,10]\), identifying the MLE and the likelihood at each candidate. (Answer: \(B\) is the MLE; \(L_A=1/7^5\), \(L_B=1/5^5\), and \(L_C=0\) because it excludes 4.)
  5. One exact observation, \(X_1=3.2\), is modeled as Uniform\((a,b)\) with \(a<b\). Explain whether an MLE exists using intervals centered at 3.2. (Answer: No; \([3.2-\varepsilon,3.2+\varepsilon]\) has likelihood \(1/(2\varepsilon)\), which is unbounded as \(\varepsilon\downarrow0\).)
Clinical Biostats