Skip to content
Infinitesimal Dynamics home
Notebook: 0 XP

Probability Theory / Random variables

Random Variables, Expectation and Variance

Numbers that depend on chance, their average value, and how far they typically stray from it.

3 min read · 2 sections · 2 checks

Contents 3 sections
  1. §1Expected value
  2. §2Spread
  3. ?Check yourself

By the end you can

  • Describe discrete random variables with probability mass functions
  • Compute expected value using linearity
  • Compute variance and standard deviation

Helps to know: Conditional Probability and Bayes

§1Expected value

E[X]=∑xx P(X=x)E[X] = \sum_x x\,P(X = x)

The expectation is the long-run average. A fair die has E[X]=1+2+⋯+66=3.5E[X] = \frac{1 + 2 + \cdots + 6}{6} = 3.5, a value it never shows.

§2Spread

Var⁡(X)=E[(X−μ)2]=E[X2]−μ2\operatorname{Var}(X) = E\big[(X - \mu)^2\big] = E[X^2] - \mu^2

The standard deviation σ=Var⁡(X)\sigma = \sqrt{\operatorname{Var}(X)} is in the same units as XX. For independent variables, variances add.

Example 1Variance of a die

  1. E[X2]=1+4+9+16+25+366=916E[X^2] = \frac{1 + 4 + 9 + 16 + 25 + 36}{6} = \frac{91}{6}.

Check yourself

  1. Q1
    A game pays $10 with probability 0.20.2 and nothing otherwise. Expected payout?
  2. Q2
    If Var⁡(X)=4\operatorname{Var}(X) = 4, then Var⁡(3X)=\operatorname{Var}(3X) =