The University of Hong Kong · FACULTY OF MATHEMATICS

MATH1853 Chap.11 Random Variables, Expectation and Variance

- one subject, every graph, every model, every mark
6 Chapters4-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 11 of 11 · MATH1853

Random Variables, Expectation and Variance

Move from outcomes to moments

A random variable maps outcomes to numbers, and its distribution assigns mass or density to those values. Marginal distributions come from summing or integrating a joint distribution. Expectation is linear without independence.

Variance measures squared spread and includes covariance for sums, so independence matters when dropping interaction terms.

Validate a distribution before using it

A discrete probability mass function must be nonnegative and sum to one over its support. A continuous density must be nonnegative and integrate to one, while probability over an interval is area rather than the density value at one point.

The support is part of the definition, especially for piecewise formulas. Mark endpoints and exclusions before normalising, finding event probabilities or calculating moments, because an otherwise correct formula over the wrong support describes a different random variable.

Use the cumulative distribution consistently

The cumulative distribution function gives the probability that X is at most x.

It is nondecreasing, right-continuous and approaches zero and one at the extremes. For a discrete variable, each jump equals the mass at that value. For an absolutely continuous variable, differentiating the cumulative function recovers the density where the derivative exists.

Interval probabilities are obtained by differences of cumulative values, with endpoint handling determined by any discrete masses.

Marginalise a joint distribution

A joint table or density assigns probability to pairs of values. Summing across one coordinate in the discrete case, or integrating it out in the continuous case, gives the marginal distribution of the other variable.

Marginals must themselves be valid distributions and return a grand total of one. Independence requires the joint distribution to equal the product of marginals throughout the support.

One mismatched cell disproves independence, while one matching cell is insufficient to prove it.

Compute expectation as a weighted centre

Multiply each discrete value by its probability and sum, or integrate the value times the density. The expected value can lie between possible outcomes without itself being attainable in one trial.

Linearity permits sums and affine transformations to be handled without independence. For a function of X, average the transformed values directly against the original distribution.

Keeping a ledger of values, masses and contributions makes missing support points visible even when a value contributes zero to the mean.

Separate second moment from variance

The second moment averages squared outcomes, while the square of the mean squares one average. Their difference is the variance.

The defining expression as expected squared distance from the mean explains why variance is nonnegative and why it has squared units. Standard deviation is the nonnegative square root and returns to the original units.

Exact fractions should be kept until the final subtraction, since rounding two nearby moments can create a small impossible negative result.

Handle sums and transformations correctly

Adding a constant shifts expectation but leaves variance unchanged. Multiplying by a scalar multiplies expectation by that scalar and variance by its square.

For a sum, variances include twice the covariance; independence permits that covariance term to be dropped when the required moments exist. Standard deviations do not generally add. Nonlinear transformations such as squaring, reciprocals or absolute values usually require the transformed distribution or a direct expectation calculation because the original mean and variance alone are not enough.

In this chapter

What this chapter covers

  • 01

    Discrete and continuous variables

  • 02

    Mass and density functions

  • 03

    Joint distributions

  • 04

    Marginals and independence

  • 05

    Expectation and LOTUS

  • 06

    Variance and covariance

Worked example · free

Compute a mean and variance from a PMF

Q [8 marks]. This mark allocation supports AskSia revision and is not an official University marking scheme. Use an original three-value distribution to calculate moments.
A probability mass function assigns mass to separate values.A probability mass function assigns mass to separate values. Bar heights are probabilities, their total is one, and expectation balances the values using those masses as weights.possible values of Xp(x)
A probability mass function assigns mass to separate values. Bar heights are probabilities, their total is one, and expectation balances the values using those masses as weights.
  • 2Check total mass.
  • 3Compute first and second moments.
  • 3Apply the variance identity and check sign.
The second-moment identity gives variance as E of X squared minus the square of E of X, which must be nonnegative.
Sia tip — Keep columns for x, probability, x times probability and x squared times probability.
Glossary

Key terms

Probability Mass Function
A function assigning probability to each discrete value.
Probability Density Function
A nonnegative function whose interval areas give continuous probabilities.
FAQ

Random Variables, Expectation and Variance FAQ

Can an expected value be impossible as one outcome?

Yes. Expectation is a weighted centre and need not belong to the support. It describes long-run balance rather than the result required from one trial.

When do variances add?

They add when covariance is zero, including for independent variables with finite moments. Without that condition, the variance of a sum includes twice the covariance.

Can a density exceed one?

Yes. Density is not point probability; only total area must equal one. A continuous probability comes from area over an interval, while any single point has probability zero.

Study strategy

Exam move

Use a probability ledger with columns for support values, masses, first-moment contributions and second-moment contributions. Check total mass before calculating any summary. Derive marginals from joint tables and test independence across the full support rather than from one matching cell. Compute variance by both the centred definition and the second-moment identity on a small distribution.

For affine transformations, place mean and variance rules on separate lines and square the scale only for variance. When combining variables, write the covariance term before deciding whether independence permits its removal. Finish with nonnegative variance and unit checks.

Working through Random Variables, Expectation and Variance in MATH1853? Sia is AskSia’s AI Mathematics tutor — ask any MATH1853 Random Variables, Expectation and Variance question and get a clear, step-by-step explanation grounded in how MATH1853 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 52 of your subjects at The University of Hong Kong, plus 1,000+ more Bibles across the AskSia library.
Sia - your MATH1853 tutor, unlimited, worked the way the exam marks it
The full 4-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works