Skip to main content

Discrete random variables and the binomial distribution - TCE Mathematics Methods (Tasmania)

Syllabus dot point

“Construct probability distributions for discrete random variables, find their mean and variance, and apply the binomial distribution.”

TCEMath MethodsUnit 38 min read

Quick answer

A discrete random variable takes separate values each with a probability that sums to 1; its expected value E(X)=∑x P(X=x)E(X)=\sum x\,P(X=x) and variance measure centre and spread. The binomial distribution applies when you count successes in nn fixed, independent trials with constant success probability pp.

What this dot point is asking

A random variable assigns a number to each outcome of a random process. A discrete random variable takes countable, separate values (often 0,1,2,…0, 1, 2, \dots). Its probability distribution lists each value with its probability.

Two requirements of a distribution

For any probability distribution: every probability satisfies 0≤P(X=x)≤10 \le P(X=x) \le 1, and all the probabilities sum to exactly 11, that is ∑P(X=x)=1\sum P(X=x) = 1.

Mean and variance

The expected value (mean) is the long-run average:

Expected value and variance

E(X)=μ=∑x P(X=x)E(X) = \mu = \displaystyle\sum x\,P(X=x)

Var⁡(X)=σ2=∑(x−μ)2P(X=x)=E(X2)−μ2\operatorname{Var}(X) = \sigma^2 = \displaystyle\sum (x-\mu)^2 P(X=x) = E(X^2) - \mu^2

Standard deviation: σ=Var⁡(X)\sigma = \sqrt{\operatorname{Var}(X)}

The form E(X2)−μ2E(X^2) - \mu^2 is usually faster to compute, where E(X2)=∑x2P(X=x)E(X^2) = \sum x^2 P(X=x).

Mean and variance from a distribution table

A discrete random variable XX has P(X=x)=0.2,0.5,0.3P(X = x) = 0.2, 0.5, 0.3 for x=1,2,3x = 1, 2, 3 respectively. Find E(X)E(X), Var⁡(X)\operatorname{Var}(X) and the standard deviation.

Step 1: Compute the mean E(X)E(X)

The expected value is the weighted average of the possible values, where each value is weighted by its probability. Multiply each xx by its probability and sum the results:

E(X)=∑x P(X=x)=(1)(0.2)+(2)(0.5)+(3)(0.3)=0.2+1.0+0.9=2.1.E(X) = \sum x\,P(X = x) = (1)(0.2) + (2)(0.5) + (3)(0.3) = 0.2 + 1.0 + 0.9 = 2.1.

Step 2: Compute E(X2)E(X^2)

To use the shortcut formula Var⁡(X)=E(X2)−μ2\operatorname{Var}(X) = E(X^2) - \mu^2, we need the average of the squared values. Replace each xx with x2x^2 and repeat the weighted sum:

E(X2)=(12)(0.2)+(22)(0.5)+(32)(0.3)=0.2+2.0+2.7=4.9.E(X^{2}) = (1^2)(0.2) + (2^2)(0.5) + (3^2)(0.3) = 0.2 + 2.0 + 2.7 = 4.9.

Step 3: Find the variance and standard deviation

Subtract the square of the mean from E(X2)E(X^2). This shortcut avoids computing each (x−μ)2(x - \mu)^2 term separately and is the form examiners expect:

Var⁡(X)=E(X2)−μ2=4.9−2.12=4.9−4.41=0.49.\operatorname{Var}(X) = E(X^{2}) - \mu^{2} = 4.9 - 2.1^{2} = 4.9 - 4.41 = 0.49.

Final answer: E(X)=2.1E(X) = 2.1, Var⁡(X)=0.49\operatorname{Var}(X) = 0.49, and σ=0.49=0.7\sigma = \sqrt{0.49} = 0.7.

The binomial distribution

The binomial distribution counts the number of successes in a fixed number of trials.

Conditions for a binomial distribution

There are a fixed number nn of trials; each trial has only two outcomes (success or failure); the probability of success pp is constant across trials; and the trials are independent.

If XX is binomial with parameters nn and pp, written X∼B(n,p)X \sim B(n,p), then

Binomial probability, mean and variance

P(X=k)=(nk)pk(1−p)n−kP(X = k) = \dbinom{n}{k} p^k (1-p)^{n-k}, for k=0,1,…,nk = 0, 1, \dots, n.

Mean: E(X)=npE(X) = np.

