5.4 Discrete random variables
- Syllabus
- 9709–2028–2029
- Topic
- 5.4
- Level
- A2
For a discrete random variable X, list each possible value x with P(X=x). Every probability must be between 0 and 1 and the probabilities must sum to 1; use this total first to find any unknown probability.
E(X)=\sum xP(X=x),\qquad E(X^2)=\sum x^2P(X=x),\operatorname{Var}(X)=E(X^2)-[E(X)]^2.
| x | 0 | 1 | 2 |
|---|---|---|---|
| P(X=x) | 0.2 | 0.5 | 0.3 |
| xP(X=x) | 0 | 0.5 | 0.6 |
| x2P(X=x) | 0 | 0.5 | 1.2 |
Thus E(X)=1.1, E(X2)=1.7 and Var(X)=1.7−1.12=0.49. A probability table may come from enumeration or from combining outcomes that give the same value of X.
Do not average the listed x-values unless they are equally likely, and do not confuse [E(X)]2 with E(X2).
| Model | Random variable | Conditions | Support |
|---|---|---|---|
| X∼B(n,p) | number of successes in fixed n trials | independent trials, two outcomes, constant p | 0,1,…,n |
| X∼Geo(p) | trial number of the first success | independent repeated trials, constant p | 1,2,3,… |
P(X=r)=\binom nr p^r(1-p)^{n-r}\quad\text{for }X\sim B(n,p),P(X=r)=p(1-p)^{r-1}\quad\text{for }X\sim Geo(p).
If 8 independent items are defective with probability 0.1, the probability of exactly 2 defective items is (28)(0.1)2(0.9)6. For ranges such as at least 2, sum the relevant values or use a shorter complement.
If each attempt succeeds with probability 0.2, then the first success on attempt 4 has probability (0.8)3(0.2). ‘After attempt 4’ means four failures, so its probability is (0.8)4.
Geometric r includes the successful trial, whereas binomial r counts successes. Reject either model if independence or constant p is not reasonable.
| Distribution | Expectation | Variance |
|---|---|---|
| X∼B(n,p) | E(X)=np | Var(X)=np(1−p) |
| Y∼Geo(p) | E(Y)=1/p | not required in this syllabus objective |
These are long-run summaries, not necessarily possible single outcomes. A binomial expectation can be non-integer; a geometric expectation is the average trial number on which the first success occurs.
For X∼B(20,0.3), E(X)=20(0.3)=6 and Var(X)=20(0.3)(0.7)=4.2. The standard deviation, if requested, is 4.2.
For Y∼Geo(0.2), E(Y)=1/0.2=5: over many repetitions, the first success occurs on trial 5 on average.
Use the parameters of the stated model. Do not use np for a geometric variable or forget the factor 1−p in binomial variance. Proofs of these formulae are not required.