Game plan 4 · Unit 4
Probability density functions
Area, probability, mean and variance for continuous random variables.
The First Question found statistics, and the question uses the phrase “probability density function”, or you recognise its general form. This is a function defined over an interval and zero everywhere else.
Part 1
The game plan, in order
Work through these four questions in order. The first two come before anything else, because an unknown constant has to be found before you can use the PDF.
General form of a PDF
$$p(x)=\begin{cases}f(x), & a\le x\le b\\[2pt] 0, & \text{otherwise}\end{cases}$$PDFs, in order
- 1Check that it is a PDF question, from the phrase or the general form above.
- 2Are there unknown values in the PDF? Every PDF has an area of $1$ between its bounds. Integrate over that interval and set it equal to $1$ to find them.
- 3Are you asked for a probability between two values? Integrate, using those values as bounds.
- 4Are you asked for the expected value, variance or standard deviation? Use the formulas in Game plan 4.4.
In the Topic Guides
Part 2
The three calculations
Each one is a definite integral of $p(x)$, or of $p(x)$ multiplied by something.
Finding an unknown constant
- 1Every PDF has an area of $1$ between its bounds.
- 2Integrate over that interval and set it equal to $1$.
- 3Solve for the unknown.
Worked example
$p(x)=c(1-x^{2})$ for $0\le x\le1$
$$\int_{0}^{1}c(1-x^{2})\,dx=1$$$$c\left[x-\tfrac{x^{3}}{3}\right]_{0}^{1}=\tfrac{2c}{3}=1$$$$c=\tfrac{3}{2}$$Probability between values
- 1Use the two values as the bounds.
- 2Integrate $p(x)$ between them. A probability is the shaded area under $p(x)$ between the bounds.
Worked example
$p(x)=\tfrac{1}{8}x$ for $0\le x\le4$
$$P(1\le X\le2)=\int_{1}^{2}\tfrac{1}{8}x\,dx$$$$=\left[\tfrac{x^{2}}{16}\right]_{1}^{2}=\tfrac{4}{16}-\tfrac{1}{16}=\tfrac{3}{16}$$Mean, variance and standard deviation
- 1Find the expected value, $E(X)=\int x\,p(x)\,dx$, over the bounds of the PDF.
- 2For the variance, find $E(X^{2})=\int x^{2}p(x)\,dx$, then use $\operatorname{Var}(X)=E(X^{2})-\big(E(X)\big)^{2}$.
- 3Are you asked for the standard deviation? Take the square root of the variance.
Formulas
Expected value
$$E(X)=\int_{-\infty}^{\infty}x\,p(x)\,dx$$Variance
$$\operatorname{Var}(X)=E(X^{2})-\big(E(X)\big)^{2}$$Worked example
$p(x)=\tfrac{1}{8}x$ for $0\le x\le4$
$$E(X)=\int_{0}^{4}x\cdot\tfrac{1}{8}x\,dx=\left[\tfrac{x^{3}}{24}\right]_{0}^{4}=\tfrac{8}{3}$$$$E(X^{2})=\int_{0}^{4}x^{2}\cdot\tfrac{1}{8}x\,dx=\left[\tfrac{x^{4}}{32}\right]_{0}^{4}=8$$$$\operatorname{Var}(X)=8-\left(\tfrac{8}{3}\right)^{2}=\tfrac{8}{9}$$$$\operatorname{SD}(X)=\sqrt{\tfrac{8}{9}}=\tfrac{2\sqrt{2}}{3}\approx0.943$$Part 3
Common QCAA language: Probability density functions
The QCAA will usually tell you it is a PDF with the phrase “probability density function”. If they do not, look for the general form: $p(x)=f(x)$ on $a\le x\le b$, and zero otherwise.
| Question type | What the question says |
|---|---|
| Parameter recovery | “Such that $p(x)$ is a valid probability density function”, “determine the value of $k$ / $a$”, “find the constant”.Your move An unknown constant comes first. Integrate the whole PDF over its interval, make it equal $1$, and solve. |
| Probability | “The probability that $X$ is between $a$ and $b$ / less than / more than / at least”, “$P(a\lt X\lt b)$”.Your move A probability between two values is a definite integral of $p(x)$. With a CDF, it is $P(a\lt X\lt b)=F(b)-F(a)$. |
| Mean, variance and SD | “The mean / expected value / $E(X)$”, “the variance / $\operatorname{Var}(X)$”, “the standard deviation”.Your move Put an extra $x$ inside the integral to get the mean. Get the variance from $\int(x-\mu)^{2}p(x)\,dx$ or $\int x^{2}p(x)\,dx-\mu^{2}$, then square root it for the SD. $E(X)$ comes up most often. |
| Percentile, median, quartiles | “The median”, “the $n$th percentile”, “the lower / upper quartile”, and “the mode / most likely value”.Your move For a median, quartile or percentile, integrate up to the unknown value, make it equal the proportion, and solve. For the mode, find where $p(x)$ has its maximum. |
Spot a mistake on this page? Report it