Variance: Var⁡(X)=np(1−p)\operatorname{Var}(X) = np(1-p).

Here (nk)=n!k!(n−k)!\dbinom{n}{k} = \dfrac{n!}{k!(n-k)!} counts the number of ways to choose which trials are the successes.

Worked example: a binomial calculation

A multiple-choice quiz has 1010 questions, each with 44 options. A student guesses every answer. Find the probability of getting exactly 33 correct, and the expected number correct.

Step 1: Identify the distribution

Each guess is an independent trial with only two outcomes (correct or incorrect), and the probability of a correct guess is constant at p=14=0.25p = \tfrac{1}{4} = 0.25. With n=10n = 10 trials, the count of correct answers follows a binomial distribution: X∼B(10,0.25)X \sim B(10, 0.25).

Step 2: Set up the binomial probability for exactly 3 correct

The binomial formula is P(X=k)=(nk)pk(1−p)n−kP(X = k) = \dbinom{n}{k}p^k(1-p)^{n-k}. Here k=3k = 3, p=0.25p = 0.25 and 1−p=0.751 - p = 0.75:

P(X=3)=(103)(0.25)3(0.75)7.P(X = 3) = \binom{10}{3}(0.25)^3 (0.75)^7.

Step 3: Evaluate each factor and multiply

Compute each piece separately to avoid errors. The binomial coefficient counts the number of ways to choose which 3 of the 10 questions are correct:

(103)=10!3! 7!=120,(0.25)3=0.015625,(0.75)7≈0.133484.\dbinom{10}{3} = \frac{10!}{3!\,7!} = 120, \quad (0.25)^3 = 0.015625, \quad (0.75)^7 \approx 0.133484.

P(X=3)=120×0.015625×0.133484≈0.2503.P(X=3) = 120 \times 0.015625 \times 0.133484 \approx 0.2503.

Step 4: Find the expected number correct

The mean of a binomial distribution is E(X)=npE(X) = np, which gives the long-run average number of successes without any lengthy calculation:

E(X)=np=10×0.25=2.5 questions.E(X) = np = 10 \times 0.25 = 2.5 \text{ questions}.

Final answer: P(X=3)≈0.2503P(X = 3) \approx 0.2503 and the expected number correct is 2.52.5 questions.

Confusing "exactly", "at least" and "at most"

"Exactly 3" is a single term P(X=3)P(X=3). "At least 3" means P(X≥3)=1−P(X≤2)P(X \ge 3) = 1 - P(X \le 2), and "at most 3" means P(X≤3)=P(0)+P(1)+P(2)+P(3)P(X \le 3) = P(0)+P(1)+P(2)+P(3). Read the wording carefully and use the complement 1−P(other side)1 - P(\text{other side}) when it saves adding many terms.

Cumulative probabilities and technology

In the calculator-assumed section you will use the cumulative binomial function to evaluate ranges quickly. The cumulative probability P(X≤k)P(X \le k) adds up all terms from 00 to kk, and most graphics or CAS calculators provide it directly as a "binomial CDF". Then P(X≥k)=1−P(X≤k−1)P(X \ge k) = 1 - P(X \le k - 1) and P(a≤X≤b)=P(X≤b)−P(X≤a−1)P(a \le X \le b) = P(X \le b) - P(X \le a - 1). Translating the English wording into these cumulative expressions is half the skill: write the inequality first, then read off which cumulative values you need.

Where the binomial is used

The binomial underpins quality-control sampling (the number of defective items in a batch), opinion polling at small scale (the number of supporters in a fixed sample), and any "nn independent yes/no trials" scenario. In Unit 4 it returns as the foundation for the sampling distribution of a proportion: dividing a binomial count by nn gives p^\hat{p}, whose mean pp and standard deviation p(1−p)/n\sqrt{p(1-p)/n} come straight from E(X)=npE(X) = np and Var⁡(X)=np(1−p)\operatorname{Var}(X) = np(1-p).

Summary

For any discrete random variable, build the distribution table, confirm the probabilities sum to 11, then compute E(X)E(X) and Var⁡(X)\operatorname{Var}(X). Before using the binomial formula, check all four conditions hold. Decide whether the question wants an exact value, a cumulative range, or a complement, and use E(X)=npE(X)=np and Var⁡(X)=np(1−p)\operatorname{Var}(X)=np(1-p) as quick shortcuts for binomial summaries.

Exam-style questions

