FS2 2.1, 2.2 - Density and cumulative distribution functions

FS2 2.1, 2.2 - Density and cumulative distribution functions

A continuous model assigns probabilities to intervals by measuring area. You will use a probability density function to find probabilities, construct a cumulative distribution function with the correct branches, and move between the two functions by integration and differentiation.

Density is height; probability is area

A probability model has density f(0.4)=3.2f(0.4)=3.2. Has something gone wrong because 3.2>13.2>1? It sounds suspicious until you ask what the vertical axis measures.

Imagine a histogram whose bar areas are relative frequencies, so its total area is 11. A narrow class can have a tall bar without containing more than all the observations. A frequency polygon smooths the outline; a density curve takes the same area idea into a continuous model.

You already know

From A-level Mathematics, a definite integral measures area under a non-negative curve. If A′(x)=f(x)A'(x)=f(x), then ∫abf(x) dx=A(b)−A(a)\int_a^b f(x)\,\mathrm{d}x=A(b)-A(a).

Here is the model behind the opening question:

f(x)={8x0≤x≤120otherwisef(x)= \begin{cases} 8x & 0\le x\le \frac12\\ 0 & \text{otherwise} \end{cases}

Its whole triangular area is 12×12×4=1\frac12\times\frac12\times4=1. Although its greatest height is 44, every interval probability is an area between 00 and 11.

[DIAGRAM: asset_name: A tall density and its cumulative area; asset_slug: 9fm0-fs2-120-density-cdf; caption: Density height can exceed one while every accumulated probability stays between zero and one; description: Two labelled coordinate panels describe the density f of x equals eight x from zero to one half and zero elsewhere. The left panel shows its triangular area one and shades the interval from three tenths to four tenths in sage, with shaded area seven twenty-fifths. The right panel shows the CDF zero below zero, four x squared from zero to one half, and one thereafter. Dashed guides mark F of three tenths equals nine twenty-fifths and F of four tenths equals sixteen twenty-fifths, whose difference is seven twenty-fifths. All labels and arrows are full-opacity grey.]
Density height can exceed one while every accumulated probability stays between zero and one

Continuous random variable and probability density function

A continuous random variable is modelled by a density ff, with f(x)≥0f(x)\ge0 and total area 11. The probability of an interval is its area under the density. For example, a measured waiting time can be continuous; a count of waiting customers is discrete.

A curve with total area 11 but a negative region is not a density. Both conditions matter.

Probabilities from a density

For a continuous random variable with density ff,

P(a<X≤b)=∫abf(x) dx,∫−∞∞f(x) dx=1\mathrm P(a<X\le b)=\int_a^b f(x)\,\mathrm{d}x, \qquad \int_{-\infty}^{\infty} f(x)\,\mathrm{d}x=1

Use the intersection of the requested interval with the support, the region where the density can be non-zero. These area and normalisation rules follow from the density model.

Not in the formula booklet: learn it.

A single point has no width, hence no area: P(X=c)=0\mathrm P(X=c)=0. This does not mean a continuous observation cannot occur; it means probability is spread over intervals rather than assigned as positive masses to individual points. Consequently, changing an endpoint from strict to inclusive does not alter a continuous probability. Changing a density's value at one isolated point also leaves all its probabilities unchanged.

Key idea

The height f(c)f(c) is a density, not P(X=c)\mathrm P(X=c). If XX is measured in seconds, density has units of inverse seconds; integrating over seconds gives a dimensionless probability.

Keep that distinction in mind when reading the vertical axis.

Find a density constant and integrate over its support

An unknown density constant is fixed by total area 11. Write the support beside the integral before doing any calculus. An infinite endpoint means taking a limit, not substituting infinity as an ordinary number.

Worked example 1: an infinite right-hand tail

Question. A continuous random variable has density f(x)=kx−2f(x)=kx^{-2} for x≥2x\ge2, and 00 otherwise. Find kk and P(X≤6)\mathrm P(X\le6).

Plan. Normalise over [2,∞)[2,\infty), then integrate the resulting density from 22 to 66.

1=lim⁡R→∞∫2Rkx−2 dxwhole support=lim⁡R→∞[−kx]2R=k2tail limit is zerok=2solve the equationP(X≤6)=∫262x−2 dx=[−2x]26=1−13=23upper minus lower\begin{aligned} 1&=\lim_{R\to\infty}\int_2^R kx^{-2}\,\mathrm{d}x && \text{whole support}\\ &=\lim_{R\to\infty}\left[-\frac{k}{x}\right]_2^R =\frac{k}{2} && \text{tail limit is zero}\\ k&=2 && \text{solve the equation}\\ \mathrm P(X\le6)&=\int_2^6 2x^{-2}\,\mathrm{d}x =\left[-\frac2x\right]_2^6 =1-\frac13=\frac23 && \text{upper minus lower} \end{aligned}

Why start at 22? There is no probability below the support, so the requested event is exactly 2≤X≤62\le X\le6.

Answer. k=2k=2, and P(X≤6)=23\mathrm P(X\le6)=\frac23.

Check. The density is non-negative. The complementary tail has area ∫6∞2x−2 dx=13\int_6^\infty2x^{-2}\,\mathrm{d}x=\frac13, so the two areas add to 11.

Worked example 2 changes only the lower support endpoint. The old constant cannot survive unchanged.

Worked example 2: moving the start of the support

Question. Now f(x)=kx−2f(x)=kx^{-2} for x≥3x\ge3, and 00 otherwise. Find kk and P(X≤6)\mathrm P(X\le6).

Plan. Repeat normalisation with lower limit 33, then use that same lower limit in the probability integral.

1=∫3∞kx−2 dx=lim⁡R→∞(−kR+k3)=k3new total areak=3normaliseP(X≤6)=[−3x]36=−12+1=12evaluate both limits\begin{aligned} 1&=\int_3^\infty kx^{-2}\,\mathrm{d}x =\lim_{R\to\infty}\left(-\frac{k}{R}+\frac{k}{3}\right) =\frac{k}{3} && \text{new total area}\\ k&=3 && \text{normalise}\\ \mathrm P(X\le6)&=\left[-\frac3x\right]_3^6 =-\frac12+1=\frac12 && \text{evaluate both limits} \end{aligned}

Why change the constant? Removing [2,3)[2,3) removes area; the remaining curve must become taller to keep total probability 11.

Answer. k=3k=3, and P(X≤6)=12\mathrm P(X\le6)=\frac12.

Check. Its tail above 66 also has area 36=12\frac36=\frac12. The event and its complement have equal areas.

The calculus is ordinary integration. The modelling work is choosing the correct limits and checking the curve's sign.

Watch out

Wrong: integrate from 00 because probabilities start at zero. Right: integrate over the stated support. Here f(x)=0f(x)=0 below 33, and the formula 3x−23x^{-2} is not the density there.

Move the lower support endpoint once more.

Accumulate every earlier piece of area

A cumulative distribution function answers “how much probability has accumulated by this point?” Once a density changes formula, the area already collected does not disappear.

Cumulative distribution function

The cumulative distribution function, or CDF, is F(x)=P(X≤x)F(x)=\mathrm P(X\le x). It is non-decreasing, takes values between 00 and 11, and has limits 00 and 11 at the two ends of the real line. For a continuous model it is continuous, even when the density has a jump.

The lower limit is the beginning of all accumulated probability, rather than a convenient integration constant.

Continue this lesson.

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

Create free account