Resources For Teachers For Tutors For Students & Parents AI New Books Pricing
Year 11 (2026) Maths Advanced (2026) Probability and Data

Discrete and Continuous Random Variables

20 practice questions 0 video lessons Theory + worked examples
Create a free accountTrack your progress and save your work as you go.
Create free account

Theory

A random variable is a number whose value is decided by a random experiment. This Year 11 Mathematics Advanced page shows how to tell discrete (counted) from continuous (measured) random variables, list the possible values of \(X\), and estimate probabilities such as \(P(X=2)\) and \(P(X\ge 2)\) from frequency tables using relative frequency.

A random variable is a variable whose value is the numerical outcome of a random experiment. It is named with a capital letter, such as \(X\), and a particular value it takes is written with a lower-case letter, \(x\). For example, toss four coins and let \(X\) be the number of heads; then \(X\) can be \(0, 1, 2, 3\) or \(4\). The random variable is the number of heads, not the outcome (the list of heads and tails) itself. A probability such as \(0.5\) is not a random variable.

A discrete random variable takes separate values that can be listed, usually because it counts something: passengers on a bus, faulty phones in a box, correct answers on a quiz. There may be no largest value (the number of calls a salesperson makes until the first sale can be \(1, 2, 3, \ldots\)), but the values are still separate, so it is still discrete.

A continuous random variable can take any value in an interval, because it is measured: time, mass, length, height, temperature, volume. A measurement may be recorded to the nearest second or millimetre, but the quantity itself can lie anywhere in between, so it is still continuous.

The probability that \(X\) takes the value \(x\) is written \(P(X=x)\). From experimental data it is estimated by the relative frequency. Continuous data are usually grouped into class intervals such as \(5\le t\lt 10\).

A discrete random variable on a number lineThe number of heads in 4 tosses can only be 0, 1, 2, 3 or 4, shown as five separate dots with nothing in between. 0 1 2 3 4 X = number of heads in 4 tosses nothing in the gaps: 2.5 heads is impossible
Discrete: the values are separate and can be listed, \(X\in\{0,1,2,3,4\}\).
A continuous random variable on a number lineThe height of a student can be any value in an interval, here from 150 to 190 centimetres, shown as a solid bar. Values such as 163.2 and 171.85 are marked. 150 190 163.2 171.85 H = height of a student (cm) every value in the interval is possible
Continuous: the values fill an interval, so they cannot be listed one by one.
\[P(X=x)\approx\dfrac{\text{frequency of }x}{\text{number of trials}}\]
P of X equals x is approximately frequency of x over number of trials
\[P(X\ge 2)\approx\dfrac{\text{frequency of }x=2,3,\ldots}{\text{number of trials}}\]
P of X at least 2 is approximately the sum of the frequencies of 2, 3 and so on over number of trials
DiscreteContinuous
countedmeasured
separate values that can be listedany value in an interval
number of heads, passengers, faulty phones, quiz scorestime, mass, length, height, volume
\(X\in\{0,1,2,\ldots\}\)for example \(0\le T\lt 20\)
Range of values. Find the smallest and largest possible values, then check which values in between can occur. For the number of sixes when four dice are rolled: smallest \(0\), largest \(4\), and every whole number between occurs, so \(4-0+1=5\) values.
Grouped continuous data. Add the frequencies of the classes that fit. With \(6\) times in \(0\le t\lt 5\), \(9\) in \(5\le t\lt 10\) and \(5\) in \(10\le t\lt 15\): \(P(T\ge 5)\approx\dfrac{9+5}{20}=\dfrac{7}{10}\).
Theory versus data. A theoretical probability comes from the sample space of equally likely outcomes, for example \(P(X=2)=\dfrac{1}{4}\) for the number of heads when two coins are tossed (\(HH\) out of \(HH,HT,TH,TT\)). A relative frequency from data is an estimate that should get closer to it as the number of trials grows.

