SD7 - The rectangular distribution

SD7 - The rectangular distribution

The rectangular distribution models a continuous value spread evenly across a bounded interval. You will find its density and probabilities, decide when equal likelihood is reasonable, and prove its mean, variance and standard deviation.

Uniform density on an interval

If a random length is equally spread between 2 and 8 centimetres, how does its spread change when you add 3 centimetres to every length? First we need to turn “equally spread” into a precise distribution.

For a continuous model, equal likelihood means that intervals of equal length within the support have equal probability. It does not mean a positive equal probability for every individual real number. Each exact value still has probability zero.

A constant density gives equal areas above equal widths. Between 2 and 8, the rectangle has width 6, so its height must be 1/61/6 to give area 1. Each one-centimetre interval then has probability 1/61/6. Generally, if the height is hh on [a,b][a,b], normalisation gives (b−a)h=1(b-a)h=1. Thus h=1/(b−a)h=1/(b-a).

Rectangular distribution

For real a<ba<b, a rectangular, or continuous uniform, distribution on [a,b][a,b] has

f(x)={1b−a,a≤x≤b,0,otherwise.F(x)={0,x<a,x−ab−a,a≤x≤b,1,x>b.f(x)=\begin{cases} \dfrac1{b-a},&a\leq x\leq b,\\ 0,&\text{otherwise}. \end{cases} \qquad F(x)=\begin{cases} 0,&x<a,\\ \dfrac{x-a}{b-a},&a\leq x\leq b,\\ 1,&x>b. \end{cases}

The density and CDF are not printed in the formula booklet: learn them. Endpoint density values can be allocated differently without changing the distribution.

The CDF is the fraction of the full interval lying to the left of xx, so it increases along a straight line from 0 to 1.

Worked example 1: a six-unit interval

Question. XX has a rectangular distribution on [2,8][2,8]. Find its density and F(5)F(5).

Plan. Divide total area 1 by the width; then find the area from 2 to 5.

b−a=8−2=6,f(x)=16(2≤x≤8).b-a=8-2=6,\qquad f(x)=\frac16\quad(2\leq x\leq8).

The density is zero elsewhere, and

F(5)=∫2516 dx=5−26=12.F(5)=\int_2^5\frac16\,\mathrm{d}x=\frac{5-2}{6}=\frac12.

Answer. Density 1/61/6 on [2,8][2,8], zero otherwise; F(5)=1/2F(5)=1/2.

Check. The full rectangle has area 6(1/6)=16(1/6)=1, and 5 is the midpoint of its support.

Keep the lower endpoint at 2 and halve the width. The density must double to retain total area 1.

Worked example 2: a narrower interval

Question. YY has a rectangular distribution on [2,5][2,5]. Find its density and F(3.5)F(3.5).

Plan. Repeat the width and partial-area calculation for the narrower support.

f(y)=15−2=13(2≤y≤5),F(3.5)=3.5−23=12.f(y)=\frac1{5-2}=\frac13\quad(2\leq y\leq5),\qquad F(3.5)=\frac{3.5-2}{3}=\frac12.

Answer. Density 1/31/3 on [2,5][2,5], zero otherwise; F(3.5)=1/2F(3.5)=1/2.

Check. Width 3 times height 1/31/3 is 1. Although the height doubles, the probability of the lower half remains 1/21/2.

The density describes probability per unit of the measured variable.

[DIAGRAM: asset_name: Width determines rectangular density height; asset_slug: aqa7367-rectangular-width; caption: Halving the support width doubles the height while total area stays one; description: Two graphs share horizontal and vertical scales. Left shows a rectangle on two to eight with height one sixth. Right shows a rectangle on two to five with height one third. Each rectangle has blue shading and a labelled total area one; the lower half is distinguished in pale sage and labelled probability one half. Zero density outside both supports is shown.]
Halving the support width doubles the height while total area stays one

Watch out

Wrong: use 1/b1/b as the height. The height is 1/(b−a)1/(b-a), using the width, even if aa is negative. The case a=ba=b is not a rectangular density: its width is zero.

Use a support crossing zero.

Model conditions and probabilities

A rectangular model needs a known finite interval, zero probability outside it, and no preference for one equal-length subinterval over another. These are assumptions about the process; observing a minimum and maximum does not establish uniformity.

For example, suppose a perfectly regular service departs every 10 minutes. If you arrive independently of the timetable and your arrival phase is uniform across a full cycle, your waiting time TT is rectangular on [0,10][0,10]. “The service runs every 10 minutes” alone is insufficient: people who check the timetable may tend to arrive just before departure. Random arrivals of the service itself would require a different model.

For an interval wholly inside [a,b][a,b], probability is its width divided by b−ab-a. If the requested interval extends outside the support, intersect it with [a,b][a,b] first. An empty intersection has probability zero.

Worked example 3: an interval within the support

Question. Under the regular-service model above, find P(2<T<5)P(2<T<5).

Plan. Divide the favourable waiting-time width by the full width 10.

P(2<T<5)=∫25110 dt=5−210=0.3.P(2<T<5)=\int_2^5\frac1{10}\,\mathrm{d}t =\frac{5-2}{10}=0.3.

Answer. 0.30.3.

Check. The event spans 3 of the 10 minutes; ten disjoint one-minute intervals would each have probability 0.10.1.

Shift the three-minute event to the end of the support. The part beyond 10 contributes no probability.

Continue this lesson.

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

Create free account