S1.5 - Discrete random variables
- Syllabus
- 2019
- Topic
- S1.5
- Level
- AS
A discrete random variable assigns a numerical value to each outcome of a random process and can take only separate, countable values. Write the random variable with a capital letter, such as X, and a possible value with a lower-case letter, such as x.
| Situation | Variable type |
|---|---|
| number of defective items in a sample | discrete: 0,1,2,… |
| score shown by a die | discrete: one value from a fixed list |
| exact waiting time for a bus | continuous: any value in an interval is possible |
If three T-shirts are selected and X is their median selling price, then repeated selections may produce many ordered combinations, but X can still take only the listed price values. Different combinations that give the same median belong to the same event X=x.
Discrete does not mean equally likely, and a numerical label is not automatically a random variable. The value must be determined by the random outcome; its probability distribution is a separate description introduced next.
The probability function gives the probability of each possible value, p(x)=P(X=x). Every probability is between 0 and 1, and the probabilities over the complete support of X add to 1.
F(x0)=P(X≤x0)=x≤x0∑p(x)
| x | 0 | 1 | 2 |
|---|---|---|---|
| p(x) | 0.20 | 0.50 | 0.30 |
| F(x) | 0.20 | 0.70 | 1.00 |
To construct a distribution, list every possible value, combine the probabilities of all disjoint routes that produce that value, and check the final probabilities total 1. To recover a probability from a cumulative distribution, subtract adjacent cumulative totals: here P(X=1)=F(1)−F(0)=0.70−0.20=0.50.
Translate an event before reading the table. For example, P(3X−3<X+2)=P(X<2.5)=P(X≤2)=1 for this integer-valued support. A non-integer cutoff is handled by including precisely the supported values that satisfy the inequality.
Do not confuse P(X=x) with P(X≤x). A discrete CDF is a non-decreasing step function: it stays constant between possible values and eventually reaches 1. When the support has gaps, subtract cumulative probabilities at successive supported values, not blindly at x−1.
The expectation E(X) is the probability-weighted long-run mean of a discrete random variable. Variance measures its expected squared spread about that mean.
E(X)=∑xp(x),E(X2)=∑x2p(x),Var(X)=E(X2)−[E(X)]2
For X=0,1,2 with probabilities 0.20,0.50,0.30,E(X)=0(0.20)+1(0.50)+2(0.30)=1.10,E(X2)=02(0.20)+12(0.50)+22(0.30)=1.70.Therefore Var(X)=1.70−1.102=0.49, and the standard deviation is 0.49=0.70.
E(aX+b)=aE(X)+b,Var(aX+b)=a2Var(X)
If Y=5−3X, then E(Y)=5−3(1.10)=1.70 and Var(Y)=(−3)2(0.49)=4.41. Adding a constant shifts every value without changing spread; multiplying by a multiplies every deviation by a, so variance is multiplied by a2.
Do not calculate variance as E(X2)−E(X) or as E(X2)−E(X2). Expectation may be a value the variable never actually takes, and variance is in squared units; use the standard deviation when a spread in the original units is required.
A discrete uniform distribution has a finite set of possible values that are all equally likely. If there are n values, each has probability 1/n.
E(X)=∑xn1,Var(X)=∑x2n1−[E(X)]2
Suppose B is equally likely to be 1,3,5 or 7. ThenE(B)=41+3+5+7=4,E(B2)=412+32+52+72=21,so Var(B)=21−42=5. Symmetry also shows immediately that the mean is the midpoint, 4.
For equally likely consecutive integers a,a+1,…,b, the number of values is n=b−a+1 and the mean is (a+b)/2. The variance may be found from the same E(X2)−[E(X)]2 method, which remains valid for any explicitly listed uniform support.
Uniform means equal probability for each listed value, not equal spacing alone. A set of equally spaced scores with unequal probabilities is not a discrete uniform distribution.