How to Find a Confidence Interval for a Uniform Distribution
At a glance
- 1. Specify the model
Assume independent observations follow a Uniform(0, θ) distribution, with θ as the unknown upper endpoint.
- 2. Find the sample maximum
Let M be the largest of the n observations; its distribution provides a pivot for θ.
- 3. Choose the coverage tails
Use the pivot’s quantiles to set an exact confidence level, such as 95%.
- 4. Solve for θ
Rearrange the pivot inequalities to obtain confidence limits, then substitute the observed maximum.
A confidence interval for a uniform distribution depends on which parameter is unknown. The common textbook model is independent observations from , where the lower endpoint is known to be 0 and the upper endpoint is unknown. In that case, the sample maximum gives an exact interval.
Below, is the sample size, is the largest observed value, and the confidence level is . If you instead mean a uniform distribution with both endpoints unknown, or an interval for its mean, see the alternatives near the end.
The sample maximum as a pivot
Let be independent and uniformly distributed between 0 and , and define
For , all observations are at most only when each falls in an interval of probability . Independence therefore gives
Equivalently, the ratio has a distribution that does not depend on the unknown parameter:
This ratio is called a pivot. Its known distribution lets you choose probability bounds and solve them for .
Exact two-sided confidence interval
For an equal-tailed interval with confidence level , put probability below the pivot and probability above it. The pivot quantiles are and , so
Rearranging gives the exact interval
For a 95% interval, set :
“Exact” means that, under the stated model, the interval contains the true with probability exactly 0.95 over repeated samples. It does not mean there is a 95% probability that a fixed parameter lies in this particular interval.
A 95% example
Suppose observations are taken and their maximum is . The equal-tailed interval is
Thus, the exact equal-tailed 95% confidence interval for the upper endpoint is approximately . The observed maximum cannot exceed , and the interval’s lower bound is slightly above 8 because this construction allocates some error probability to each tail.
One-sided 95% upper bound
Sometimes the practical goal is only to put an upper limit on . Since always, use
For the example, this gives
This is a one-sided 95% confidence interval, not the equal-tailed two-sided interval. The choice is about the question you need the interval to answer; neither formula should be presented without identifying which type of interval it is.
If the uniform distribution has other unknowns
If the model is with both endpoints unknown, the formula above does not apply directly. There is no single confidence interval for “the distribution” until you specify the target, such as , , the width , or the mean . For example, when , the sample range , where is the sample minimum, can be used to form an interval for the width. Its normalized distribution has cumulative distribution function
For an interval for the mean of , use the interval for and divide both endpoints by 2, since the mean is . If the support endpoints of a uniform distribution are known, its mean is already known as their midpoint; confidence intervals for means in other models are different problems.
Common mistakes
- Using the sample mean as if it were the maximum. The exact pivot above comes from the sample maximum; replacing it with the sample mean does not give these limits.
- Forgetting the sample size. The exponent is essential. A larger sample maximum generally gives more information about .
- Confusing one-sided and two-sided intervals. The interval has confidence level but is not equal-tailed.
- Assuming both endpoints are unknown. The displayed formulas require a known lower endpoint of 0. If both endpoints are unknown, first specify which parameter you want to estimate.
References
- George Casella and Roger L. Berger, Statistical Inference
- Robert V. Hogg, Joseph W. McKean, and Allen T. Craig, Introduction to Mathematical Statistics
Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.