How do we describe a discrete random variable and summarise its distribution with mean and variance?
Define a discrete random variable by its probability distribution, and calculate the expected value, variance and standard deviation
A focused answer to the HSC Maths Advanced dot point on discrete random variables. Probability distributions, expected value, variance, standard deviation, and linear transformations of a discrete random variable, with worked examples.
Reviewed by: AI editorial process; not yet individually human-reviewed
Have a quick question? Jump to the Q&A page
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.
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.
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 , , .
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 .
Exam-style practice questions
Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.
2022 HSC Q244 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.
2021 HSC Q253 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 .
