Combining random variables – sums, differences, aX + b and unbiased estimators

MathematicsProbabilityAges 17–18

Loading…

Use with my class ✨ Customize with AI Report a problem

Draw thousands of times from two independent distributions (a die, a table of values or a normal model) to build X + Y, X − Y, aX + b, aX + bY and the sum or mean of k copies, then compare the histogram with the exact distribution and with the rules E(aX + b) = aE(X) + b, Var(aX + b) = a²Var(X), E(X ± Y) = E(X) ± E(Y) and Var(X ± Y) = Var(X) + Var(Y). Real contexts (the total mass of a parcel, the difference of two race times, °C to °F, an elevator) are included, and an estimator screen compares the variance with divisor n and n − 1 and the sample range.

Lesson: Mean and variance of sums, differences and linear transformations; unbiased estimators

What it shows

For constants a and b, E(aX + b) = aE(X) + b and Var(aX + b) = a²Var(X): adding b shifts a distribution without changing its spread. Means always add, E(X ± Y) = E(X) ± E(Y), but variances add only for independent variables, and they add for a difference too: Var(X − Y) = Var(X) + Var(Y). The sum of k independent copies has variance kVar(X), not k²Var(X), and a sum of independent normal variables is normal. The estimator screen shows that dividing by n − 1 gives an unbiased estimate of σ², while dividing by n and the sample range are biased low.

How to use

Choose a Context or Custom, pick the operation after Z = and press Draw 1, +100, +1000 or Run to grow the histogram of Z. Compare the simulated mean and variance in the table with the theory and the rules. Drag the red line to set c for P(Z ≥ c), untick Independent draws to break the variance rule, and tick the normal curve. On Unbiased estimators, choose Population, Estimator and Sample size n.

Parameters you can change

  • Screen Combining random variables, Estimators: bias and variability
  • Context Custom X, Y and operation, Two dice, Mass of a parcel, Two sprinters, °C to °F, Elevator with k people
  • Operation that makes Z (Custom context) aX + b, X + Y, X − Y, aX + bY, X₁ + … + Xₖ (k independent copies), Mean X̄ of k copies
  • Coefficient a (Custom context) -10–10
  • Coefficient b (Custom context) -100–100
  • Number of copies k (Custom context) 2–30
  • Distribution of X (Custom context) Fair die (1–6), Table of values, Normal N(μ, σ²)
  • Values of X (table, separated by spaces)
  • Probabilities of X (table, separated by spaces)
  • Mean μ of X (normal) -1000–1000
  • Standard deviation σ of X (normal) 0.01–1000
  • Distribution of Y (Custom context) Fair die (1–6), Table of values, Normal N(μ, σ²)
  • Values of Y (table, separated by spaces)
  • Probabilities of Y (table, separated by spaces)
  • Mean μ of Y (normal) -1000–1000
  • Standard deviation σ of Y (normal) 0.01–1000
  • Independent draws
  • Show a normal curve with the same mean and SD
  • Cut-off c of the event (Custom context) -100000–100000
  • Event for the probability (Custom context) Z ≥ c, Z ≤ c
  • Population (Estimators screen) Fair die (1–6), Uniform on [0, 10], Normal N(50, 10²)
  • Sample size n (Estimators screen) 2–50
  • Estimators compared (Estimators screen) Variance: divide by n or n − 1, Standard deviation, Sample range, Sample mean or sample median
  • Random seed (same number, same results) 1–999

Questions to explore

  1. Why is the variance of X − Y equal to Var(X) + Var(Y) rather than Var(X) − Var(Y)?
  2. Do the total mass of 8 adults and 8 times the mass of one adult have the same standard deviation?
  3. Why does dividing by n − 1 give an unbiased estimate of the population variance?