Discrete or continuous?

  1. Ask whether the value is counted or measured.
  2. Counted (separate whole-number steps, or other separate steps such as half shoe sizes): discrete. List the values if asked.
  3. Measured (time, mass, length, temperature): continuous, even if it is rounded when recorded.
  4. Give the reason in words: “\(X\) counts passengers, so it takes the separate values \(0,1,2,\ldots\)”.

Estimating a probability from a frequency table

  1. Find the number of trials: add the frequencies, or read it from the question.
  2. Add the frequencies of the values in the event, for example \(x=2,3,4\) for \(X\ge 2\).
  3. Divide and simplify: \(P(X\ge 2)\approx\dfrac{\text{that total}}{\text{number of trials}}\).
  4. Unknown frequencies: use a given relative frequency (frequency \(=\) relative frequency \(\times\) trials), then make the frequencies add to the total.
  5. Compare with theory when asked: list the sample space \(S\), count the favourable outcomes, and find \(\dfrac{\text{favourable}}{|S|}\).
Example 1 — Classify each variable
Classify each random variable as discrete or continuous, with a reason.
(i) \(R\), the number of red cars in a car park holding \(50\) cars
(ii) \(M\), the mass in kilograms of a newborn baby
(iii) \(C\), the temperature at 3 pm, recorded to the nearest \(0.1^\circ\)C
(iv) \(N\), the number of tosses of a coin until the first head
Solution

Ask: counted or measured?

(i) \(R\) counts cars: \(R\in\{0,1,\ldots,50\}\). \(\therefore\ R\) is discrete.

(ii) Mass is measured and can be any value in an interval, such as \(3.418\) kg. \(\therefore\ M\) is continuous.

(iii) Temperature is measured. Rounding to \(0.1^\circ\)C limits the recording, not the temperature itself. \(\therefore\ C\) is continuous.

(iv) \(N\) counts tosses: \(N\in\{1,2,3,\ldots\}\). There is no largest value, but the values are separate. \(\therefore\ N\) is discrete.

Example 2 — Listing the possible values
Two fair four-sided dice, each numbered \(1\) to \(4\), are rolled.
(i) \(X\) is the sum of the two numbers. List the possible values of \(X\). How many are there?
(ii) \(Y\) is the product of the two numbers. How many different values can \(Y\) take?
Solution

(i) Smallest sum \(1+1=2\); largest sum \(4+4=8\). Every whole number between can occur (for example \(5=1+4\)).

\(X\)\(\in\)\(\{2,3,4,5,6,7,8\}\)
\(\text{Number of values}\)\(=\)\(8-2+1\)
\(\)\(=\)\(\mathbf{7}\)
X is in the set 2 to 8, which is 7 values

(ii) Products do not fill every number in a range, so list them in a table:

\(\times\)\(1\)\(2\)\(3\)\(4\)
\(1\)\(1\)\(2\)\(3\)\(4\)
\(2\)\(2\)\(4\)\(6\)\(8\)
\(3\)\(3\)\(6\)\(9\)\(12\)
\(4\)\(4\)\(8\)\(12\)\(16\)

\(Y\in\{1,2,3,4,6,8,9,12,16\}\), so \(Y\) can take \(\mathbf{9}\) different values. Values such as \(5\), \(7\) and \(10\) are impossible.

Example 3 — Estimating probabilities from data
In a survey of \(80\) students, \(X\) is the number of pets a student has.
\(x\)\(0\)\(1\)\(2\)\(3\)\(4\)
Frequency\(20\)\(32\)\(14\)\(8\)\(6\)
(i) Estimate \(P(X=1)\).
(ii) Estimate \(P(X\ge 2)\).
(iii) Estimate how many of \(500\) students at the school have no pets.
Give fractions in simplest form.
Solution

(i) Relative frequency \(=\) frequency \(\div\) number of trials:

\(P(X=1)\)\(\approx\)\(\dfrac{32}{80}\)
\(\)\(=\)\(\mathbf{\dfrac{2}{5}}\)
P of X equals 1 is approximately 32 over 80 equals 2 over 5

