PYQ Vault

HSC Maths · Probability Distributions

Continuous Random Variables and the Probability Density Function

A continuous random variable is described by a probability density function f(x): f(x) is never negative, the total area under it is 1, and the probability of an interval is the area over that interval.

Why this matters

35 questions, seven of them from board papers: finding k so that a function is a p.d.f. (2024, and with P(1 < X < 2) in 2020), P(X < 1) and P(|X| < 1) for a given p.d.f. (2019, 2023, and as an MCQ in 2026), and the bus waiting-time question with a constant p.d.f. (2025, both as an MCQ and as a written question). The textbook rows are the solved examples of 7.4, Exercise 7.2 Q.1 to Q.7 and Miscellaneous Exercise 7.

Concept 1 of 3: Checking a p.d.f. and finding its constant

A continuous variable has too many values to give each one a probability, so probability is spread over an interval like mass along a rod, and f(x) is how thick the spread is at x. The thickness can never be negative, and the total amount spread must be 1. Because f(x) is a height and not a probability, it can be more than 1.

Definition

  • Let XX be a continuous random variable whose values form the interval S=(a,b)S = (a, b), called the support of XX.
  • A non-negative integrable function f(x)f(x) is the probability density function (p.d.f.) of XX when the three conditions below hold.
  • Condition 1: f(x)≥0f(x) \geq 0 for every xx in SS.
  • Condition 2: the area under y=f(x)y = f(x) over SS is 1, that is ∫Sf(x) dx=1\int_S f(x)\,dx = 1.
  • Condition 3: for an interval AA, P[X∈A]=∫Af(x) dxP[X \in A] = \int_A f(x)\,dx.
  • f(x)f(x) is not P[X=x]P[X = x]: for f(x)=3x2f(x) = 3x^2 on (0,1)(0, 1), f(0.9)=2.43f(0.9) = 2.43.
  • To find a constant kk in f(x)f(x), put ∫abf(x) dx=1\int_a^b f(x)\,dx = 1 and solve.

Conditions for a p.d.f.

f(x)≥0 on S,∫Sf(x) dx=1f(x) \geq 0 \text{ on } S, \qquad \int_{S} f(x)\,dx = 1

Worked example

Find kk if f(x)=k(2x+1)f(x) = k(2x + 1) for 0<x<20 < x < 2 and =0= 0 otherwise is the p.d.f. of a random variable XX.
Practise this conceptself-check · 2 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2024 · Q. 25Easy

Example 1 · Probability Distributions · Continuous Random Variables and Probability Density Function

Find kk, if f(x)=kx2(1−x)f(x) = kx^{2}(1 - x), for 0<x<10 < x < 1,           =0\ \ \ \ \ \ \ \ \ \ = 0 otherwise is the p.d.f. of random variable XX.

Checking only the area

f(x)=x2f(x) = \dfrac{x}{2} on (−2,2)(-2, 2) is negative for x<0x < 0, so it is not a p.d.f. whatever its area. Test the sign over the whole support as well as the area.

Treating f(x) as a probability

A value of f(x)f(x) greater than 1 does not make ff wrong. Only areas under the curve are probabilities.

Concept 2 of 3: Probability of an interval

The probability that X lands between c and d is the area under the curve between them. A single point has no width and so no area, which is why P(X = c) is 0 for a continuous variable and why strict and non-strict inequalities give the same answer. Outside the support the curve is flat at 0, so the area stops at the edge of the support.

Definition

  • P[c<X<d]=∫cdf(x) dxP[c < X < d] = \int_c^d f(x)\,dx.
  • P[X=c]=0P[X = c] = 0 for every cc, so P[c<X<d]=P[c≤X≤d]P[c < X < d] = P[c \leq X \leq d].
  • Cut the limits to the support: where f(x)=0f(x) = 0, there is no area.
  • ∣X∣<a|X| < a means −a<X<a-a < X < a; ∣X∣>a|X| > a means X<−aX < -a or X>aX > a.
  • P[X>d]=1−P[X≤d]P[X > d] = 1 - P[X \leq d] is often the quicker route.

Probability as an area

P[c<X<d]=∫cdf(x) dx,P[X=c]=0P[c < X < d] = \int_{c}^{d} f(x)\,dx, \qquad P[X = c] = 0

Worked example

XX has p.d.f. f(x)=x29f(x) = \dfrac{x^2}{9} for 0<x<30 < x < 3 and =0= 0 otherwise. Find P(1<X<2)P(1 < X < 2) and P(X>2)P(X > 2).
Practise this conceptself-check · 3 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2023 · Q. 25Moderate

