Probability density functions

Probability density functions

Spec SD1–SD3 · AQA A-Level Further Maths: Revision notes

Studying this course? Keep your progress in one place.

Key facts

  • A continuous random variable is described by a pdf f(x)f(x); probability is the area under the curve.
  • P(X=a)=0P(X=a)=0 for any single value, so strict and non-strict inequalities give the same probability.
  • A valid pdf has f(x)≥0f(x)\ge0 and total area 11.
  • P(a<X<b)=∫abf(x) dxP(a<X<b)=\int_a^bf(x)\,dx.
  • The median satisfies ∫−∞mf=12\int_{-\infty}^mf=\frac12; the quartiles use 14\frac14 and 34\frac34.

Discrete and continuous variables

A continuous variable has a pdf: probability is the area under the curve, and any single value has probability 00.

A discrete random variable takes separate values and each has a probability P(X=x)P(X=x).

A continuous random variable takes any value in an interval (a time or a mass), so we cannot list the values. It is described by a probability density function (pdf) f(x)f(x). Probability is the area under the curve, not the height.

A single value has no width, so P(X=a)=0P(X=a)=0 and P(X<a)=P(X≤a)P(X<a)=P(X\le a).

1234560.050.10.150.20.250.30.350.4xyf(x) = x/18
For f(x) = x/18 on [0, 6], P(2 < X < 4) is the shaded area, not a height

XX is continuous. What is P(X=2.5)P(X=2.5)?

What makes a valid pdf

It is never negative and the total area under it is 11.

A function ff is a pdf if:

  1. f(x)≥0f(x)\ge0 for all xx;
  2. the total area is 1: ∫−∞∞f(x) dx=1\int_{-\infty}^{\infty}f(x)\,dx=1.

A pdf is usually given in pieces and is 00 outside the stated range, so integrate only over the range where ff is non-zero.

If ff contains an unknown constant kk, integrate over the range, set the result equal to 1 and solve.

0.10.20.30.40.50.60.70.80.910.511.52xy(1, 2)f(x) = 2x
f(x) = 2x for 0 ≤ x ≤ 1 (and 0 elsewhere) is a valid pdf: it is never negative and the shaded area is ½ × 1 × 2 = 1.
  • Never negativef(x)≥0f(x)\ge0
  • Total area∫f(x) dx=1\int f(x)\,dx=1

Worked example

f(x)=kx2f(x)=kx^2 on [0,3][0,3] and 00 otherwise. Find kk.

f(x)=kxf(x)=kx on [0,4][0,4] and 00 otherwise is a pdf. Find kk.

Probabilities for an interval

Integrate the pdf between the limits: P(a<X<b)=∫abf(x) dxP(a<X<b)=\int_a^bf(x)\,dx.

The probability that XX lies between aa and bb is the area under ff between them:

P(a<X<b)=∫abf(x) dxP(a<X<b)=\int_a^bf(x)\,dx

Since P(X=a)=0P(X=a)=0, strict or non-strict inequalities make no difference.

For a tail, integrate to the end of the range or use P(X>a)=1−P(X<a)P(X>a)=1-P(X<a).

If ff is defined in pieces, split the integral where the formula changes.

0.511.522.530.20.40.60.81xyf(x) = x²/9
P(1 < X < 2) = 7/27 is the shaded area under f(x) = x²/9

Worked example

f(x)=x29f(x)=\frac{x^2}{9} on [0,3][0,3]. Find P(1<X<2)P(1<X<2).

For f(x)=x29f(x)=\frac{x^2}{9} on [0,3][0,3], find P(X>2)P(X>2).

Median and quartiles

Set the area from the start of the range up to the value equal to 12\frac12, 14\frac14 or 34\frac34.

The median mm has half the probability below it: ∫−∞mf(x) dx=12\int_{-\infty}^{m}f(x)\,dx=\frac12.

The lower quartile Q1Q_1 has area 14\frac14 below it and the upper quartile Q3Q_3 has 34\frac34. The interquartile range is Q3−Q1Q_3-Q_1.

Integrate from the lower end of the range, set the area equal to 12\frac12, 14\frac14 or 34\frac34 and solve. Reject any root outside the range of XX.

1234560.050.10.150.20.250.30.350.4xymedian ≈ 4.24f(x) = x/18
f(x) = x/18 on [0, 6]; the shaded area up to the median 3√2 is 1/2

Worked example

f(x)=x18f(x)=\frac{x}{18} for 0≤x≤60\le x\le6, and 00 otherwise. Show that ff is a pdf, find P(X<3)P(X<3) and P(X=4)P(X=4), then find the median and lower quartile.

f(x)=x2f(x)=\frac{x}{2} on [0,2][0,2]. Find the median.

Try an exam question

A continuous random variable XX has probability density function f(x)=x18f(x)=\dfrac{x}{18} for 0≤x≤60\le x\le6, and 00 otherwise. Show that ff is a valid pdf and find the median of XX.

[4 marks]

That's the notes covered.

Carry on to the next subtopic.

Try a question

Find the value of kk.

1 mark, marked against the mark scheme

Revision notes