✓ Official Syllabus VerifiedStandards & Rigor ↗
S2·2

Continuous Random Variables

📌 Continuous Random Variables S2  ·  Probability density function  ·  CDF F(x)  ·  E(X) & \(\text{Var}(X)\)  ·  Median & quartiles

Probability Density Function

\(f(x)\geq0\) for all \(x\) and \(\displaystyle\int_{-\infty}^{\infty}f(x)\,dx=1\). \(P(a\leq X\leq b)=\displaystyle\int_a^b f(x)\,dx\).

Cumulative Distribution Function

\(F(x)=P(X\leq x)=\displaystyle\int_{-\infty}^{x}f(t)\,dt\). Differentiating: \(f(x)=F'(x)\).

Mean (Expectation)

\(E(X)=\displaystyle\int_{-\infty}^{\infty}xf(x)\,dx\). \(E(g(X))=\displaystyle\int g(x)f(x)\,dx\).

Variance

\(\text{Var}(X)=E(X^2)-[E(X)]^2\) where \(E(X^2)=\displaystyle\int x^2f(x)\,dx\).

Median and Percentiles

Median \(m\): \(F(m)=0.5\). \(p\)-th percentile \(x_p\): \(F(x_p)=p/100\).

Uniform Distribution

\(X\sim U(a,b)\): \(f(x)=\dfrac{1}{b-a}\), \(E(X)=\dfrac{a+b}{2}\), \(\text{Var}(X)=\dfrac{(b-a)^2}{12}\).

▲ Continuous Random Variables — Reference
A CRV \(X\) has a probability density function \(f(x)\geq0\) with \(\int_{-\infty}^{\infty}f(x)\,dx=1\). CDF: \(F(x)=P(X\leq x)=\int_{-\infty}^{x}f(t)\,dt\). Mean: \(E(X)=\int x\,f(x)\,dx\).   Variance: \(\text{Var}(X)=\int x^2f(x)\,dx-[E(X)]^2\). Median \(m\): solve \(F(m)=0.5\).   Mode: maximum of \(f(x)\).
● Deep Conceptual Intuition — Continuous Random Variables

Probabilistic Normalization & Moment Structure: Every probability model is governed by total probability conservation: \(\sum_x P(X=x) = 1\) for discrete random variables and \(\int_{-\infty}^{\infty} f(x)\,dx = 1\) (with \(f(x) \ge 0\)) for continuous density functions. Expected value \(\mathbb{E}[X]\) acts as a linear operator (\(\mathbb{E}[aX + bY] = a\mathbb{E}[X] + b\mathbb{E}[Y]\)), whereas variance scales quadratically and adds for independent variables: \(\operatorname{Var}(aX \pm bY) = a^2\operatorname{Var}(X) + b^2\operatorname{Var}(Y)\).

Standard normal density curve \(N(0, 1)\) highlighting critical upper-tail probability region \(P(Z \ge 1.28) \approx 0.1003\).
⊙ Explorer · Continuous Random Variable PDF \(f(x)\) & Cumulative \(P(X \le b)\)
interactive
Cumulative Probability \(P(X \le b)\)\(0.684\)
Expected Value \(E(X)\)\(2.00\)
Density Height \(f(b)\)\(1.406\)

The curve shows a valid PDF \(f(x) \ge 0\) on \([0, 4]\) with total area \(\int_{0}^{4} f(x)dx = 1\). Drag bound \(b\) to shade \(P(X \le b)\) and compare with the mean \(E(X)\).

pdf condition
\(\int f(x)\,dx=1\)
CDF
\(F(x)=\int_{-\infty}^{x}f(t)\,dt\)
E(X)
\(\int xf(x)\,dx\)
Var(X)
\(E(X^2)-[E(X)]^2\)
◆ Why It Works — First-Principles Derivation (Continuous Random Variables)

Why Variance Scales as \(a^2\) and Independent Variances Always Add: By definition, \(\operatorname{Var}(Y) = \mathbb{E}[(Y - \mu_Y)^2]\). For \(Y = aX - bW\) with independent \(X, W\), subtracting its mean \(\mu_Y = a\mu_X - b\mu_W\) gives:

\[ \operatorname{Var}(aX - bW) = \mathbb{E}\!\left[(a(X - \mu_X) - b(W - \mu_W))^2\right] = a^2\mathbb{E}[(X-\mu_X)^2] - 2ab\,\operatorname{Cov}(X,W) + b^2\mathbb{E}[(W-\mu_W)^2] \]

Because independence implies \(\operatorname{Cov}(X, W) = 0\), the cross term vanishes and \((-b)^2 = +b^2\), proving \(\operatorname{Var}(aX - bW) = a^2\operatorname{Var}(X) + b^2\operatorname{Var}(W)\). Uncertainty compounds whether random variables are added or subtracted.

Worked example 1 — Finding the constant
Problem. \(f(x)=kx(2-x)\) for \(0\leq x\leq2\), zero otherwise. Find \(k\), then \(E(X)\).
▸ Show step-by-step solution
\[\int_0^2 kx(2-x)\,dx=k\int_0^2(2x-x^2)\,dx=k\left[x^2-\tfrac{x^3}{3}\right]_0^2=k\cdot\tfrac{4}{3}=1\Rightarrow k=\tfrac{3}{4}.\]\[E(X)=\int_0^2 x\cdot\tfrac{3}{4}x(2-x)\,dx=\tfrac{3}{4}\int_0^2(2x^2-x^3)\,dx=\tfrac{3}{4}\left[\tfrac{2x^3}{3}-\tfrac{x^4}{4}\right]_0^2=\tfrac{3}{4}\cdot\tfrac{4}{3}=1.\]
Worked example 2 — CDF and median
Problem. With the same \(f(x)=\tfrac{3}{4}x(2-x)\) on \([0,2]\), find the CDF \(F(x)\) and the median.
▸ Show step-by-step solution
\[F(x)=\int_0^x \tfrac{3}{4}t(2-t)\,dt=\tfrac{3}{4}\left[t^2-\tfrac{t^3}{3}\right]_0^x=\tfrac{3x^2}{4}-\tfrac{x^3}{4}.\]

Median: \(F(m)=\tfrac{1}{2}\Rightarrow\tfrac{3m^2}{4}-\tfrac{m^3}{4}=\tfrac{1}{2}\Rightarrow m^3-3m^2+2=0\). Try \(m=1\): \(1-3+2=0\) ✓. So median \(=1\).

Worked Example \(C\) — Continuous Random Variables (Easy Application)
Problem. The continuous random variable \( X \) has probability density function given by \[ f(x) = \begin{cases} k(4 - x^2) & 0 \le x \le 2, \\ 0 & \text{otherwise,} \end{cases} \] where \( k \) is a constant. Find the value of \( k \).
▸ Show step-by-step solution

For \( f(x) \) to be a valid probability density function, the total area under the curve must equal 1: \[ \int_{-\infty}^{\infty} f(x) \, dx = 1 \] Substitute the non-zero definition of \( f(x) \): \[ \int_0^2 k(4 - x^2) \, dx = 1 \] Factor out the constant \( k \) and integrate term by term: \[ k \left[ 4x - \frac{x^3}{3} \right]_0^2 = 1 \] Evaluate at the upper and lower limits: \[ k \left( \left( 4(2) - \frac{2^3}{3} \right) - 0 \right) = 1 \] \[ k \left( 8 - \frac{8}{3} \right) = 1 \] \[ k \left( \frac{16}{3} \right) = 1 \implies k = \frac{3}{16} \] Common errors include: - Integrating \( x^2 \) as \( x^2 \) or dividing by 2 instead of 3, leading to \( k = \frac{1}{4} \). - Integrating over \( [-2, 2] \) instead of \( [0, 2] \), which gives double the integral and results in \( k = \frac{3}{8} \). - Evaluating the integral correctly as \( \frac{16}{3} \) but forgetting to invert to solve for \( k \), yielding \( \frac{16}{3} \).

Worked Example \(D\) — Continuous Random Variables (Medium Application)
Problem. The continuous random variable \( X \) has probability density function \( f(x) \) defined by \[ f(x) = \begin{cases} kx & 0 \le x < 2, \\ k(6 - 2x) & 2 \le x \le 3, \\ 0 & \text{otherwise}, \end{cases} \] where \( k \) is a positive constant. Find the exact value of the conditional probability \( \mathrm{P}(X > 1 \mid X < 2.5) \).
▸ Show step-by-step solution

Step 1: Determine the constant \( k \) using the total probability property \( \int_{-\infty}^{\infty} f(x)\,\mathrm{d}x = 1 \). \[ \int_{0}^{2} kx\,\mathrm{d}x + \int_{2}^{3} k(6 - 2x)\,\mathrm{d}x = 1 \] Evaluating each integral: \[ \int_{0}^{2} kx\,\mathrm{d}x = k\left[\frac{x^2}{2}\right]_0^2 = 2k \] \[ \int_{2}^{3} k(6 - 2x)\,\mathrm{d}x = k\left[6x - x^2\right]_2^3 = k\big((18 - 9) - (12 - 4)\big) = k(9 - 8) = k \] Thus, \( 2k + k = 3k = 1 \implies k = \dfrac{1}{3} \). Step 2: Find \( \mathrm{P}(X < 2.5) \). \[ \mathrm{P}(X < 2.5) = \int_{0}^{2} \frac{1}{3}x\,\mathrm{d}x + \int_{2}^{2.5} \frac{1}{3}(6 - 2x)\,\mathrm{d}x \] \[ = \frac{2}{3} + \frac{1}{3}\left[6x - x^2\right]_2^{2.5} = \frac{2}{3} + \frac{1}{3}\big((15 - 6.25) - 8\big) = \frac{2}{3} + \frac{1}{3}(0.75) = \frac{2}{3} + \frac{1}{4} = \frac{11}{12} \] Step 3: Find the numerator \( \mathrm{P}(1 < X < 2.5) \). \[ \mathrm{P}(1 < X < 2.5) = \int_{1}^{2} \frac{1}{3}x\,\mathrm{d}x + \int_{2}^{2.5} \frac{1}{3}(6 - 2x)\,\mathrm{d}x \] \[ = \frac{1}{3}\left[\frac{x^2}{2}\right]_1^2 + \frac{1}{4} = \frac{1}{3}\left(2 - \frac{1}{2}\right) + \frac{1}{4} = \frac{1}{2} + \frac{1}{4} = \frac{3}{4} \] Step 4: Calculate the conditional probability. \[ \mathrm{P}(X > 1 \mid X < 2.5) = \frac{\mathrm{P}(1 < X < 2.5)}{\mathrm{P}(X < 2.5)} = \frac{\frac{3}{4}}{\frac{11}{12}} = \frac{3}{4} \times \frac{12}{11} = \frac{9}{11} \]

Error Diagnosis — Common Student Traps vs. Exam-Board Method (Continuous Random Variables)
Common Student TrapWhy It Fails MathematicallyCorrect Exam-Board Method
Writing \(\operatorname{Var}(X - Y) = \sigma_X^2 - \sigma_Y^2\)Produces smaller or even negative variance for the difference of independent variables.Always add variances of independent variables: \(\sigma_{X-Y}^2 = \sigma_X^2 + \sigma_Y^2\).
Using \(\sigma / n\) instead of \(\sigma / \sqrt{n}\) for \(\bar{X}\)Confuses the variance of the sample mean \(\sigma^2/n\) with its standard error.Take the square root: \(\text{SE}(\bar{X}) = \sigma / \sqrt{n}\).
Accepting \(H_0\) with certainty when \(p > \alpha\)Absence of sufficient evidence against \(H_0\) does not prove \(H_0\) is true.Write in context: "There is insufficient evidence at the \(\alpha\) level to reject \(H_0\)."
▲ Exam Pacing & Verification Strategy — Continuous Random Variables

Exam Marking Tip (Cambridge International A Level (9709 Paper 3 / Paper 6)): Always state the distribution parameters explicitly (e.g., \(X \sim \operatorname{N}(\mu, \sigma^2)\) or \(\bar{X} \sim \operatorname{N}(\mu, \sigma^2/n)\)) and sketch a quick shaded bell curve before standardizing to \(z = \dfrac{x - \mu}{\sigma}\). This secures the method mark even if a rounding slip occurs later.

\(f(x)=cx^2\) for \(0\leq x\leq3\), zero otherwise. Find \(c\), \(E(X)\), and \(P(1\leq X\leq2)\).
💡 Hint 1 of 3
Set up the initial relation: \(\int_0^3 cx^2\,dx = 9c = 1\Rightarrow c\).
💡 Hint 2 of 3
Rewrite and simplify to obtain: \(E(X) = \tfrac{1}{9}\int_0^3 x^3\,dx = \tfrac{1}{9}\cdot\tfrac{81}{4}\).
💡 Hint 3 of 3
Use the resulting form to finish: \(P(1\leq X\leq2) = \tfrac{1}{9}\left[\tfrac{x^3}{3}\right]_1^2 = \tfrac{1}{27}(8-1)\).
\(\int_0^3 cx^2\,dx=9c=1\Rightarrow c=\tfrac{1}{9}\). \(E(X)=\tfrac{1}{9}\int_0^3 x^3\,dx=\tfrac{1}{9}\cdot\tfrac{81}{4}=\tfrac{9}{4}\). \(P(1\leq X\leq2)=\tfrac{1}{9}\left[\tfrac{x^3}{3}\right]_1^2=\tfrac{1}{27}(8-1)=\tfrac{7}{27}\).
Probability density function \(f(x) = (3/4)x(2 - x)\) for \(0 \le x \le 2\), with total area equal to 1 and symmetric peak mode at \(x = 1\).
⚠️ Cambridge 9709 Traps — Defining the Complete CDF & Point Probabilities

Specifying the CDF Across the Entire Real Line: A cumulative distribution function \(F(x)\) is defined for ALL real numbers \(x\). Cambridge will penalize solutions that write only the piecewise middle formula. You must include:

\[F(x) = \begin{cases} 0 & x < a \\ \int_a^x f(t)\,dt & a \le x \le b \\ 1 & x > b \end{cases}\]

Continuous Point Probabilities: For any continuous random variable, \(P(X = c) = 0\) for any individual point \(c\). Hence \(P(a < X < b) = P(a \le X \le b) = F(b) - F(a)\). Do not apply discrete continuity corrections unless using a normal approximation to a discrete distribution.

A continuous random variable \(X\) has PDF given by \(f(x) = \frac{k}{x^2}\) for \(1 \le x \le 4\), and 0 elsewhere. (a) Show that \(k = \frac{4}{3}\). (b) Find the median of \(X\).
💡 Hint 1 of 3
(a) Integrate over the support and equate to 1: \(\int_1^4 \frac{k}{x^2}\,dx = k\left[-\frac{1}{x}\right]_1^4 = k\left(-\frac{1}{4} - (-1)\right) = \frac{3}{4}k = 1 \implies k\).
💡 Hint 2 of 3
(b) Find the CDF for \(1 \le x \le 4\): \(F(x) = \int_1^x \frac{4}{3t^2}\,dt = \frac{4}{3}\left(1 - \frac{1}{x}\right)\).
💡 Hint 3 of 3
Set \(F(m) = 0.5\) to find the median \(m\): \(\frac{4}{3}\left(1 - \frac{1}{m}\right) = \frac{1}{2} \implies 1 - \frac{1}{m} = \frac{3}{8} \implies \frac{1}{m} = \frac{5}{8} \implies m = \frac{8}{5}\).

(a) Integrate over the support and equate to 1:

\[\int_1^4 \frac{k}{x^2}\,dx = k\left[-\frac{1}{x}\right]_1^4 = k\left(-\frac{1}{4} - (-1)\right) = \frac{3}{4}k = 1 \implies k = \frac{4}{3}\]

(b) Find the CDF for \(1 \le x \le 4\):

\[F(x) = \int_1^x \frac{4}{3t^2}\,dt = \frac{4}{3}\left(1 - \frac{1}{x}\right)\]

Set \(F(m) = 0.5\) to find the median \(m\):

\[\frac{4}{3}\left(1 - \frac{1}{m}\right) = \frac{1}{2} \implies 1 - \frac{1}{m} = \frac{3}{8} \implies \frac{1}{m} = \frac{5}{8} \implies m = \frac{8}{5} = 1.6\]
[Practice 3 · Hard] A wire of length \(4\text{ m}\) is bent to form a rectangle with adjacent sides of lengths \(X\text{ m}\) and \((2 - X)\text{ m}\), where \(X\) is a continuous random variable with probability density function \[ f(x) = \begin{cases} \frac{3}{8}x^2, & 0 \le x \le 2, \\ 0, & \text{otherwise.} \end{cases} \] Given that the area of the rectangle is at least \(\frac{3}{4}\text{ m}^2\), find the probability that the length of the shorter side is at most \(\frac{2}{3}\text{ m}\).
💡 Hint 1 of 3
Let \(A\) denote the area of the rectangle and \(L_{\min}\) denote the length of the shorter side.
💡 Hint 2 of 3
Determine the condition for \(A \ge \frac{3}{4}\): The area is given by \(A = X(2 - X) = 2X - X^2\). \(2X - X^2 \ge \frac{3}{4} \iff X^2 - 2X + \frac{3}{4} \le 0 \iff \left(X - \frac{1}{2}\right)\left(X - \frac{3}{2}\right) \le 0\).
💡 Hint 3 of 3
Calculate the conditional probability: \(P(E_2 \mid E_1) = \frac{P(E_1 \cap E_2)}{P(E_1)} = \frac{\frac{127}{864}}{\frac{13}{32}} = \frac{127}{864} \times \frac{32}{13} = \frac{127}{27 \times 13}\).
Let \(A\) denote the area of the rectangle and \(L_{\min}\) denote the length of the shorter side. 1. **Determine the condition for \(A \ge \frac{3}{4}\):** The area is given by \(A = X(2 - X) = 2X - X^2\). \[ 2X - X^2 \ge \frac{3}{4} \iff X^2 - 2X + \frac{3}{4} \le 0 \iff \left(X - \frac{1}{2}\right)\left(X - \frac{3}{2}\right) \le 0 \] Thus, \(A \ge \frac{3}{4}\) corresponds to the interval \(E_1 = \left[\frac{1}{2}, \frac{3}{2}\right]\). Using the cumulative distribution function \(F(x) = \int_0^x \frac{3}{8}t^2\,dt = \frac{x^3}{8}\) for \(0 \le x \le 2\): \[ P(E_1) = F\left(\frac{3}{2}\right) - F\left(\frac{1}{2}\right) = \frac{\left(\frac{3}{2}\right)^3 - \left(\frac{1}{2}\right)^3}{8} = \frac{\frac{27}{8} - \frac{1}{8}}{8} = \frac{26}{64} = \frac{13}{32} \] 2. **Determine the condition for \(L_{\min} \le \frac{2}{3}\):** The shorter side length is \(L_{\min} = \min(X, 2 - X)\). \[ \min(X, 2 - X) \le \frac{2}{3} \iff X \le \frac{2}{3} \quad \text{or} \quad 2 - X \le \frac{2}{3} \iff X \ge \frac{4}{3} \] Thus, \(E_2 = \left[0, \frac{2}{3}\right] \cup \left[\frac{4}{3}, 2\right]\). 3. **Find the probability of the intersection \(E_1 \cap E_2\):** \[ E_1 \cap E_2 = \left[\frac{1}{2}, \frac{2}{3}\right] \cup \left[\frac{4}{3}, \frac{3}{2}\right] \] Calculating the probabilities for these two disjoint intervals: \[ P\left(\left[\frac{1}{2}, \frac{2}{3}\right]\right) = \frac{\left(\frac{2}{3}\right)^3 - \left(\frac{1}{2}\right)^3}{8} = \frac{\frac{8}{27} - \frac{1}{8}}{8} = \frac{37}{1728} \] \[ P\left(\left[\frac{4}{3}, \frac{3}{2}\right]\right) = \frac{\left(\frac{3}{2}\right)^3 - \left(\frac{4}{3}\right)^3}{8} = \frac{\frac{27}{8} - \frac{64}{27}}{8} = \frac{217}{1728} \] \[ P(E_1 \cap E_2) = \frac{37 + 217}{1728} = \frac{254}{1728} = \frac{127}{864} \] 4. **Calculate the conditional probability:** \[ P(E_2 \mid E_1) = \frac{P(E_1 \cap E_2)}{P(E_1)} = \frac{\frac{127}{864}}{\frac{13}{32}} = \frac{127}{864} \times \frac{32}{13} = \frac{127}{27 \times 13} = \frac{127}{351} \]
[Practice 4 · Easy] Solve \( |2x+2|=6 \) for \( x \). What is the larger of the two solutions?
💡 Hint 1 of 3
Start from the given mathematical expression in the prompt: \(|2x+2|=6\).
💡 Hint 2 of 3
Write out the unsimplified expression: \(2x+2\). Perform the arithmetic in \(2x+2\) to find the final value.
💡 Hint 3 of 3
To find both values of \(x\).
\( 2x+2=\pm 6 \), giving \( x=2 \) or \( x=-4 \). The larger solution is \( x=2 \).

Continuous Random Variables — 8-Mark Structured Problem

8 pts Calculator Active
For Continuous Random Variables, consider the linear-rate relationship \(f(x) = 2x + 4\) on \(x \ge 0\) together with the quadratic auxiliary \(g(x) = x^2 - 4x + 4\).
  1. (a)2 pts
    Find the initial value \(f(0)\) and the slope \(f'(x)\).
    Scoring Guideline & Justification
    • [M1] Evaluates f(0) and reads gradient coefficient (1 pt)
    • [A1] Obtains f(0) = 4 and slope = 2 (1 pt)
  2. (b)3 pts
    Determine the vertex \((h, k)\) and minimum value of \(g(x)\).
    Scoring Guideline & Justification
    • [M1] Finds axis of symmetry x = 2 (2 pt)
    • [A1] Evaluates minimum k = 0 (1 pt)
  3. (c)3 pts
    Compute the average rate of change of \(g(x)\) from \(x = 0\) to \(x = 4\).
    Scoring Guideline & Justification
    • [M1] Applies (g(4) - g(0)) / 4 (2 pt)
    • [A1] Simplifies to 0 (1 pt)
Complete Worked Solution
(a) \(f(0)=4\), gradient \(2\). (b) Completing the square gives \(g(x)=(x-2)^2+0\), minimum \(0\) at \(x=2\). (c) Average rate \(= (x_1+x_2-4) = 0\).
🔗 See also: Discrete RVs · Integration
A continuous random variable \( X \) has probability density function given by \( f(x) = \frac{3}{8}x^2 \) for \( 0 \le x \le 2 \), and \( f(x) = 0 \) otherwise. Find \( \mathrm{P}(1 \le X \le 2) \).
💡 Hint 1 of 3
To find the probability \( \mathrm{P}(1 \le X \le 2) \), we integrate the probability density function \( f(x) \) over the interval \( [1, 2] \): \(\mathrm{P}(1 \le X \le 2) = \int_{1}^{2} \frac{3}{8}x^2 \, \mathrm{d}x\).
💡 Hint 2 of 3
Find the antiderivative: \(\int \frac{3}{8}x^2 \, \mathrm{d}x = \frac{3}{8} \cdot \frac{x^3}{3} = \frac{x^3}{8}\).
💡 Hint 3 of 3
Evaluate between the limits \(x = 1\) and \(x = 2\): \(\left[ \frac{x^3}{8} \right]_{1}^{2} = \frac{2^3}{8} - \frac{1^3}{8} = \frac{8}{8} - \frac{1}{8}\).
To find the probability \( \mathrm{P}(1 \le X \le 2) \), we integrate the probability density function \( f(x) \) over the interval \( [1, 2] \): \[ \mathrm{P}(1 \le X \le 2) = \int_{1}^{2} \frac{3}{8}x^2 \, \mathrm{d}x \] Find the antiderivative: \[ \int \frac{3}{8}x^2 \, \mathrm{d}x = \frac{3}{8} \cdot \frac{x^3}{3} = \frac{x^3}{8} \] Evaluate between the limits \( x = 1 \) and \( x = 2 \): \[ \left[ \frac{x^3}{8} \right]_{1}^{2} = \frac{2^3}{8} - \frac{1^3}{8} = \frac{8}{8} - \frac{1}{8} = \frac{7}{8} \] Common errors include calculating the lower tail \( \mathrm{P}(0 \le X \le 1) = \frac{1}{8} \), or mistakenly substituting values directly into \( f(x) \) instead of integrating.
📝 Chapter Quiz