6.3 - Probability density functions

6.3 - Probability density functions

A continuous measurement can have zero probability at every single exact value and still have total probability one. In this first part of 6.3, you will explain that apparent puzzle using area, find probabilities from a density function, and handle distributions whose possible values extend indefinitely.

Density is not point probability

Can a probability density have height 22? Yes: a height is not an area. A triangle of width 11 and height 22 has area 11, so it can represent a complete probability distribution.

A continuous random variable models measurements across an interval, rather than a list of separate scores. Its probability density function, written f(x)f(x), tells us how probability is spread along that interval. Probability belongs to an area under the curve.

Probability density function

A probability density function is non-negative and has total area 11:

f(x)≥0,∫all possible valuesf(x) dx=1.f(x)\ge0,\qquad \int_{\text{all possible values}} f(x)\,\mathrm dx=1.

The interval where the density applies is its support; take f(x)=0f(x)=0 elsewhere. Density may exceed 11, although an area's probability cannot.

For a continuous density, a single point has width zero and hence probability zero: P(X=a)=0\mathrm P(X=a)=0. Thus including or excluding an endpoint does not change an interval probability. This is about an exact mathematical measurement. A reading rounded to 1.01.0 may represent a whole interval of actual measurements, and that interval can have positive probability.

[DIAGRAM: asset_name: Density height and probability area; asset_slug: density-height-area; caption: A height of two is compatible with a total probability of one; description: Two triangular density graphs on matching horizontal and vertical scales. The left is f(x) equals x over two from zero to two, with height one and total area one. The right is f(x) equals two x from zero to one, with height two and total area one. A narrow highlighted strip on the right is labelled probability is area, not height.]
A height of two is compatible with a total probability of one

Worked example 1: normalising a triangle

Question. f(x)=kxf(x)=kx for 0≤x≤20\le x\le2, and f(x)=0f(x)=0 otherwise. Find kk.

Plan. Make the triangle's total area equal to 11, then check non-negativity.

Its base is 22 and height is 2k2k, so

12(2)(2k)=1⟹k=12.\frac12(2)(2k)=1\quad\Longrightarrow\quad k=\frac12.

Answer. k=1/2k=1/2, giving f(x)=x/2f(x)=x/2 on the support.

Check. Integration gives ∫02(x/2) dx=[x2/4]02=1\int_0^2(x/2)\,\mathrm dx=[x^2/4]_0^2=1, and x/2≥0x/2\ge0 throughout the stated interval.

Change only the upper endpoint from 22 to 11. The triangle must become taller to preserve its area.

Worked example 2: a density greater than one

Question. g(x)=kxg(x)=kx for 0≤x≤10\le x\le1, and g(x)=0g(x)=0 otherwise. Find kk and P(X=1)\mathrm P(X=1) for this density.

Plan. Normalise over the narrower support, then use the zero area of a point.

∫01kx dx=[kx22]01=k2=1,k=2.\int_0^1 kx\,\mathrm dx=\left[\frac{kx^2}{2}\right]_0^1 =\frac k2=1, \qquad k=2.

Although g(1)=2g(1)=2, a single point has no area.

Answer. k=2k=2 and P(X=1)=0\mathrm P(X=1)=0.

Check. The triangle has base 11 and height 22, so its area is 11. Also P(X≤1)=1\mathrm P(X\le1)=1: zero probability at the endpoint does not remove the probability accumulated before it.

Geometry can simplify normalisation for curved graphs too. A quarter-circle density of radius aa in the first quadrant has area πa2/4\pi a^2/4, so total area one gives a=2/πa=2/\sqrt\pi. You need not integrate a curve when its area is already known geometrically.

Watch out

Setting f(a)=P(X=a)f(a)=\mathrm P(X=a) confuses height with area. Also check non-negativity: a function with integral 11 but negative values on part of its interval is not a density.

Try a new interval, keeping both density conditions in mind.

Finding probabilities

For the density f(x)=2xf(x)=2x on 0≤x≤10\le x\le1, the probability between 0.20.2 and 0.60.6 is the area under that part of the line. It is not the difference in heights 1.2−0.41.2-0.4.

Probability as an integral

If a<ba<b,

P(a<X<b)=∫abf(x) dx.\mathrm P(a<X<b)=\int_a^b f(x)\,\mathrm dx.

Use f(x)=0f(x)=0 outside its support, or integrate only over the overlap of the event and the support. Endpoint inclusion makes no difference for a continuous density.

Not stated separately in the formula booklet: learn the area interpretation.

First sketch the support and mark the event. If the event extends beyond the possible values, trim its limits to the support. If it has no overlap, its probability is zero. Integrate a non-negative density in increasing order of limits so the resulting probability is non-negative.

Worked example 3: an event inside the support

Question. XX has density f(x)=2xf(x)=2x for 0≤x≤10\le x\le1, and zero otherwise. Find P(0.2<X<0.6)\mathrm P(0.2<X<0.6).

Plan. Integrate between the two event boundaries, both of which lie in the support.

P(0.2<X<0.6)=∫0.20.62x dx=[x2]0.20.6=0.36−0.04=0.32.\mathrm P(0.2<X<0.6)=\int_{0.2}^{0.6}2x\,\mathrm dx =[x^2]_{0.2}^{0.6}=0.36-0.04=0.32.

Answer. 0.320.32.

Check. The region is a trapezium of width 0.40.4, with heights 0.40.4 and 1.21.2. Its area is 12(0.4+1.2)(0.4)=0.32\frac12(0.4+1.2)(0.4)=0.32.

Keep the lower boundary and move only the upper boundary beyond the support. The probability stops accumulating at 11.

Continue this lesson.

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

Create free account