All subjects · Mathematics · WST01 (S1)

Discrete random variables and probability functions

A discrete random variable takes separate values, each with a probability. Its probability function lists or gives a formula for those probabilities.

Random variables

A random variable X is a quantity whose value depends on chance; capital X is the variable and small x a particular value. It is discrete if it takes only separate values (such as 0, 1, 2, ...).

The probability function is p(x) = P(X = x). It can be a table or a formula.

The key rule

Σ P(X = x) = 1 over all possible x. Use it to find an unknown constant.

Example: P(X = x) = kx for x = 1, 2, 3, 4. Then k(1 + 2 + 3 + 4) = 1, so k = 1/10.

x1234
P(X = x)1/102/103/104/10

Finding probabilities

Add the relevant probabilities. Read inequalities carefully: P(X > 2) = P(X = 3) + P(X = 4), but P(X ≥ 2) also includes X = 2. A random variable can also come from a context, such as the number of heads when three coins are thrown; list the outcomes to build the distribution.

Worked example

P(X = x) = kx2 for x = 1, 2, 3. Find k and P(X ≥ 2).

  1. k(1 + 4 + 9) = 1, so k = 1/14.
  2. P(X ≥ 2) = 4/14 + 9/14

Answer: k = 1/14; P(X ≥ 2) = 13/14

Key idea: p(x) = P(X = x); the probabilities sum to 1; read < and ≤ carefully.

Check yourself

  1. P(X = x) = kx for x = 1, 2, 3, 4. Find k. Give your answer as a fraction in its simplest form.
    Show answer

    1/10. k(1 + 2 + 3 + 4) = 10k = 1, so k = 1/10.

  2. P(X = x) = kx2 for x = 1, 2, 3. Find k. Give your answer as a fraction in its simplest form.
    Show answer

    1/14. k(1 + 4 + 9) = 14k = 1, so k = 1/14.

  3. P(X = x) = x/10 for x = 1, 2, 3, 4. Find P(X > 2). Give your answer as a fraction in its simplest form.
    Show answer

    7/10. P(3) + P(4) = 7/10.

  4. X takes the values 0, 1, 2, 3 with probabilities 0.1, 0.3, p, 0.25. Find p.
    Show answer

    0.35. p = 1 - 0.65 = 0.35.

  5. X takes the values 0, 1, 2, 3 with probabilities 0.1, 0.3, 0.35, 0.25. Find P(X < 2).
    Show answer

    0.4. P(0) + P(1) = 0.4.

  6. Three fair coins are thrown and X is the number of heads. Find P(X = 2). Give your answer as a fraction in its simplest form.
    Show answer

    3/8. HHT, HTH, THH: 3 of the 8 outcomes, so 3/8.

  7. Which of these is a discrete random variable?
    • The number of emails received in an hour
    • The time taken to run 100 m
    • The mass of a randomly chosen apple
    • The height of a randomly chosen student
    Show answer

    The number of emails received in an hour. Counts take separate whole-number values.

Practise with instant feedback

Sources

Last updated 7 November 2026. Spotted a mistake? Tell us.