Tutorials › VEE Mathematical Statistics › Deriving the Uniform Density on an Interval

VEE Mathematical Statistics · Uniform and Exponential Models · Tutorial 173 of 880

Deriving the Uniform Density on an Interval

Use the total-area requirement to find a uniform density, then interpret density values and interval probabilities without confusing height with area.

Beginner 9 min read

What You'll Learn

  • Derive the constant density on a specified finite interval from the total probability requirement.
  • Check a proposed uniform density by calculating its total area.
  • Interpret density units and distinguish density height from probability.
  • Calculate probabilities as rectangular areas for intervals within the support.
  • Recognize why individual points and support endpoints have probability zero.
  • Avoid common errors involving interval width, area, and density units.

Why the Uniform Density Has a Particular Height

A probability density describes how probability is distributed over the values a continuous random variable can take. For a uniform model on a finite interval, the density has the same height everywhere on that interval. Its height is not chosen arbitrarily: the total area under a probability density must equal one. Requiring that area to be one determines the constant.

This simple area argument is useful well beyond uniform models. It reinforces an important distinction: a density value is a height, while a probability is an area. In a uniform model, the area is rectangular, so the geometry is especially direct.

Definition: A continuous random variable \(X\) has a uniform distribution on \([a,b]\), where \(a<b\), if its density is constant on that interval and zero outside it. The density is $$ f_X(x)= \begin{cases} \frac{1}{b-a}, & a\le x\le b,\\ 0, & \text{otherwise}. \end{cases} $$ The parameters \(a\) and \(b\) are the lower and upper endpoints of the support. The density has total area one, and the probability of an interval is the area under the density over that interval.

The support \([a,b]\) tells us where the variable can lie under the model. The assumption of a uniform distribution says that the density height is equal throughout this support. It does not say that each possible value has the same positive probability: for a continuous random variable, a single point has probability zero. The endpoints can be included in the support without changing any probabilities, because individual points have zero area.

Deriving the Constant Density

Suppose \(X\) is uniform on \([a,b]\), with \(a<b\). Let \(c\) be the constant density height on the interval. The density is zero elsewhere. Since a density must have total area one, the rectangle over \([a,b]\) must have area one.

$$ \text{total area} =\text{width}\times\text{height} =(b-a)c=1. $$

Solving this equation gives \(c=1/(b-a)\). Thus a longer support interval requires a lower density height, while a shorter support interval requires a higher one. This is the whole derivation: the height is the unique constant that makes the rectangle's area equal to one.

$$ f_X(x)=\frac{1}{b-a}\quad\text{for }a\le x\le b, \qquad \int_a^b f_X(x)\,dx =\frac{1}{b-a}(b-a)=1. $$

For any interval \([r,s]\) contained within the support, the density is constant over that interval as well. Its probability is therefore its rectangular area: width \(s-r\) multiplied by height \(1/(b-a)\). This area interpretation follows directly from the definition of a density; it does not make the height itself a probability.

$$ P(r\le X\le s) =(s-r)\frac{1}{b-a} =\frac{s-r}{b-a}, \qquad a\le r\le s\le b. $$

The formula applies to an interval contained within the support. If an interval extends beyond the support, only the portion overlapping \([a,b]\) can contribute area. The density also has units: if \(X\) is measured in minutes, its density is measured in inverse minutes. Multiplying a width in minutes by a density in inverse minutes gives a dimensionless probability.

Worked Example: Service Time on a Bounded Interval

Model and parameters. In a hypothetical service system, let \(X\) be the service time in minutes for a randomly selected transaction. Assume \(X\sim\operatorname{Uniform}(5,17)\), meaning the uniform distribution on \([5,17]\). No interest rate or mortality assumption is relevant to this time model.

Method. First use the total-area condition to find the density height; then calculate the requested probability as a rectangular area. The support width is \(17-5=12\) minutes. If \(c\) is the constant density, $$ 12c=1,\qquad c=\frac{1}{12}\text{ per minute}. $$

The probability that the service time is between 8 and 14 minutes is the area of a rectangle with width \(14-8=6\) minutes and height \(1/12\) per minute: $$ P(8\le X\le14)=6\left(\frac{1}{12}\right)=\frac{6}{12}=0.5000. $$

Check. The density over the entire support has area \(12(1/12)=1\), as required. The requested interval occupies \(6/12=1/2\) of the support width, so its probability of \(0.5000\) is consistent.

Common mistake avoided. The density \(1/12\) is not the probability of a service time between 8 and 14 minutes. It is a height in inverse minutes; the interval probability is the height multiplied by the interval width.

Density Height, Probability, and Units

A density can be greater than one without violating probability rules. The rule that probabilities lie between zero and one applies to areas, not to density heights. For example, a uniform variable on an interval of width \(0.4\) has density \(1/0.4=2.5\) per unit. Its total area is still \(0.4(2.5)=1\). Conversely, a density height can be less than one when the support is wide.

This distinction is also visible in the units. If a loss is measured in dollars, a density is measured in inverse dollars. A value such as \(0.0002\) per dollar is not a probability of \(0.0002\) for any particular dollar amount. Multiplying that density by a dollar interval width gives a probability. Changing the measurement unit changes the numerical density height, but it does not change the underlying probabilities when the width is converted consistently.

Worked Example: A Hypothetical Loss Amount

Model and parameters. Consider a hypothetical covered-equipment loss amount \(X\), measured in dollars, conditional on a loss occurring. Assume \(X\sim\operatorname{Uniform}(400,6400)\), with no interest adjustment or mortality assumption. This model concerns the amount conditional on a loss; it does not specify how often losses occur.

Method. The support width is \(6400-400=6000\) dollars. Normalizing the constant density gives $$ c(6000)=1,\qquad c=\frac{1}{6000}=0.000166666\ldots\text{ per dollar}. $$

