Discrete random variables: probability distribution, expected value, variance and standard deviation
“Define a discrete random variable by its probability distribution, and calculate the expected value, variance and standard deviation”
A discrete random variable is summarised by its probability distribution; its mean is , its variance is , and linear transformations scale the mean by , shift it by , and scale the variance by .
What this dot point is asking
NESA wants you to recognise a discrete random variable, check that its probability distribution is valid, compute the expected value and variance from the distribution, and apply the linear-transformation rules to . Everything starts from the probability distribution, the list of values with their probabilities, so reading and validating that table is the first marked move in almost every question.
Imagine a claw machine at an arcade where every play costs the same but the prize you grab has a set chance of being worth 1, 2 or 3 tickets. A discrete random variable is just a tidy list of those possible payouts next to how likely each one is, and because something always comes out, those chances have to add up to a whole 1 (or 100 percent). The expected value is the average number of tickets you would win per play if you kept playing all afternoon, even though a single play never hands you that exact "average" amount. The variance and its square root, the standard deviation, measure how wildly the payouts swing around that average: a machine that almost always gives the same prize has a small spread, while one that mixes tiny and big prizes has a large one. If the arcade doubled every prize and threw in a bonus ticket, you could work out the new average and spread instantly without replaying a single game.
The answer
Discrete random variables and their distributions
A discrete random variable takes a countable list of values with probabilities . The list of values with their probabilities is the probability distribution of . For it to be valid, two conditions must hold:
- for every (each is a genuine probability),
- (something must happen).
The spike graph above is the natural picture: each value sits on the horizontal axis and the height of its spike is its probability, so the heights are the and they must add to . The probability that falls in some set is the sum of for the values in that set. For example, if takes integer values from .
Expected value
The expected value (or mean) of is the long-run average value if we repeated the experiment many times. It is the weighted sum
The expected value need not be one of the values can actually take; it is a balance point, not an outcome.
Expected value of a function of
For any function ,
The most common case is , which gives
This is the quantity you build to find the variance, so it is worth setting up as its own column of working.
Variance and standard deviation
The variance of measures spread around the mean. By definition it is the expected squared deviation,
which is algebraically equivalent (and almost always easier to compute) to
The standard deviation is , in the same units as , which is why it is the spread measure you can compare directly against the mean.
Linear transformations
If for constants and ,
Shifting by slides the mean but leaves the spread untouched; scaling by multiplies the mean by and the standard deviation by (and the variance by ). These rules let you find the mean and variance of without rebuilding any sums.
A discrete random variable is summarised by its probability distribution, with and . The mean is the weighted sum ; the variance is best computed as ; and a linear transformation gives and (the never affects the variance).
Reading a distribution and finding its mean, stage by stage
The two diagrams here use the distribution , , , .
Stage 1, read the distribution and check it is valid. Whether it arrives as a two-row table or as the spike graph above, the first move is the same: confirm the probabilities are between and and sum to . Here , so the distribution is valid and you can build calculation columns from it. (If a constant were involved, you would solve for it first.)
Stage 2, find the expected value as the balance point. The mean is the weighted sum . Picture the probabilities as weights placed along the axis: is the point where the bar would balance, marked by the fulcrum below. Note that is not one of the values can take, which is exactly what "balance point, not an outcome" means.
Presenting a distribution as a table
In the exam a discrete distribution is usually laid out as a two-row table: the values on top and the probabilities underneath. Reading it correctly is the first marked step. Check the probabilities sum to (solve for any unknown if a constant is involved), then build the calculation columns you need: for the mean and for . Laying the work out in columns keeps the arithmetic tidy and is exactly what markers look for.
Interpreting expected value and variance
The expected value is the balance point of the distribution: if you placed the probabilities as weights along a number line, is where it would balance, as the fulcrum in the diagram shows. The variance measures how widely the values spread around that balance point, in squared units, and the standard deviation brings it back to the original units so it can be compared with the mean. A small standard deviation means the outcomes cluster tightly around the mean; a large one means they are spread out. This interpretation is what justifies the linear-transformation rules: shifting every value left or right slides the balance point but leaves the spread untouched, while stretching the scale stretches both.
Why is the practical formula
The definition is conceptually clear but arithmetically painful because it subtracts inside every term. The equivalent is almost always faster: build one extra column of , sum it, and subtract the square of the mean. The two formulas are algebraically identical, so use the second to compute and quote the first to explain.
How exam questions ask about discrete random variables
- "Show that the table is a valid probability distribution" or "find the value of ." Check and solve for any unknown.
- "Find " or "." Add the relevant ; for "at least" it is often quicker to use .
- "Find the expected value / mean." Compute the weighted sum , showing the products.
- "Find the variance / standard deviation." Build , then , then square-root for .
- "Let . Find and / ." Apply , , .
This example applies the discrete-variable toolkit end to end: validating a distribution, finding the mean, then the variance via , and finally the effect of a linear transformation.
Checking a distribution and computing the mean
takes values with for some constant . Find , then .
A probability distribution must have its probabilities sum to , so we add them and solve for before doing anything else:
The mean is the weighted sum of the values, each multiplied by its now-known probability:
Variance via
For the variance we use because it avoids subtracting the mean inside every term. First we build as the weighted sum of squared values:
Subtracting the square of the mean gives the variance, and its square root the standard deviation:
A fair die
is the number rolled on a fair six-sided die. Every face is equally likely, so each probability is and the mean is the plain average of the six faces:
Averaging the squares of the faces gives , which we then combine with the mean to get the variance:
Linear transformation
Suppose has and and we form . The transformation rules let us read off the new mean and variance without recomputing any sums: the mean scales by and shifts by , while the variance scales by and ignores the shift:
Edge cases worth knowing
- An unknown probability via the sum. If one entry is missing or given as , find it from before any mean or variance work.
- The mean is not an attainable value. is a balance point, so a fair die has mean even though you can never roll . Do not "round it to a face".
- A symmetric distribution. If the probabilities are symmetric about a central value, that value is the mean immediately, with no weighted sum required.
- Negative-looking variance. Variance is a sum of squared terms times probabilities, so it can never be negative; a negative result signals an arithmetic slip, usually confused with .
Always check first and solve for any constant before computing anything else. Lay the work in columns: for the mean, for . Compute the variance with , then take the positive square root for the standard deviation, quoting units. For a transformation , apply the rules directly rather than rebuilding the distribution, and remember the never changes the variance or standard deviation. Show the weighted sums explicitly: markers award method marks for them even if the final arithmetic slips.
- Forgetting to check that probabilities sum to
- If a question gives a distribution in terms of a constant, solve first.
- Using instead of
- The formula is , not .
- Squaring inside but not outside
- is the square of a single number. is the weighted sum of squares. They are different.
- Linear transformation on variance
- , not , and the has no effect on variance.
- Negative variance
- If you get a negative variance, you have a calculation error. Variance is always non-negative.
Exam-style questions
Questions in the style of NESA 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.
HSC-style4 marksThe discrete random variable has probability distribution , , , . Find and .Show worked answer →
.
For the variance, first compute .
.
Markers reward the explicit weighted sum for , the use of for the variance, and clean arithmetic.
HSC-style3 marksA discrete random variable has and . Let . Find and the standard deviation of .Show worked answer →
Linearity of expectation: .
Variance scales by the square of the coefficient and is unchanged by adding a constant: .
Standard deviation: .
Markers expect explicit use of and , with the standard deviation as the positive square root.
Practice questions
Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.
foundation2 marksA discrete random variable has , and . Find , then find .Show worked solution →
Use the fact that the probabilities must sum to .
Compute the mean as the weighted sum.
Marker's note: one mark for from , one for from the explicit weighted sum. Forgetting to solve for first, or reading the missing value straight off as a probability, loses the first mark.
foundation3 marksThe discrete random variable has , and . Find and .Show worked solution →
Find the mean first.
Build as the weighted sum of squared values.
Apply .
Marker's note: one mark for , one for , one for . Using instead of is the trap that loses the final mark.
core3 marksA discrete random variable has and . Let . Find , and the standard deviation of .Show worked solution →
Apply linearity of expectation. Writing ,
Scale the variance by the square of the coefficient. The added constant has no effect:
Take the positive square root for the standard deviation.
Marker's note: one mark for , one for (squaring the , ignoring the ), one for . Using rather than on the variance, or letting the change the variance, is the standard error.
core4 marksA spike graph shows the probability distribution of a discrete random variable . There are four spikes: at the height is , at the height is , at the height is , and at the height is . (a) Confirm the distribution is valid. (b) Find . (c) Find and the standard deviation of , giving the standard deviation to two decimal places.Show worked solution →
Part (a): read the spike heights as probabilities and check they sum to .
and each height lies between and , so the distribution is valid.
Part (b): add the probabilities of the values and .
Part (c): mean, then variance via .
Marker's note: one mark for confirming validity in (a), one for in (b), one for and one for in (c). Reading the spike heights off the graph correctly is the marked first move; misreading a height sinks every later part.
core3 marksA game costs $5 to play. A discrete random variable gives the dollar prize won, with , and . Find the expected prize , and hence state whether a player expects to make a profit or a loss per game.Show worked solution →
Compute the expected prize as the weighted sum.
Compare with the $5 cost. The expected prize is $5.20, which exceeds the $5 cost, so the expected profit per game is
a profit of $0.20 per game for the player.
Marker's note: one mark for from the weighted sum, one for subtracting the $5 cost, one for stating the $0.20 expected profit with the correct direction. Comparing the largest prize against the cost, rather than the expected value, is the conceptual trap.
exam5 marksA discrete random variable takes the values with for some constant . (a) Show that . (b) Find and . (c) A prize is defined by dollars. Find the mean prize and the standard deviation of the prize, giving the standard deviation to the nearest cent.Show worked solution →
Part (a): the probabilities must sum to . The four probabilities are , that is :
as required. The distribution is , , , .
Part (b): mean, then variance via .
Part (c): apply the linear-transformation rules to .
so the mean prize is $120. For the standard deviation,
so the standard deviation of the prize is $50.00.
Marker's note: one mark for showing via in (a); one for and one for in (b); one for and one for (scaling by , not ) in (c). Multiplying the standard deviation by instead of , or letting the change the spread, is the classic slip.
exam5 marksTwo fair four-sided dice, each with faces numbered , are rolled and is the larger of the two numbers showing (if both show the same number, is that number). (a) Show that . (b) Complete the probability distribution of and find . (c) Find , leaving your answer as an exact fraction.Show worked solution →
Part (a): count outcomes where the larger value is . There are equally likely ordered outcomes. The larger equals when both dice are at most but not both at most . The number of outcomes with both at most is ; with both at most is . Hence
as required.
Part (b): build the whole distribution the same way. With ,
and these sum to . The mean is
Part (c): variance via in exact fractions.
Marker's note: one mark for the counting argument giving in (a); one for the full distribution and one for in (b); one for and one for in (c). Working in exact fractions throughout avoids rounding error; the common trap is mis-squared as .