The continuous uniform distribution

The continuous uniform distribution

Spec 2.4 · Edexcel A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • X∼U[a,b]X\sim U[a,b] has constant density 1b−a\frac{1}{b-a} on [a,b][a,b] and 00 elsewhere.
  • Mean a+b2\frac{a+b}{2} (the midpoint); variance (b−a)212\frac{(b-a)^2}{12}.
  • The CDF is F(x)=x−ab−aF(x)=\frac{x-a}{b-a} for a≤x≤ba\le x\le b, with 00 below and 11 above.
  • P(c<X<d)=d−cb−a\mathrm{P}(c<X<d)=\frac{d-c}{b-a}: probability is the width of a rectangle times its height.
  • Model assumption: every value in the interval is equally likely and none outside can occur.

The rectangular density

Every value in [a,b][a,b] is equally likely, so the density is a flat rectangle of area 1.

X∼U[a,b]X\sim U[a,b] has density f(x)=1b−af(x)=\frac{1}{b-a} for a≤x≤ba\le x\le b and 00 otherwise.

The graph is a rectangle of width b−ab-a and height 1b−a\frac{1}{b-a}, so the total area is 1. This is the continuous uniform distribution, also called the rectangular distribution. Typical models are waiting times for a regular service and rounding errors.

23456789100.050.10.150.20.25xy(2, 0.125)(10, 0.125)f(x) = 1/8
U[2, 10]: constant density 1/8, a rectangle of width 8 and area 1.

What is the height of the density for X∼U[3,8]X\sim U[3,8]?

Mean and variance

The mean is the midpoint a+b2\frac{a+b}{2} and the variance is (b−a)212\frac{(b-a)^2}{12}.

The mean is ∫abxb−a dx=b2−a22(b−a)=a+b2\int_a^b\frac{x}{b-a}\,dx=\frac{b^2-a^2}{2(b-a)}=\frac{a+b}{2}, the midpoint.

For the variance, E(X2)=b3−a33(b−a)=a2+ab+b23\mathrm{E}(X^2)=\frac{b^3-a^3}{3(b-a)}=\frac{a^2+ab+b^2}{3}, so Var(X)=a2+ab+b23−(a+b)24=(b−a)212\mathrm{Var}(X)=\frac{a^2+ab+b^2}{3}-\frac{(a+b)^2}{4}=\frac{(b-a)^2}{12}.

The median equals the mean because the density is symmetrical.

(a + b)/2a = 0b = 1CDmean
Uniform on [0, 1]: f(x) = 1/(b − a) = 1, the mean is the midpoint (a + b)/2 = 0.5 and the variance is (b − a)²/12 = 1/12
  • MeanE(X)=a+b2\mathrm{E}(X)=\frac{a+b}{2}
  • VarianceVar(X)=(b−a)212\mathrm{Var}(X)=\frac{(b-a)^2}{12}

Worked example

X∼U[2,10]X\sim U[2,10]. Find E(X)\mathrm{E}(X) and Var(X)\mathrm{Var}(X).

What is the variance of X∼U[0,6]X\sim U[0,6]?

The cumulative distribution function

It is a straight line from (a,0)(a,0) to (b,1)(b,1): F(x)=x−ab−aF(x)=\frac{x-a}{b-a}.

No probability lies below aa and all of it lies below bb. For a≤x≤ba\le x\le b, F(x)=∫ax1b−a dt=x−ab−a.F(x)=\int_a^x\frac{1}{b-a}\,dt=\frac{x-a}{b-a}. So F(x)=0F(x)=0 for x<ax<a, and F(x)=1F(x)=1 for x>bx>b. The ppth percentile is a+p100(b−a)a+\frac{p}{100}(b-a).

State all three pieces when you derive the cumulative distribution function.

23456789100.20.40.60.811.2xy(2, 0)(10, 1)median (6, 0.5)F(x) = (x − 2)/8
The CDF of U[2, 10] is a straight line from (2, 0) to (10, 1).

For X∼U[2,10]X\sim U[2,10], what is the 75th percentile?

Calculating probabilities

Probability is the shaded width times the height 1b−a\frac{1}{b-a}.

For a≤c≤d≤ba\le c\le d\le b, P(c<X<d)=d−cb−a.\mathrm{P}(c<X<d)=\frac{d-c}{b-a}. Because XX is continuous, P(X=c)=0\mathrm{P}(X=c)=0, so << and ≤\le make no difference. If the interval runs outside [a,b][a,b], cut it back to the part inside first. Think of probability as area.

23456789100.050.10.150.20.25xyx = 7f(x) = 1/8
P(X > 7) is the shaded rectangle: width 3, height 1/8, area 3/8.

Worked example

X∼U[2,10]X\sim U[2,10]. Find P(X>7)\mathrm{P}(X>7).

X∼U[0,20]X\sim U[0,20]. Find P(5<X<9)\mathrm{P}(5<X<9).

Parameters and modelling

Form equations in aa and bb from the mean and variance, and state the equal-likelihood assumption.

If the mean and variance (or a probability) are given, form equations in aa and bb.

In context, state the model assumption: every value in the interval is equally likely and none outside can occur.

A measurement recorded to the nearest 0.10.1 has rounding error uniform on [−0.05,0.05][-0.05,0.05].

−0.1−0.08−0.06−0.04−0.0200.020.040.060.080.12468101214xy−0.050.05f = 10
Rounding to the nearest 0.1: error is U[−0.05, 0.05], density 10.

Worked example

Y∼U[a,b]Y\sim U[a,b] with E(Y)=9\mathrm{E}(Y)=9 and Var(Y)=12\mathrm{Var}(Y)=12. Find aa and bb.

Y∼U[a,b]Y\sim U[a,b] has mean 5 and b−a=6b-a=6. What is aa?

Try an exam question

The continuous random variable X∼U[1,9]X\sim U[1,9]. Find E(X)\mathrm{E}(X), Var(X)\mathrm{Var}(X) and P(3<X<4.5)\mathrm{P}(3<X<4.5).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find P(X>7)\mathrm{P}(X>7).

1 mark, marked against the mark scheme

Revision notes