Questions in the style of TASC exam questions on this dot point, each with a worked answer. They are written by ExamExplained unless tagged "Past paper"; the year shows the paper a question is modelled on.

Practice5 marks
Calculator-free. The probability of a machine producing a defective item is 110\dfrac{1}{10}. XX is the number of defective items produced when 44 items are made. Calculate exact values for: (a) P(X=3)P(X = 3); (b) P(X<3)P(X < 3).
Show worked answer →

XX is binomial with n=4n = 4 trials and success probability p=110p = \dfrac{1}{10}, so q=910q = \dfrac{9}{10}. Use P(X=r)=(nr)prqn−rP(X = r) = \binom{n}{r}p^{r}q^{n-r}.

(a) P(X=3)=(43)(110)3(910)1=4×11000×910=3610000=92500P(X = 3) = \binom{4}{3}\left(\dfrac{1}{10}\right)^{3}\left(\dfrac{9}{10}\right)^{1} = 4\times\dfrac{1}{1000}\times\dfrac{9}{10} = \dfrac{36}{10000} = \dfrac{9}{2500}. One mark for the correct binomial coefficient and powers, one for the exact value.

(b) P(X<3)=P(X=0)+P(X=1)+P(X=2)P(X < 3) = P(X = 0) + P(X = 1) + P(X = 2). It is fastest to use P(X<3)=1−P(X=3)−P(X=4)P(X < 3) = 1 - P(X = 3) - P(X = 4).
P(X=4)=(110)4=110000P(X = 4) = \left(\dfrac{1}{10}\right)^{4} = \dfrac{1}{10000}.
So P(X<3)=1−3610000−110000=1−3710000=996310000P(X < 3) = 1 - \dfrac{36}{10000} - \dfrac{1}{10000} = 1 - \dfrac{37}{10000} = \dfrac{9963}{10000}.
Markers want exact fractions, not decimals, since the question asks for exact values.

Practice5 marks
Calculator-free. A discrete random variable XX has P(X=x)=0.1,0.2,0.4,0.2,0.1P(X = x) = 0.1, 0.2, 0.4, 0.2, 0.1 for x=−2,−1,0,1,2x = -2, -1, 0, 1, 2 respectively. (a) Find E(X)E(X). (b) Show that Var⁡(X)=1.2\operatorname{Var}(X) = 1.2.
Show worked answer →

(a) E(X)=∑x P(X=x)E(X) = \sum x\,P(X = x)

=(−2)(0.1)+(−1)(0.2)+(0)(0.4)+(1)(0.2)+(2)(0.1)=0.= (-2)(0.1) + (-1)(0.2) + (0)(0.4) + (1)(0.2) + (2)(0.1) = 0.

The distribution is symmetric about 00, so E(X)=0E(X) = 0.

(b) Var⁡(X)=E(X2)−[E(X)]2\operatorname{Var}(X) = E(X^{2}) - [E(X)]^{2}.

E(X2)=(4)(0.1)+(1)(0.2)+(0)(0.4)+(1)(0.2)+(4)(0.1)=1.2.E(X^{2}) = (4)(0.1) + (1)(0.2) + (0)(0.4) + (1)(0.2) + (4)(0.1) = 1.2.

Since E(X)=0E(X) = 0, Var⁡(X)=1.2−02=1.2\operatorname{Var}(X) = 1.2 - 0^{2} = 1.2 as required. Show the E(X2)E(X^{2}) sum explicitly to earn the working marks.

Practice2 marks
Calculator-assumed. A casino game has net earnings XX dollars with P(X=−1)=1424P(X = -1) = \dfrac{14}{24}, P(X=0)=424P(X = 0) = \dfrac{4}{24} and P(X=2)=624P(X = 2) = \dfrac{6}{24}. Calculate E(X)E(X) and state whether this is a fair game.
Show worked answer →

E(X)=(−1)1424+(0)424+(2)624=−14+0+1224=−224=−112≈−0.083.E(X) = (-1)\frac{14}{24} + (0)\frac{4}{24} + (2)\frac{6}{24} = \frac{-14 + 0 + 12}{24} = \frac{-2}{24} = -\frac{1}{12} \approx -0.083.

A game is fair only when the expected earnings are 00. Here E(X)=−112E(X) = -\dfrac{1}{12} dollars is negative, so on average the player loses about 8.38.3 cents per play. It is not a fair game; it favours the casino. One mark for the correct E(X)E(X), one for the justified conclusion.

Practise this

Sources & how we know this

ExamExplained