Mathematical Methods · Mock exam 2026 All mock exam questions
Mock exam · Paper 1 · Multiple choice

Question 6

[1 mark] Technology-free
The question

The continuous random variable $X$ has the probability density function

$$p(x)=\begin{cases}\cos(x), & 0\le x\le\dfrac{\pi}{2}\\[6pt] 0, & \text{otherwise}\end{cases}$$

Which integral is equal to the mean of $X$?

Not quite. You omitted the factor $x$. This integral is the total probability.

$$\begin{aligned}&\displaystyle\int_{0}^{\frac{\pi}{2}}\cos(x)\,dx\\&=\Big[\sin(x)\Big]_{0}^{\frac{\pi}{2}}\\&=1\end{aligned}$$

Not quite. You replaced the probability density function by its antiderivative $\sin(x)$, which is the cumulative distribution function $P(X\le x)=\displaystyle\int_{0}^{x}\cos(t)\,dt=\sin(x)$ on $\left[0,\frac{\pi}{2}\right]$, giving the integrand $x\sin(x)$.

Not quite. You used $x^{2}p(x)$, the integrand for $E\left(X^{2}\right)$ in $\mathrm{Var}(X)=E\left(X^{2}\right)-\left(E(X)\right)^{2}$, not for $E(X)$.

That is it. Step through the hints below to see why.

E(X) ≈ 0.5708 π/4π/2 0.511.50 x p(x)

Solid curve: the density $p(x)=\cos(x)$. Dashed curve and shading: the integrand of the tested option on $\left[0,\frac{\pi}{2}\right]$.

Choose an option to plot its integrand, shade the area under it and read the value of the integral.

Integrand: $\cos(x)$

$$\int_{0}^{\frac{\pi}{2}}\cos(x)\,dx=1$$

This is: the total probability.

Integrand: $x\sin(x)$

$$\int_{0}^{\frac{\pi}{2}}x\sin(x)\,dx=1$$

This is: an integral that uses the cumulative distribution function, not the density.

Integrand: $x^{2}\cos(x)$

$$\int_{0}^{\frac{\pi}{2}}x^{2}\cos(x)\,dx=\frac{\pi^{2}}{4}-2\approx0.4674$$

This is: $E\left(X^{2}\right)$.

Integrand: $x\cos(x)$

$$\int_{0}^{\frac{\pi}{2}}x\cos(x)\,dx=\frac{\pi}{2}-1\approx0.5708$$

This is: $E(X)$.

(A) is the total probability, $1$, not the mean.

(B) uses the cumulative distribution function, not the density, so it is not the mean.

(C) is $E\left(X^{2}\right)$, not $E(X)$.

(D) is the mean. The marker at $x\approx0.5708$ sits inside $\left[0,\frac{\pi}{2}\right]$ and left of the midpoint $\frac{\pi}{4}\approx0.7854$ because the density is largest near $x=0$.

Try the question first. Choose a hint above when you want one.

$$E(X)=\int_{-\infty}^{\infty}x\,p(x)\,dx$$

$p(x)=0$ outside $\left[0,\tfrac{\pi}{2}\right]$, so

$$E(X)=\int_{0}^{\frac{\pi}{2}}x\cos(x)\,dx$$
Why?

The mean weights each value $x$ by its density $p(x)$, so the integrand is $x\,p(x)$, and only the interval where $p(x)$ is non-zero contributes.

The mean weights each value $x$ by its density $p(x)$, and $p(x)=0$ outside $\left[0,\tfrac{\pi}{2}\right]$.

$$E(X)=\int_{0}^{\frac{\pi}{2}}x\cos(x)\,dx$$
(D)

Only mark this done when you could do it without help. Reading the solution does not count.

Back to the index

A Tangent Tuition mock exam question. It is not a past QCAA question, and Tangent Tuition is not affiliated with the QCAA.