Expectation

Definition (non-negative random variable) open_in_new

For a probability space $(\Omega, \mathcal F, \prob)$, a function $$ X: \Omega \to [0, \infty] $$ is a non-negative random variable if $$ \set{X\leq x}\in\mathcal F \quad\forall x\geq 0. $$

Denote $\mathcal F^+$ for the set of all non-negative random variables.

$X(\omega)$ can be $\infty$ for non-negative random variable but not for random variable.

Theorem (uniqueness of expectation) open_in_new

There is a unique map, called the expectation, $$ \expect: \mathcal F^+ \to [0,\infty] $$ satisfying

  1. $\expect(1_A) = \prob(A)$ for all $A\in\mathcal F$;

  2. $\expect(\lambda X) = \lambda\expect(X)$ for all $\lambda\in[0,\infty)$ and $X\in\mathcal F^+$;

  3. $\expect(\sum_n X_n) = \sum_n \expect(X_n)$ for all sequences $(X_n)_{n\in\N}$ in $\mathcal F^+$.

Proof for $\Omega$ countable

Definition (integrable, square-integrable) open_in_new

A random variable $X$ is

  • integrable if $\expect|X| < \infty$.

  • square-integrable if $\expect(X^2) < \infty$.

Denote $L'(\prob)$ be the set of integrable random variables.

Definition (expectation of integrable random variable) open_in_new

For an integrable random variable $X\in L'(\prob)$, define $$ \expect(X) = \expect(X^+) - \expect(X^-) $$ where $X^+ = \max\set{X,0}$ and $X^- = \max\set{-X, 0}$.

Properties of expectation:

Lemma (expectation for discrete random variable) open_in_new

For a discrete random variable $X$ taking values $(x_n:n\in\N)$ and a function $f$, $$ \expect\big(f(X)\big) = \sum_n f(x_n)\,\prob(X=x_n) $$ provided that $f$ is non-negative, or $f(X)$ is integrable.

Proof

In particular, if $X$ is non-negative or integrable, $$ \expect(X) = \sum_n x_n\, \prob(X=x_n). $$

Lemma (expectation of product of independent random variables) open_in_new

For independent random variables $X,Y$ and functions $f,g$, $$ \expect\big(f(X) g(Y)\big) = \expect\big(f(X)\big) \expect\big(g(Y)\big) $$ provided that $f,g$ are non-negative, or $f(X),g(Y)$ are integrable.

Proof for X,Y discrete

Lemma (expectation as sum of probabilities) open_in_new

For non-negative integer-valued random variable $X$, $$ \expect(X) = \fsum n1\infty \prob(X\geq n). $$ Proof

For a general non-negative random variable $X$, $$\expect(X) = \int_0^\infty \prob(X\geq x)\,dx. $$ Proof requiring Fubini's theorem

Definition (expectation of multivariate random variable) open_in_new

The expectation of a random variable $\v X=(X_1, X_2, \ldots, X_n)$ in $\R^n$ is obtained by taking expectation of each of the components: $$ \begin{align*} \expect(\v X) = \left(\expect(X_1), \expect(X_2), \ldots, \expect(X_n)\right). \end{align*} $$

Variance and covariance open_in_new

Definition (variance) open_in_new

For an integrable random variable $X$ having mean $\mu\in\R$, the variance of $X$ is $$ \operatorname{var}(X) = \expect\big((X-\mu)^2\big). $$

Equivalently (derivation), $$ \operatorname{var}(X) = \expect(X^2) - \expect(X)^2. $$

We see that $\expect(X)^2 \leq \expect(X^2)$, so square-integrable implies integrable.

For $X$ integrable discrete with mean $\mu$, $$\operatorname{var}(X) = \sum_n (x_n-\mu)^2\,\prob(X=x_n).$$

Definition (standard deviation) open_in_new

The standard deviation of an integrable random variable $X$ is $\sqrt{\operatorname{var}(X)}$.

Definition (covariance) open_in_new

For square-integrable random variables $X$, $Y$ with means $\mu$, $\nu$, the covariance is defined by $$ \operatorname{cov}(X,Y) = \expect\big((X-\mu)(Y-\nu)\big). $$ (Derivation that $(X-\mu)(Y-\nu)$ is integrable)

Equivalently (derivation), $$ \op{cov}(X,Y) = \expect(XY) - \expect(X)\expect(Y). $$

Definition (correlation) open_in_new

The correlation of two square-integrable random variables $X,Y$ is $$ \begin{align*} \op{corr}(X,Y) = \frac{\cov(X,Y)}{\sqrt{\var(X)}\sqrt{\var(Y)}}. \end{align*} $$

Cauchy-Schwarz inequality implies $\op{corr}(X,Y)\in[-1,1]$.

Lemma (variance of sum) open_in_new

For square-integrable random variables $X,Y$, $$ \op{var}(X+Y) = \op{var}(X) + 2\op{cov}(X,Y) + \op{var}(Y). $$

Proof

Lemma (independent implies zero covariance) open_in_new

If $X,Y$ are independent, then $\op{cov}(X,Y)=0$.

Proof: $\expect(XY) = \expect(X) \expect(Y)$.

Converse not true: example.

Variance of indicator function open_in_new

For all $A\in\mathcal F$, if $\prob(A) = p$, then $$ \begin{align*} \op{var}(1_A) &= \expect({1_A}^2) - \expect(1_A)^2 \\ &= p - p^2. \end{align*} $$

Definition (variance of multivariate random variable) open_in_new

The variance of a random variable $\v X=(X_1, X_2, \ldots, X_n)$ in $\R^n$ is its covariance matrix $$ \begin{align*} \op{var}(\v X) = (\op{cov}(X_i, X_j))_{i,j=1}^n = \expect\big[ (\v X-\expect(\v X))(\v X-\expect(\v X))^T \big]. \end{align*} $$

Conditional expectation open_in_new

Definition (conditional expectation) open_in_new

For a non-negative of integrable random variable $X$ and an event $B$ of positive probability, define the condition expectation of $X$ given $B$ by $$ \expect(X|B) = \frac{\expect(X1_B)}{\prob(B)}. $$

Law of total expectation open_in_new

Given disjoint events $(B_n: n\in\N)$ of positive probabilities such that $\bigcup_n B_n = \Omega$, we have $$ \expect(X) = \sum_n \expect(X|B_n) \prob(B_n). $$

Proof