(ii) Add the frequencies for \(X=2\), \(3\) and \(4\): \(14+8+6=28\).

\(P(X\ge 2)\)\(\approx\)\(\dfrac{28}{80}\)
\(\)\(=\)\(\mathbf{\dfrac{7}{20}}\)
P of X at least 2 is approximately 28 over 80 equals 7 over 20

(iii) \(P(X=0)\approx\dfrac{20}{80}=0.25\).

\(\text{Expected number}\)\(\approx\)\(0.25\times 500\)
\(\)\(=\)\(\mathbf{125}\)
Expected number is approximately 0.25 times 500 equals 125

\(\therefore\) about \(125\) students have no pets.

Example 4 — Missing frequencies and theory
Two fair coins were tossed together \(120\) times and \(X\), the number of heads, was recorded each time.
\(x\)\(0\)\(1\)\(2\)
Frequency\(a\)\(62\)\(b\)
The relative frequency of \(X=0\) is \(0.2\).
(i) Find \(a\) and \(b\).
(ii) Use the data to estimate \(P(X\ge 1)\).
(iii) Use the sample space to find the theoretical value of \(P(X\ge 1)\) and compare.
Solution

(i) Relative frequency of \(X=0\):

\(\dfrac{a}{120}\)\(=\)\(0.2\)
\(a\)\(=\)\(\mathbf{24}\)
\(24+62+b\)\(=\)\(120\)
\(b\)\(=\)\(\mathbf{34}\)
a over 120 equals 0.2 so a equals 24, and b equals 34

(ii) \(X\ge 1\): \(62+34=96\) of \(120\) trials.

\(P(X\ge 1)\)\(\approx\)\(\dfrac{96}{120}\)
\(\)\(=\)\(\mathbf{\dfrac{4}{5}}\)
P of X at least 1 is approximately 96 over 120 equals 4 over 5

(iii) \(S=\{HH,HT,TH,TT\}\), so \(|S|=4\). At least one head: \(HH,HT,TH\).

\(P(X\ge 1)\)\(=\)\(\mathbf{\dfrac{3}{4}}\)
Theoretical P of X at least 1 equals 3 over 4

The estimate \(\dfrac{4}{5}=0.8\) is close to \(\dfrac{3}{4}=0.75\); more trials would be expected to bring it closer.

Common pitfalls

Rounding does not make a variable discrete. A time recorded as \(52\) s is still continuous: the true time could be \(51.8\) s or \(52.36\) s. Think about the quantity, not the recording.
“Infinitely many values” is not the test. The number of calls until the first sale has no largest value, but it is still discrete because its values are separate. A variable is continuous only if it can take every value in an interval.
The random variable is a number. For four coins, \(X\) is the number of heads (\(0,1,2,3,4\)), not the outcome \(HTHH\). The fixed time period or sample size is not the variable either.
Include the boundary. \(X\ge 2\) includes \(X=2\); \(T\lt 15\) for grouped data means the classes below \(15\) only.

Frequently asked questions

What is a random variable?

A random variable is a variable whose value is the numerical outcome of a random experiment, such as \(X=\) the number of heads when four coins are tossed.

What is the difference between discrete and continuous random variables?

A discrete random variable is counted and takes separate values that can be listed, like \(0,1,2,3\). A continuous random variable is measured and can take any value in an interval, like a time or a mass.

Is time a discrete or continuous random variable?

Time is continuous, because it is measured and can take any value in an interval. Recording it to the nearest second does not change that.

Can a discrete random variable have infinitely many values?

Yes. The number of calls a salesperson makes until the first sale can be \(1, 2, 3, \ldots\) with no largest value, but the values are separate, so it is discrete.

How do you estimate P(X = x) from a frequency table?

Divide the frequency of \(x\) by the total number of trials. For \(P(X\ge 2)\), add the frequencies of \(2\) and above first.