For a loss between \(\$1{,}900\) and \(\$4{,}900\), the width is \(4900-1900=3000\) dollars. The probability is $$ P(1900\le X\le4900) =3000\left(\frac{1}{6000}\right) =\frac{1}{2} =0.5000. $$

At \(x=\$3{,}100\), the density is \(1/6000\) per dollar. But the probability of exactly \(\$3{,}100\) is zero, because one point has zero width and hence zero area: $$ P(X=3100)=0. $$

Check. The total area is \(6000(1/6000)=1\), and the requested interval is half the support width, giving probability \(0.5000\). The density's inverse-dollar unit also confirms that it is a height, not a dollar amount or point probability.

Common mistake avoided. Treating the density at \(\$3{,}100\) as the probability of an exact \(\$3{,}100\) loss confuses a density value with area. Only an interval with positive width can have positive probability under this continuous model.

Checking a Proposed Density

The total-area requirement is both a derivation and a diagnostic. If a proposed constant density on a stated support does not give area one, it cannot be the density of a probability distribution on that support. The same check catches a frequent algebra error: using the support midpoint or adding the endpoints instead of calculating the width \(b-a\).

1
Identify the support.
Write the lower endpoint \(a\) and upper endpoint \(b\), and confirm \(a<b\).
2
Calculate the width.
Subtract the lower endpoint from the upper endpoint: \(b-a\). Keep the measurement unit.
3
Normalize the rectangle.
Set width times constant height equal to one, then solve for the height.
4
Check units and area.
The height must have reciprocal units, and multiplying it by the support width must give one.

Worked Example: Recovering a Support Width From Density

Model and parameters. A hypothetical sensor reading \(X\) has a uniform density of \(0.04\) per measurement unit on a support beginning at 10. Assume there is no other mass outside that support and that the support is a finite interval \([10,10+L]\). No interest rate or mortality assumption applies.

Method. Use the area-one condition to find the unknown support width \(L\). The rectangle's area is \(0.04L\), so $$ 0.04L=1,\qquad L=\frac{1}{0.04}=25. $$ The support is therefore \([10,35]\). This also checks directly: its width is \(35-10=25\), and \(25(0.04)=1\).

The probability that the reading lies from 14 to 22 is the area of a rectangle of width \(22-14=8\) and height \(0.04\): $$ P(14\le X\le22)=8(0.04)=0.32=0.3200. $$ The interval is inside the support because \(10\le14\le22\le35\).

Check. The recovered support has the required density height and total area one. The requested interval occupies 8 of the support's 25 units, and \(8/25=0.32\), matching the area calculation.

Common mistake avoided. The density height is not the support width. The total-area equation requires \(L=1/0.04\), not \(L=0.04\). The reciprocal units make this clear: dividing one by a density in inverse units produces a width in units.

Common Errors and a Practical Interpretation

The uniform density formula is aligned with the SOA VEE Mathematical Statistics syllabus. Its central skill is not memorizing \(1/(b-a)\) in isolation; it is recognizing the assumptions and checking the geometry. The distribution must be uniform on the stated interval, and its density must be zero outside that support. A constant on an interval of a different width has a different height.

  • Using the wrong width. For support \([a,b]\), the width is \(b-a\), not \(a+b\), \(b\), or the midpoint.
  • Calling a density a probability. A density is a height with reciprocal measurement units. Probability comes from integrating it over a set, or, for a uniform model, multiplying height by interval width.
  • Assigning positive probability to one value. Under a continuous uniform model, \(P(X=x)=0\) for any individual \(x\), including either endpoint.
  • Forgetting the support. A value outside \([a,b]\) has density zero in this model. A probability calculation cannot include area beyond the support.
  • Failing the normalization check. If the proposed height times the support width is not one, the expression is not a valid density on that support.

For any interval entirely inside the support, the probability is its width divided by the full support width. This explains why equally wide subintervals have equal probabilities under a uniform model. It also explains why the numerical density may change when measurement units change: the interval widths change in the opposite scale, leaving areas—and therefore probabilities—unchanged.

Key takeaway: A uniform density is the constant height that makes the rectangle over the support have area one. Density is height; probability is area. Always identify the support, calculate its width, verify total area, and attach the correct units to the density.

Check Your Understanding

For each problem, use the stated uniform model and interpret probabilities as areas. Give probabilities to four decimal places when needed.

  1. A hypothetical processing time \(X\) is uniform on \([3,15]\) minutes. Find its density and \(P(6\le X\le9)\). (Answer: density \(1/12\) per minute; probability \(0.2500\).)
  2. A hypothetical package mass \(X\) is uniform on \([120,520]\) grams. Find the density, \(P(220\le X\le340)\), and \(P(X=300)\). (Answer: density \(0.0025\) per gram; probability \(0.3000\); point probability \(0\).)
  3. A uniform sensor reading has density \(0.05\) per unit and support begins at 4. Find the upper endpoint and the probability that the reading is between 8 and 17. (Answer: upper endpoint \(24\); probability \(0.4500\).)
  4. A proposed density is constant at \(0.1\) on \([2,14]\) and zero elsewhere. Is it a valid probability density? If not, give the correct constant height for a uniform distribution on this support. (Answer: no; its area is \(0.1(12)=1.2\); the correct height is \(1/12\).)
  5. A hypothetical reading \(X\) is uniform on \([a,a+50]\), and its density is \(0.02\) per unit. Find \(P(a+10\le X\le a+28)\), and state why the numerical value does not depend on \(a\). (Answer: \(0.3600\); both interval and support widths are fixed, so their ratio is \(18/50\), independent of the location \(a\).)
Clinical Biostats