# 5.1 Random Variable

SPM Form 5 Additional Mathematics (KSSM) · Chapter 5 Probability Distribution. Interactive version with diagrams: https://spmtuition.com/add-math/form-5/chapter-5-probability-distribution/5-1-random-variable/

## Values of a random variable

![The eight outcomes of three coin tosses group by the number of heads: one outcome for zero, three for one, three for two and one for three.](https://spmtuition.com/diagrams/expand-addmath-random-variable.svg)

*Count H in each outcome. Match it to the value of X.*

A random variable assigns a numerical value to each outcome of a random experiment.

| Type | Example |
| --- | --- |
| Discrete | Number of heads in three tosses: 0, 1, 2, 3 |
| Continuous | A measured waiting time within an interval |

Different outcomes may give the same value. Group their probabilities when constructing the distribution.

### Practice questions: Values of a random variable

1. Which is a discrete random variable?
   A. Number of absent pupils
   B. Height of a pupil
   C. Time to finish a race
   D. Mass of a parcel
   **Answer:** A. Number of absent pupils. A count takes separate integer values.

## Probability tables

![Probability bars for two fair coins have heights one quarter at zero heads, one half at one head and one quarter at two heads.](https://spmtuition.com/diagrams/expand-addmath-probability-bars.svg)

*Match the bar heights to the probabilities.*

Every probability lies between 0 and 1. The probabilities for all possible values sum to 1.

**Worked example:** Two fair coins are tossed. Let X count heads. Find the distribution.

1. Outcomes: TT, TH, HT, HH, each with probability 1/4.
2. X = 0 for TT; X = 1 for TH or HT; X = 2 for HH.
3. Thus P(0) = 1/4, P(1) = 1/2 and P(2) = 1/4.

**Answer:** Probabilities: 1/4, 1/2, 1/4

> **Exam tip:** A random variable is numerical. “Head” alone is an outcome, not a numerical value.

### Practice questions: Probability tables

1. What must probabilities in a complete distribution sum to?
   A. The number of values
   B. 1
   C. 0
   D. 100
   **Answer:** B. 1. The outcomes exhaust all possibilities.

2. Two fair coins are tossed. Find P(exactly one head).
   A. 3/4
   B. 1
   C. 1/2
   D. 1/4
   **Answer:** C. 1/2. HT and TH are two of four equally likely outcomes.

3. Which value cannot be a probability?
   A. 0
   B. 0.6
   C. 1
   D. −0.2
   **Answer:** D. −0.2. Probabilities cannot be negative.

4. X counts heads in three tosses. Which is its set of possible values?
   A. {0, 1, 2, 3}
   B. {1, 2, 3}
   C. {H, T}
   D. {0, 1}
   **Answer:** A. {0, 1, 2, 3}. Include the possibility of no heads.

---

Online SPM tuition for Physics, Chemistry, Biology, Mathematics and Additional Mathematics, Form 4–5, in English or BM. Students who want tuition or extra help can request it at https://spmtuition.com/tuition/.