Example 2 · Probability Distributions · Continuous Random Variables and Probability Density Function

For the following probability density function of a random variable XX, find (a) P(X<1)P(X < 1) and bb P(∣X∣<1)P\left( |X| < 1 \right). f(x)=x+218f(x) = \frac{x + 2}{18}, for −2<x<4- 2 < x < 4          =0\ \ \ \ \ \ \ \ \ = 0, otherwise

Integrating beyond the support

If the support is (0,6)(0, 6) and you need P(X>3)P(X > 3), integrate from 3 to 6, not to infinity: beyond 6 the density is 0.

Reading |X| < a as X < a

∣X∣<a|X| < a is the two-sided interval −a<X<a-a < X < a. Write it out before you integrate.

Expecting < and ≤ to differ

For a continuous variable P[X=c]=0P[X = c] = 0, so P(X<c)P(X < c) and P(X≤c)P(X \leq c) are equal. Say so in one line rather than working both.

Concept 3 of 3: A constant p.d.f.: waiting-time questions

When f(x) is the same constant across the whole support, every stretch of the same length carries the same probability. The probability of an interval is then just its length divided by the length of the support, which makes a quick check on the integral.

Definition

  • f(x)=1b−af(x) = \dfrac{1}{b - a} for a≤x≤ba \leq x \leq b, and 0 otherwise, is a p.d.f.: its area is 1b−a×(b−a)=1\dfrac{1}{b - a} \times (b - a) = 1.
  • For a≤c<d≤ba \leq c < d \leq b: P[c<X<d]=∫cd1b−a dx=d−cb−aP[c < X < d] = \int_c^d \dfrac{1}{b - a}\,dx = \dfrac{d - c}{b - a}.
  • A board answer still shows the integral; the length rule is the check.

Constant density

f(x)=1b−a, a≤x≤b,P[c<X<d]=d−cb−af(x) = \frac{1}{b - a},\ a \leq x \leq b, \qquad P[c < X < d] = \frac{d - c}{b - a}

Worked example

The time XX (in minutes) a customer waits at a counter has p.d.f. f(x)=110f(x) = \dfrac{1}{10} for 0≤x≤100 \leq x \leq 10 and =0= 0 otherwise. Find the probability that the wait is (i) between 2 and 5 minutes, (ii) less than 6 minutes.
Practise this conceptself-check · 2 quick reps

The same idea in a real exam question:

Maharashtra HSC Class 12 · 2025 · Q. 14Easy

Example 3 · Probability Distributions · Continuous Random Variables and Probability Density Function

Suppose that XX is waiting time in minutes for a bus and its p.d.f. is given by: f(x)=15f(x) = \frac{1}{5}, for 0≤x≤50 \leq x \leq 5 =0= 0, otherwise. Find the probability that: (i) waiting time is between 1 to 3 minutes. (ii) waiting time is more than 4 minutes.

Integrating to infinity for 'more than'

'More than' a time means up to the end of the support, not to infinity. Past the end the density is 0, and integrating a constant to infinity gives no finite answer.

Only the length rule, no working

Writing the answer from the lengths alone can lose the method marks. Show ∫cdf(x) dx\int_c^d f(x)\,dx with its limits, then evaluate.

Summary — formulas & gotchas at a glance

A revision cheat-sheet for the formulas and gotchas above. Click any concept name to jump back to its full explanation.

Formulas (3)

  • Checking a p.d.f. and finding its constant

    Conditions for a p.d.f.

    f(x)≥0 on S,∫Sf(x) dx=1f(x) \geq 0 \text{ on } S, \qquad \int_{S} f(x)\,dx = 1
  • Probability of an interval

    Probability as an area

    P[c<X<d]=∫cdf(x) dx,P[X=c]=0P[c < X < d] = \int_{c}^{d} f(x)\,dx, \qquad P[X = c] = 0
  • A constant p.d.f.: waiting-time questions

    Constant density

    f(x)=1b−a, a≤x≤b,P[c<X<d]=d−cb−af(x) = \frac{1}{b - a},\ a \leq x \leq b, \qquad P[c < X < d] = \frac{d - c}{b - a}

Watch out for (7)

Test yourself on Probability Distributions

10 past MH HSC 12 questions from this chapter, timed at 15 minutes and marked the way the exam marks it. You see your score and every answer the moment you finish. Free to start.