5.4 Discrete random variables

Syllabus
9709–2028–2029
Topic
5.4
Level
AS

Learning objectives

A probability table gives both centre and spread

For a discrete random variable XX, list each possible value xx with P(X=x)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.

xx 0 1 2
P(X=x)P(X=x) 0.2 0.5 0.3
xP(X=x)xP(X=x) 0 0.5 0.6
x2P(X=x)x^2P(X=x) 0 0.5 1.2

Thus E(X)=1.1E(X)=1.1, E(X2)=1.7E(X^2)=1.7 and Var(X)=1.71.12=0.49\operatorname{Var}(X)=1.7-1.1^2=0.49. A probability table may come from enumeration or from combining outcomes that give the same value of XX.

Do not average the listed xx-values unless they are equally likely, and do not confuse [E(X)]2[E(X)]^2 with E(X2)E(X^2).

Choose binomial for a fixed count, geometric for first success

Model Random variable Conditions Support
XB(n,p)X\sim B(n,p) number of successes in fixed nn trials independent trials, two outcomes, constant pp 0,1,,n0,1,\ldots,n
XGeo(p)X\sim Geo(p) trial number of the first success independent repeated trials, constant pp 1,2,3,1,2,3,\ldots

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 (82)(0.1)2(0.9)6\binom82(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)(0.8)^3(0.2). ‘After attempt 4’ means four failures, so its probability is (0.8)4(0.8)^4.

Geometric rr includes the successful trial, whereas binomial rr counts successes. Reject either model if independence or constant pp is not reasonable.

Read model moments directly from their parameters

Distribution Expectation Variance
XB(n,p)X\sim B(n,p) E(X)=npE(X)=np Var(X)=np(1p)\operatorname{Var}(X)=np(1-p)
YGeo(p)Y\sim Geo(p) E(Y)=1/pE(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 XB(20,0.3)X\sim B(20,0.3), E(X)=20(0.3)=6E(X)=20(0.3)=6 and Var(X)=20(0.3)(0.7)=4.2\operatorname{Var}(X)=20(0.3)(0.7)=4.2. The standard deviation, if requested, is 4.2\sqrt{4.2}.

For YGeo(0.2)Y\sim Geo(0.2), E(Y)=1/0.2=5E(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 npnp for a geometric variable or forget the factor 1p1-p in binomial variance. Proofs of these formulae are not required.