Rectangular distribution

Rectangular distribution

Spec SD7 · AQA A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A rectangular (uniform) distribution on [a,b][a,b] has f(x)=1b−af(x)=\frac{1}{b-a}.
  • Use it when every part of a fixed interval is equally likely.
  • P(c<X<d)=d−cb−aP(c<X<d)=\dfrac{d-c}{b-a}.
  • E(X)=a+b2E(X)=\dfrac{a+b}{2}.
  • Var(X)=(b−a)212\mathrm{Var}(X)=\dfrac{(b-a)^2}{12}.

The rectangular model

Every value in [a,b][a,b] is equally likely, so the pdf is a rectangle of height 1b−a\frac{1}{b-a}.

A continuous random variable XX has a rectangular distribution (also called uniform) on [a,b][a,b] when every value in the interval is equally likely.

The pdf is

f(x)=1b−a(a≤x≤b),f(x)=0 otherwise.f(x)=\frac{1}{b-a}\quad(a\le x\le b),\qquad f(x)=0\ \text{otherwise}.

The graph is a rectangle of width b−ab-a and height 1b−a\frac{1}{b-a}, so the total area is 11.

22.533.544.555.560.10.20.30.40.5xy(2, 1/4)(6, 1/4)f(x) = 1/4
Rectangular distribution on [2, 6]: height 1/4, width 4, area 1.

XX is rectangular on [3,7][3,7]. What is f(x)f(x) on that interval?

When to use it as a model

When the variable is continuous in a fixed interval and no part of it is favoured.

Use a rectangular distribution when the variable is continuous and takes values only within a fixed interval, and there is no reason to favour any part of it, so sub-intervals of equal width are equally likely.

Typical examples are the waiting time for something that arrives at a random moment in a fixed cycle, and rounding errors.

It is not suitable if values cluster or the interval is not fixed.

123456789100.020.040.060.080.10.120.140.160.180.2xyf(x) = 1/10
Waiting time X for a bus at a random moment in a 10-minute cycle: every sub-interval of equal width has the same probability (f(x) = 0.1)

Suitable

  • Bus arriving at a random moment in a 10-minute cycle
  • Rounding errors

Not suitable

  • Commuters arriving just before each train
  • Heights of adult students

Which situation suits a rectangular model?

Calculating probabilities

Probability is area: the width of the interval you want divided by the full width b−ab-a.

Probability is area, so for a≤c<d≤ba\le c<d\le b:

P(c<X<d)=∫cd1b−a dx=d−cb−a.\mathrm{P}(c<X<d)=\int_c^d\frac{1}{b-a}\,dx=\frac{d-c}{b-a}.

Limit any bound to the interval first, then divide by the full width b−ab-a, not by bb.

For P(∣E∣>0.4)\mathrm{P}(|E|>0.4) on [−0.5,0.5][-0.5,0.5], add the two tails: 0.1+0.1=0.20.1+0.1=0.2.

123456789100.020.040.060.080.10.120.140.160.180.2xyc = 3d = 7f(x) = 1/(b − a)
Uniform on [0, 10]: P(3 < X < 7) is the shaded area, width 4 × height 0.1 = 0.4
  • P(c<X<d)\mathrm{P}(c<X<d)d−cb−a\dfrac{d-c}{b-a}

Worked example

XX is rectangular on [2,10][2,10]. Find P(3<X<5.5)\mathrm{P}(3<X<5.5).

XX is rectangular on [0,20][0,20]. What is P(X>15)\mathrm{P}(X>15)?

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}.

E(X)=a+b2,Var(X)=(b−a)212,σ=b−a12.\mathrm{E}(X)=\frac{a+b}{2},\qquad \mathrm{Var}(X)=\frac{(b-a)^2}{12},\qquad \sigma=\frac{b-a}{\sqrt{12}}.

The mean is the midpoint, as symmetry suggests. Trains every 15 minutes give Var=22512=18.75\mathrm{Var}=\frac{225}{12}=18.75 and σ=4.33\sigma=4.33 minutes.

The proofs use b2−a2=(b−a)(b+a)b^2-a^2=(b-a)(b+a) and b3−a3=(b−a)(a2+ab+b2)b^3-a^3=(b-a)(a^2+ab+b^2). The mean and variance both follow from integrating 1b−a\frac{1}{b-a}.

24681012140.020.040.060.080.1xymean = 7.5f(x) = 1/15
Trains every 15 minutes: X is uniform on [0, 15], with mean 7.5 and σ ≈ 4.33 minutes
  • Meana+b2\dfrac{a+b}{2}
  • Variance(b−a)212\dfrac{(b-a)^2}{12}

Proof of the mean

Prove E(X)=a+b2\mathrm{E}(X)=\frac{a+b}{2} for a rectangular distribution on [a,b][a,b].

Proof of the variance

Prove Var(X)=(b−a)212\mathrm{Var}(X)=\frac{(b-a)^2}{12}.

XX is rectangular on [0,12][0,12]. What is Var(X)\mathrm{Var}(X)?

Try an exam question

The continuous random variable XX has a rectangular distribution on [2,10][2,10]. State f(x)f(x), find P(3<X<5.5)\mathrm{P}(3<X<5.5), and find E(X)\mathrm{E}(X) and Var(X)\mathrm{Var}(X).

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

What is the value of f(x)f(x) for 2≤x≤102\le x\le 10?

1 mark, marked against the mark scheme

Revision notes