S2 3.1 - The continuous uniform model

S2 3.1 - The continuous uniform model

A constant density turns probability into a comparison of lengths. You will build the continuous uniform model, derive its cumulative function and moments, and use it to find probabilities and percentiles, including events that reach beyond its support.

Uniform density

If a waiting time is spread evenly between 2 and 10 minutes, is every exact time equally likely? Each exact time has probability zero; it is equal-length intervals that have equal probabilities. A two-minute interval inside the range receives twice the probability of a one-minute interval.

For a continuous variable, probability is area under a density. A constant density on an interval makes a rectangle, so total area one determines its height: width 8 requires height 1/81/8.

Continuous uniform distribution

X∼U(a,b)X\sim\mathrm U(a,b), where a<ba<b, means that XX has density

f(x)={1b−a,a≤x≤b0,otherwise.f(x)=\begin{cases}\dfrac1{b-a},&a\le x\le b\\0,&\text{otherwise}.\end{cases}

The support is [a,b][a,b]. The density is in the formula booklet; individual endpoint values do not affect areas.

Equal density does not mean a uniform distribution over all real numbers: that would have infinite area. The finite support is essential.

Worked example 1: fixing the height

A waiting time TT is uniform on [2,10][2,10]. Find its density and P(4<T<7)\mathrm P(4<T<7).

Plan. Make the rectangle's area one, then use the width of the event.

h(10−2)=1⟹h=18h(10-2)=1\quad\Longrightarrow\quad h=\frac18 f(t)={1/8,2≤t≤100,otherwise,P(4<T<7)=(7−4)18=38.f(t)=\begin{cases}1/8,&2\le t\le10\\0,&\text{otherwise},\end{cases} \qquad \mathrm P(4<T<7)=(7-4)\frac18=\frac38.

Answer. The density is 1/81/8 on the support and zero elsewhere; the probability is 3/83/8.

Check. The three-minute event occupies 3/83/8 of the eight-minute range.

Change only the upper endpoint from 10 to 14. Spreading the same total probability over a wider interval lowers the density.

Worked example 2: widening the support

Let T∼U(2,14)T\sim\mathrm U(2,14). Find its density and P(4<T<7)\mathrm P(4<T<7).

Plan. Recalculate the full width before using the unchanged event width.

f(t)={1/12,2≤t≤140,otherwise,P(4<T<7)=3×112=14.f(t)=\begin{cases}1/12,&2\le t\le14\\0,&\text{otherwise},\end{cases} \qquad \mathrm P(4<T<7)=3\times\frac1{12}=\frac14.

Answer. The density is 1/121/12 on [2,14][2,14], zero elsewhere; the probability is 1/41/4.

Check. The probability fell by a factor 8/128/12, matching the fall in rectangle height.

The density can exceed one if the support is shorter than one unit; the total area, rather than the height, must equal one.

Deriving the cumulative function

The cumulative function measures the area to the left of a moving point. It starts at zero before the support, rises at a constant rate through the rectangle, then stays at one.

For a≤x≤ba\le x\le b, integrate from the left endpoint, using tt as a dummy variable:

F(x)=∫ax1b−a dt=[tb−a]ax=x−ab−a.F(x)=\int_a^x\frac1{b-a}\,\mathrm dt =\left[\frac{t}{b-a}\right]_a^x =\frac{x-a}{b-a}.

Outside the support no more probability accumulates. Therefore

F(x)={0,x<ax−ab−a,a≤x≤b1,x>b.F(x)=\begin{cases}0,&x<a\\\dfrac{x-a}{b-a},&a\le x\le b\\1,&x>b.\end{cases}

The integral definition of the CDF is in the formula booklet; this uniform expression follows from it. Notice that F(a)=0F(a)=0 and F(b)=1F(b)=1, with no jump at either endpoint.

[DIAGRAM: asset_name: Uniform density and cumulative function; asset_slug: uniform-density-cdf; caption: Constant density produces a linear rise in cumulative probability.; description: Density of U(2,10) with height one eighth and cumulative function zero before2, straight from(2,0) to(10,1), then one.]
Constant density produces a linear rise in cumulative probability.

Worked example 3: a full cumulative function

Derive F(x)F(x) for X∼U(1,7)X\sim\mathrm U(1,7), for all real xx.

Plan. Integrate the density from 1 within the support and supply both outside branches.

F(x)=∫1x16 dt=x−16(1≤x≤7).F(x)=\int_1^x\frac16\,\mathrm dt =\frac{x-1}{6}\qquad(1\le x\le7).

Answer.

F(x)={0,x<1(x−1)/6,1≤x≤71,x>7.F(x)=\begin{cases}0,&x<1\\(x-1)/6,&1\le x\le7\\1,&x>7.\end{cases}

Check. The endpoint values are 0 and 1; the derivative inside is 1/61/6, the original density.

Change only the lower endpoint from 1 to −1-1. The cumulative area must now start two units earlier.

Worked example 4: a negative endpoint

Derive F(x)F(x) for X∼U(−1,7)X\sim\mathrm U(-1,7), for all real xx.

Plan. Use the new lower limit, rather than merely integrating the height without a constant.

F(x)=∫−1x18 dt=x−(−1)8=x+18(−1≤x≤7).F(x)=\int_{-1}^x\frac18\,\mathrm dt =\frac{x-(-1)}8=\frac{x+1}8\qquad(-1\le x\le7).

Answer.

F(x)={0,x<−1(x+1)/8,−1≤x≤71,x>7.F(x)=\begin{cases}0,&x<-1\\(x+1)/8,&-1\le x\le7\\1,&x>7.\end{cases}

Check. F(3)=1/2F(3)=1/2: 3 is the midpoint of the interval.

A bare expression such as (x+1)/8(x+1)/8 cannot apply everywhere: it would give negative probabilities below −1-1.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account