The continuous uniform distribution

The continuous uniform distribution

Spec 3.1 · Edexcel International 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 pdf 1b−a\frac{1}{b-a} on [a,b][a,b].
  • F(x)=x−ab−aF(x)=\frac{x-a}{b-a} on [a,b][a,b]: a straight line from 0 to 1.
  • Probabilities are ratios of lengths: P(c<X<d)=d−cb−aP(c<X<d)=\frac{d-c}{b-a}.
  • Mean a+b2\frac{a+b}{2} and variance (b−a)212\frac{(b-a)^2}{12}.

The pdf

Every sub-interval of the same length is equally likely, so the pdf is a rectangle of area 1.

A continuous uniform (rectangular) distribution on [a,b][a,b] gives every sub-interval of the same length the same probability. Write X∼U[a,b]X\sim U[a,b]. The pdf is constant, f(x)=1b−af(x)=\frac{1}{b-a} for a≤x≤ba\le x\le b and 00 otherwise.

Its graph is a rectangle of width b−ab-a and height 1b−a\frac{1}{b-a}, so the area is 1. Use it for rounding errors or random waiting times.

23456780.050.10.150.20.250.3xyheight 1/6f(x) = 1/6
The pdf of U[2,8]U[2,8] is a rectangle of height 16\frac16 and width 6, so the area is 1.

For X∼U[1,5]X\sim U[1,5], what is the height of the pdf?

The cumulative distribution function

Integrating the constant density gives a straight line from 0 to 1.

Integrating from aa to xx gives F(x)=x−ab−aF(x)=\frac{x-a}{b-a} for a≤x≤ba\le x\le b, with F(x)=0F(x)=0 for x<ax<a and F(x)=1F(x)=1 for x>bx>b.

For any interval, P(c<X<d)=F(d)−F(c)=d−cb−aP(c<X<d)=F(d)-F(c)=\frac{d-c}{b-a}, the fraction of the range covered. For X∼U[2,8]X\sim U[2,8], P(X≤3.5)=1.56=14P(X\le3.5)=\frac{1.5}{6}=\frac14.

23456780.20.40.60.811.2xy(2, 0)(3.5, 1/4)(8, 1)F(x)
The cdf of U[2,8]U[2,8] is a straight line from (2,0)(2,0) to (8,1)(8,1).

X∼U[0,20]X\sim U[0,20]. Find P(X>15)P(X>15).

Mean and variance

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

By symmetry the mean is the midpoint: E(X)=∫abxb−a dx=a+b2E(X)=\int_a^b\frac{x}{b-a}\,dx=\frac{a+b}{2}.

For the variance, E(X2)=b3−a33(b−a)=a2+ab+b23E(X^2)=\frac{b^3-a^3}{3(b-a)}=\frac{a^2+ab+b^2}{3}, and subtracting (a+b)24\frac{(a+b)^2}{4} gives (b−a)212\frac{(b-a)^2}{12}. In "show that" questions, factorise b2−a2b^2-a^2 and b3−a3b^3-a^3 to cancel (b−a)(b-a).

123456789100.050.10.150.20.250.3xymean 5f(x) = 1/6
Density of X ~ U[2, 8]: a flat line of height 1/6 between 2 and 8 and zero elsewhere. The mean is the midpoint, 5.
  • MeanE(X)=a+b2E(X)=\dfrac{a+b}{2}
  • VarianceVar(X)=(b−a)212\text{Var}(X)=\dfrac{(b-a)^2}{12}

Worked example

Find the mean and variance of X∼U[2,8]X\sim U[2,8].

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

Using the distribution

From a given mean and variance, form a+b=2E(X)a+b=2E(X) and (b−a)2=12 Var(X)(b-a)^2=12\,\text{Var}(X).

Take the positive root for b−ab-a because b>ab>a. State the model assumption when you use it: "assuming the rod length is equally likely to be anywhere in the interval".

Draw the interval on a number line and shade the part you want. The probability is the shaded length divided by b−ab-a.

678910111213141516171861518

Worked example

X∼U[a,b]X\sim U[a,b] has E(X)=12E(X)=12 and Var(X)=12\text{Var}(X)=12. Find aa, bb and P(X>15)P(X>15).

X∼U[0,10]X\sim U[0,10]. Find P(3<X<7)P(3<X<7).

Try an exam question

The continuous random variable XX is uniformly distributed over the interval [2,10][2,10]. Find P(X>7)P(X>7), E(X)E(X) and Var(X)\text{Var}(X).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the value of the probability density function f(x)f(x) for 2≤x≤82\le x\le8.

1 mark, marked against the mark scheme

Revision notes