Discrete Random Variables

Probability & Statistics

A discrete random variable (DRV) XX takes a countable set of values, each with an assigned probability. The collection of these probabilities is the probability distribution of XX, and it must satisfy P(X=x)=1\sum \text{P}(X = x) = 1.

What you need to know

Worked example 1 — expectation and variance from a distribution table

A discrete random variable XX has the following probability distribution.

xx0123
P(X=x)\text{P}(X = x)16\dfrac{1}{6}13\dfrac{1}{3}13\dfrac{1}{3}16\dfrac{1}{6}

Verify the distribution sums to 1.

16+13+13+16=16+26+26+16=66=1.\frac{1}{6} + \frac{1}{3} + \frac{1}{3} + \frac{1}{6} = \frac{1}{6} + \frac{2}{6} + \frac{2}{6} + \frac{1}{6} = \frac{6}{6} = 1. \checkmark

Find E(X)\text{E}(X).

E(X)=016+113+213+316=26+46+36=96=32.\text{E}(X) = 0 \cdot \frac{1}{6} + 1 \cdot \frac{1}{3} + 2 \cdot \frac{1}{3} + 3 \cdot \frac{1}{6} = \frac{2}{6} + \frac{4}{6} + \frac{3}{6} = \frac{9}{6} = \frac{3}{2}.

Find Var(X)\text{Var}(X).

E(X2)=0216+1213+2213+3216=26+86+96=196.\text{E}(X^2) = 0^2 \cdot \frac{1}{6} + 1^2 \cdot \frac{1}{3} + 2^2 \cdot \frac{1}{3} + 3^2 \cdot \frac{1}{6} = \frac{2}{6} + \frac{8}{6} + \frac{9}{6} = \frac{19}{6}. Var(X)=196(32)2=19694=38122712=1112.\text{Var}(X) = \frac{19}{6} - \left(\frac{3}{2}\right)^2 = \frac{19}{6} - \frac{9}{4} = \frac{38}{12} - \frac{27}{12} = \frac{11}{12}.

So E(X)=32\text{E}(X) = \dfrac{3}{2} and Var(X)=1112\text{Var}(X) = \dfrac{11}{12}.

Worked example 2 — binomial probability for an extreme tail

The probability that a particular biased coin lands on heads on any toss is 0.3. The coin is tossed 10 times. Let XX be the number of heads, so XB(10,0.3)X \sim \text{B}(10,\, 0.3).

Find P(X9)\text{P}(X \geq 9).

P(X9)=P(X=9)+P(X=10).\text{P}(X \geq 9) = \text{P}(X = 9) + \text{P}(X = 10). P(X=9)=(109)(0.3)9(0.7)1=10×(0.3)9×0.71.378×104.\text{P}(X = 9) = \binom{10}{9}(0.3)^9(0.7)^1 = 10 \times (0.3)^9 \times 0.7 \approx 1.378 \times 10^{-4}. P(X=10)=(0.3)105.905×106.\text{P}(X = 10) = (0.3)^{10} \approx 5.905 \times 10^{-6}. P(X9)1.378×104+5.905×1061.44×104.\text{P}(X \geq 9) \approx 1.378 \times 10^{-4} + 5.905 \times 10^{-6} \approx 1.44 \times 10^{-4}.

Worked example 3 — binomial mean and variance

A multiple-choice quiz has 20 questions, each with 4 options. A student guesses every answer at random. Let XX be the number of correct answers.

State the distribution of XX and find its mean and standard deviation.

The conditions for a binomial model are satisfied: 20 independent questions (n=20n = 20), constant probability of success p=14p = \dfrac{1}{4} per question, and exactly two outcomes (correct / incorrect). Hence XB ⁣(20,14)X \sim \text{B}\!\left(20,\, \dfrac{1}{4}\right).

E(X)=np=20×14=5.\text{E}(X) = np = 20 \times \frac{1}{4} = 5. Var(X)=np(1p)=20×14×34=154=3.75.\text{Var}(X) = np(1-p) = 20 \times \frac{1}{4} \times \frac{3}{4} = \frac{15}{4} = 3.75. SD(X)=3.751.94 (3 s.f.).\text{SD}(X) = \sqrt{3.75} \approx 1.94 \text{ (3 s.f.)}.

Common mistakes

Ask MathChat about Discrete Random Variables →