5.4 - Discrete random variables

5.4 - Discrete random variables

A random experiment can have many outcomes but only a few possible numerical scores. In this first part of 5.4, you will collect those scores into a probability distribution, calculate their long-run mean and variance, and recover unknown probabilities from the distribution's summaries.

A probability distribution

If two balls are drawn from a bag, the number of red balls can be 00, 11 or 22. Are these three scores equally likely? The answer depends on how many physical selections produce each score, rather than just how many scores are possible.

Discrete random variable

A random variable assigns a numerical value to each outcome of a random experiment. It is discrete when its possible values form a finite or countable list. Use a capital letter such as X for the variable and a lower-case letter such as xx for one possible value. Thus P(X=x)\mathrm{P}(X=x) is the probability of that value.

A discrete variable need not take only non-negative integers: a game's net gain might be −2,1,5-2,1,5 pounds. A measurement allowed to take any real value in an interval is not discrete; it will need a different kind of probability model later.

A probability distribution table lists each possible value once, together with its probability. Several elementary outcomes may contribute to the same value. Add those disjoint outcome probabilities before writing the table entry.

Valid discrete probabilities

For all possible values xx, put px=P(X=x)p_x=\mathrm{P}(X=x). A valid distribution has

0≤px≤1,∑xpx=1.0\le p_x\le1,\qquad \sum_x p_x=1.

Values outside the listed possible values have probability zero. The sum includes all possible values.
Not in the formula booklet: learn these probability conditions.

For example, entries 0.2,0.3,0.40.2,0.3,0.4 do not form a complete distribution because their sum is only 0.90.9. A missing probability can be found by subtracting the others from 11, but every resulting probability must also be non-negative.

Worked example 1: counting the values of X

Question. A bag contains three red and two blue balls. Two are selected at random without replacement. X is the number of red balls selected. Draw up the probability distribution table for X.

Plan. Count equally likely pairs and group them by how many red balls they contain.

There are (52)=10\binom52=10 pairs. For X=0X=0, both balls must be blue; for X=1X=1, choose one of each colour; for X=2X=2, both must be red.

xx001122
Favourable pairs(22)=1\binom22=1(31)(21)=6\binom31\binom21=6(32)=3\binom32=3
P(X=x)\mathrm{P}(X=x)1/101/106/106/103/103/10

Answer. The distribution is P(X=0)=1/10\mathrm{P}(X=0)=1/10, P(X=1)=3/5\mathrm{P}(X=1)=3/5, P(X=2)=3/10\mathrm{P}(X=2)=3/10.

Check. The probabilities are non-negative and sum to (1+6+3)/10=1(1+6+3)/10=1. Counting ordered red-red pairs instead gives 3×2=63\times2=6 out of 5×4=205\times4=20, again 3/103/10.

Add one red ball while keeping two blue balls and the same two-ball selection rule. The possible scores stay the same, but their probabilities change.

Worked example 2: the same values with different probabilities

Question. A bag now contains four red and two blue balls. Two are selected at random without replacement, and X is the number of red balls selected. Draw up its probability distribution table.

Plan. Repeat the grouping with (62)=15\binom62=15 equally likely pairs.

xx001122
P(X=x)\mathrm{P}(X=x)(22)/15=1/15\binom22/15=1/15(41)(21)/15=8/15\binom41\binom21/15=8/15(42)/15=6/15\binom42/15=6/15

Answer. The probabilities for 0,1,20,1,2 are 1/15,8/15,2/51/15,8/15,2/5, respectively.

Check. They sum to 11. Counting ordered red-red pairs instead gives (4×3)/(6×5)=2/5(4\times3)/(6\times5)=2/5, higher than the previous 3/103/10, as expected after adding a red ball.

The opening question is answered: the three possible scores need not be equally likely. A distribution describes how the probability is shared among them.

Watch out

The values 0,1,20,1,2 are values of X, not three equally likely elementary outcomes. Do not assign 1/31/3 to each without checking the experiment. A table must also include possible endpoint values, even if one is unlikely.

Construct a fresh distribution from a new bag.

Expectation

Imagine a game paying a prize of 00, 22 or 55 pounds with probabilities 0.5,0.3,0.20.5,0.3,0.2. Over many plays, about half the prizes are zero, three tenths are 22 pounds, and one fifth are 55 pounds. The average prize tends towards 0(0.5)+2(0.3)+5(0.2)=1.60(0.5)+2(0.3)+5(0.2)=1.6 pounds.

This is a probability-weighted mean, just as a frequency-table mean weights values by their frequencies. The difference is that a distribution describes the model before observing the outcomes, rather than summarising a particular dataset.

Expectation

The expectation or expected value E(X)\mathrm{E}(X) is the probability-weighted mean of a random variable. It describes the long-run average under repeated independent repetitions of the same experiment, not a guaranteed result on one occasion. It need not be a possible value of X or its most likely value.

For the game, 1.61.6 pounds is not even an available prize, and the most likely prize is zero. Neither fact contradicts the expected value.

Expectation of a discrete random variable

If X takes values xx with probabilities pxp_x,

E(X)=∑xxpx.\mathrm{E}(X)=\sum_x xp_x.

Multiply each value by its own probability, then add. For the finite distributions here, all terms are listed in the table.
In the formula booklet.

An expected net gain must include any fixed cost. Subtracting a cost cc from every prize changes the mean by cc, because ∑(x−c)px=∑xpx−c∑px=E(X)−c\sum(x-c)p_x=\sum xp_x-c\sum p_x=\mathrm{E}(X)-c.

Worked example 3: expected prize and net gain

Question. A game pays a prize Y of 00, 22 or 55 pounds with probabilities 0.5,0.3,0.20.5,0.3,0.2, respectively. It costs 22 pounds to play. Find the expected prize and expected net gain per play.

Plan. Calculate the weighted mean prize, then subtract the fixed playing cost.

E(Y)=0(0.5)+2(0.3)+5(0.2)=1.6expected net gain=1.6−2=−0.4\begin{aligned} \mathrm{E}(Y)&=0(0.5)+2(0.3)+5(0.2)=1.6\\ \text{expected net gain}&=1.6-2=-0.4 \end{aligned}

Answer. Expected prize 1.601.60 pounds; expected net gain −0.40-0.40 pounds, meaning a long-run average loss of 4040 pence per play.

Check. The actual net gains are −2,0,3-2,0,3. Their weighted mean is (−2)(0.5)+0(0.3)+3(0.2)=−0.4(-2)(0.5)+0(0.3)+3(0.2)=-0.4, confirming the cost adjustment.

Change only the largest prize from 55 to 88 pounds. Its probability remains 0.20.2, so the expected prize should increase by 3(0.2)=0.63(0.2)=0.6 pounds.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account