Random Variable

Let (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}) be a probability space, and let B\mathcal{B} be the collection of Borel sets in R\mathbb{R}.

Definition. A random variable Y:Ω→RY: \Omega \rightarrow \mathbb{R} on (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}) is a function that is F/B\mathcal{F} / \mathcal{B} measurable, i.e.,

Y−1(E)≐{ω∈Ω:Y(ω)∈E}∈F,∀E∈B. Y^{-1}(E) \doteq \{ \omega \in \Omega : Y(\omega) \in E \} \in \mathcal{F}, \quad \forall E \in \mathcal{B}.

It is not easy to verify this condition for each E∈BE \in \mathcal{B} directly. It suffices to check one of the following equivalent conditions:

  1. Y−1((−∞,a])∈F,∀a∈RY^{-1}( (-\infty, a] ) \in \mathcal{F}, \forall a \in \mathbb{R}.
  2. Y−1((−∞,a))∈F,∀a∈RY^{-1}( (-\infty, a) ) \in \mathcal{F}, \forall a \in \mathbb{R}.
  3. Y−1([a,∞))∈F,∀a∈RY^{-1}( [a, \infty) ) \in \mathcal{F}, \forall a \in \mathbb{R}.
  4. Y−1((a,∞))∈F,∀a∈RY^{-1}( (a, \infty) ) \in \mathcal{F}, \forall a \in \mathbb{R}.

The correctness follows from the following theorem.

Theorem. If there exists a subset S⊆2R\mathcal{S} \subseteq 2^{\mathbb{R}} such that 1) S\mathcal{S} generates B\mathcal{B}, i.e., σ(S)=B\sigma(\mathcal{S}) = \mathcal{B}; 2) for each E∈SE \in \mathcal{S}, Y−1(E)∈FY^{-1}(E) \in \mathcal{F}, then YY is measurable.

Proof. Let L≐{E∈B:Y−1(E)∈F}\mathcal{L} \doteq \{ E \in \mathcal{B} : Y^{-1}(E) \in \mathcal{F} \}. We claim that L\mathcal{L} it is a σ\sigma-field in R\mathbb{R}, by showing that it is closed under complement and countable union.

Via that F\mathcal{F} is a σ\sigma-field,

  1. If Y−1(E)∈FY^{-1}(E) \in \mathcal{F}, then Y−1(R−E)=Ω−Y−1(E)∈FY^{-1}(\mathbb{R} - E) = \Omega - Y^{-1}(E) \in \mathcal{F}.

  2. If Y−1(En)∈FY^{-1}(E_n) \in \mathcal{F} for disjoint En,n∈N+E_n, n \in \mathbb{N}^+, then

    Y−1(∪n∈N+En)=∪n∈N+Y−1(En)∈F. Y^{-1}( \cup_{n \in \mathbb{N}^+} E_n ) = \cup_{n \in \mathbb{N}^+} Y^{-1}( E_n ) \in \mathcal{F}.

Finally, S⊆L\mathcal{S} \subseteq \mathcal{L}, then σ(S)⊆L\sigma(\mathcal{S}) \subseteq \mathcal{L}, the theorem follows.

□\square

Distribution

Definition. The distribution μ:B→R≥0\mu: \mathcal{B} \rightarrow \mathbb{R}_{\ge 0} of YY is a probability measure on (R,B)(\mathbb{R}, \mathcal{B}) defined by

μ(E)=P[Y∈E]=P∘Y−1(E),∀E∈B, \mu(E) = \mathbb{P}[ Y \in E ] = \mathbb{P} \circ Y^{-1} (E), \quad \forall E \in \mathcal{B},

where Y∈EY \in E is a shorthand for Y−1(E)Y^{-1}(E).

Proof. We verify that μ\mu is a probability measure. Note that μ(∅)=0\mu(\emptyset) = 0, and μ(R)=1\mu(\mathbb{R}) = 1. μ\mu is countably additive: consider disjoint E1,E2,…∈BE_1, E_2, \ldots \in \mathcal{B},

μ(∪n≥1En)=P[Y−1(∪n≥1En)]=P[∪n≥1Y−1(En)]=∑n≥1P[Y−1(En)]=∑n≥1μ(En). \begin{aligned} \mu( \cup_{n \ge 1} E_n ) &= \mathbb{P}\big[ Y^{-1} \big( \cup_{n \ge 1} E_n \big) \big] \\ &= \mathbb{P}\big[ \cup_{n \ge 1} Y^{-1} \big( E_n \big) \big] \\ &= \sum_{n \ge 1} \mathbb{P}\big[ Y^{-1} \big( E_n \big) \big]\\ &= \sum_{n \ge 1} \mu( E_n ). \end{aligned}

Hence, (R,B,μ)(\mathbb{R}, \mathcal{B}, \mu) constitutes a probability space.

□\square

Properties

Theorem. There can't be an uncountable collection of disjoint sets in B\mathcal{B} with positive μ\mu-measure.

Proof. Let C⊂B\mathcal{C} \subset \mathcal{B} be a disjoint collection of sets with positive μ\mu-measure. Consider (0,1](0, 1]. For each k∈N+k \in \mathbb{N}^+, let

D1,k≐{E∈C,μ(E∩(0,1])≥1/k}. \mathcal{D}_{1, k} \doteq \{ E \in \mathcal{C}, \mu \big( E \cap (0, 1] \big) \ge 1 / k \}.

Then ∣D1,k∣≤k|\mathcal{D}_{1, k}| \le k, since 1/k⋅∣D1,k∣≤∑E∈D1,kμ(x)≤11 / k \cdot |\mathcal{D}_{1, k}| \le \sum_{E \in \mathcal{D}_{1, k} } \mu(x) \le 1. Therefore the set C0≐∪k≥1D1,k\mathcal{C}_0 \doteq \cup_{k \ge 1} \mathcal{D}_{1, k} is countable.

Similarly we can define Cn\mathcal{C}_n, for each interval (n,n+1](n, n + 1]. If E∈CE \in \mathcal{C}, then there exists at least one n∈Zn \in \mathbb{Z}, such that E∈CnE \in \mathcal{C}_n. So C=∪n∈ZCn\mathcal{C} = \cup_{n \in \mathbb{Z} } \mathcal{C}_n is countable.

□\square

Comment: what would be the value of 1/k⋅∣D1,k∣1 / k \cdot |\mathcal{D}_{1, k}| if D1,k\mathcal{D}_{1, k} is uncountable? One possible way to avoid such multiplication is by applying the axiom of choice. Suppose that the set D1,k\mathcal{D}_{1, k} contains more than kk elements, then by the axiom of choice we can iteratively pick at most kk element (without replacement) from the set. We can not find more item from the set, since the intersection of (0,1](0,1] with each element has μ\mu-measure at least 1/k1 / k.

Expectation

Definition. Let (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}) be a probability space and YY is a random variable defined on it. The expectation of YY is defined by

E[Y]≐∫Y dP=∫ΩY(ω) P(dω). \mathbb{E}[ Y ] \doteq \int Y \, d \mathbb{P} = \int_{ \Omega } Y(\omega) \, \mathbb{P} ( d \omega ).

For nonnegative YY, E[Y]\mathbb{E}[ Y ] is always defined. For general YY, E[Y]\mathbb{E}[ Y ] is defined if at least one of E[X+]\mathbb{E}[ X_+ ] or E[X−]\mathbb{E}[ X_- ] is finite. YY is integrable if E[∣Y∣]<∞\mathbb{E}[ |Y| ] < \infty.

Composition

Theorem. Consider a function f:R→Rf: \mathbb{R} \rightarrow \mathbb{R} is that is B/B\mathcal{B} / \mathcal{B} measurable. The composition of ff and YY, denoted by f∘Yf \circ Y or f(Y)f(Y), is a random variable.

Proof. For each Borel set E∈BE \in \mathcal{B},

  1. Its inverse image f−1(E)f^{-1} (E) is a Borel set since ff is measurable B/B\mathcal{B} / \mathcal{B}.
  2. The inverse image of f−1(E)f^{-1} (E) belongs to F\mathcal{F} since YY is a random variable.

It concludes that (f∘Y)−1(E)∈F\big( f \circ Y \big)^{-1}(E) \in \mathcal{F}.

□\square

Expectation Under Composition

On the one hand, f∘Yf \circ Y is random variable on (Ω,F,P)(\Omega, \mathcal{F}, \mathbb{P}). It expectation is given by

E[f(Y)]=∫Ωf(Y(ω)) P(dω). \mathbb{E}[ f(Y) ] = \int_{ \Omega } f( Y(\omega) ) \, \mathbb{P} ( d \omega ).

Let μ\mu be the distribution of YY. Since (R,B,μ)(\mathbb{R}, \mathcal{B}, \mu) constitutes a probability space, and ff is B/B\mathcal{B} / \mathcal{B} measurable, it is a random variable defined on (R,B,μ)(\mathbb{R}, \mathcal{B}, \mu). By definition, its expectation is given by

E[f]=∫Rf(x) μ(dx). \mathbb{E}[ f ] = \int_{ \mathbb{R} } f(x) \, \mu (d x).

It is therefore of interest whether these two definitions are consistent, i.e., whether two integrals are equal.

Theorem. If ff is nonnegative and measurable B/B\mathcal{B} / \mathcal{B}, then

E[f(Y)]=∫Ωf(Y(ω)) P(dω)=∫Rf(x) μ(dx)=E[f]. \mathbb{E}[ f(Y) ] = \int_{ \Omega } f( Y(\omega) ) \, \mathbb{P} ( d \omega ) = \int_{ \mathbb{R} } f(x) \, \mu (d x) = \mathbb{E}[ f ].

Further, ff (not necessarily nonnegative) is integrable with respect to μ=P∘Y−1\mu = \mathbb{P} \circ Y^{-1} if and only if f∘Y=f(Y)f \circ Y = f(Y) is integrable with respect to P\mathbb{P}, in which case the above equation holds.

Proof.

  1. Suppose f=1Af = \mathbb{1}_{A} is an indicator function for a measurable set, then

    E[f(Y)]=∫Ωf(Y(ω)) P(dω)=∫Ω1A(Y(ω)) P(dω)=P[Y∈A], E[f]=∫Rf(x) μ(dx)=∫R1A(x) μ(dx)=μ(A)=P[Y∈A]. \begin{aligned} \mathbb{E}[ f(Y) ] &= \int_{ \Omega } f( Y(\omega) ) \, \mathbb{P} ( d \omega ) = \int_{ \Omega } \mathbb{1}_{A} ( Y(\omega) ) \, \mathbb{P} ( d \omega ) = \mathbb{P} [ Y \in A],\, \\ \mathbb{E}[ f ] &= \int_{ \mathbb{R} } f(x) \, \mu (d x) = \int_{ \mathbb{R} } \mathbb{1}_{A} (x) \, \mu (d x) = \mu (A) = \mathbb{P} [ Y \in A]. \end{aligned}

    Therefore, E[f(Y)]=E[f]\mathbb{E}[ f(Y) ] = \mathbb{E}[ f ].

  2. By linearity, this holds for nonnegative simple functions.

  3. Suppose that ff is a non-negative function that is measurable B/B\mathcal{B} / \mathcal{B}, then there is a sequence of non-negative simple functions fn↑ff_n \uparrow f. Hence fn(Y)↑f(Y)f_n(Y) \uparrow f(Y). For each n∈N+n \in \mathbb{N}^+, it holds that

    E[fn(Y)]=E[fn]. \mathbb{E}[ f_n(Y) ] = \mathbb{E}[ f_n ].

    The claim follows by monotone convergence theorem.

For general function ff that is measurable B/B\mathcal{B} / \mathcal{B}, applying the above claim to ∣f∣|f| establishes integrability. Decomposing ff into positive part and negative parts proves the claim.

□\square

Example. Taking f(x)=x,∀x∈Rf(x) = x, \forall x \in \mathbb{R}, we see

E[Y]=∫ΩY(ω) P(dω)=∫Rx μ(dx). \mathbb{E}[ Y ] = \int_{ \Omega } Y (\omega) \, \mathbb{P} (d \omega) = \int_{ \mathbb{R} } x \, \mu (d x).

Density

Let (Ψ,M,λ)(\Psi, \mathcal{M}, \lambda) be arbitrary measurable space.

Theorem. Let δ:Ψ→R≥0\delta: \Psi \rightarrow \mathbb{R}_{\ge 0} be a function that is measurable M/B\mathcal{M} / \mathcal{B}. Then we can define a measure by

ν(E)≐∫Eδdλ,∀E∈M. \nu(E) \doteq \int_{E} \delta d \lambda, \quad \forall E \in \mathcal{M}.

ν\nu is said to have density δ\delta with respect to λ\lambda.

Note that ν(E)\nu(E) can be ∞\infty.

Proof. Clearly ν(∅)=0\nu(\emptyset) = 0. Let En∈M,n∈N+E_n \in \mathcal{M}, n \in \mathbb{N}^+ be disjoint. Then via monotone convergence theorem,

ν(∪n≥1En)=∫δ⋅1∪n≥1Endλ=lim⁡n≥1∫δ⋅(∑k∈[n]1Ek)dλ=∑k≥1∫δ⋅1Ekdλ=∑k≥1ν(Ek). \begin{aligned} \nu(\cup_{n \ge 1} E_n) &= \int \delta \cdot \mathbb{1}_{ \cup_{n \ge 1} E_n} d \lambda \\ &= \lim_{n \ge 1} \int \delta \cdot \left( \sum_{k \in [n] }\mathbb{1}_{ E_k } \right) d \lambda \\ &= \sum_{k \ge 1} \int \delta \cdot \mathbb{1}_{ E_k } d \lambda \\ &= \sum_{k \ge 1} \nu(E_k). \end{aligned}

□\square

Theorem. Let Y:Ψ→R≥0Y: \Psi \rightarrow \mathbb{R}_{\ge 0} be measurable M/B\mathcal{M} / \mathcal{B}. Then

∫Y dν=∫Y⋅δ dλ. \int Y \, d \nu = \int Y \cdot \delta \, d \lambda.

Proof.

  1. If Y=1AY = \mathbb{1}_{A} for A∈MA \in \mathcal{M}, then

    ∫Y dν=∫1A dν=ν(A)=∫Aδ dλ=∫1A⋅δ dλ. \begin{aligned} \int Y \, d \nu = \int \mathbb{1}_{A} \, d \nu = \nu(A) = \int_A \delta \, d \lambda = \int \mathbb{1}_{A} \cdot \delta \, d \lambda. \end{aligned}
  2. Via linearity of expectation, this holds for all non-negative simple functions.

  3. Let Xn,n∈N+X_n, n \in \mathbb{N}^+ be non-negative simple functions such that Xn↑YX_n \uparrow Y. Then Xn⋅δ↑Y⋅δX_n \cdot \delta \uparrow Y \cdot \delta. Via monotone convergence theorem, we get

    ∫Y dν=lim⁡n∫Xn dν=lim⁡n∫Xn⋅δ dλ=∫Y⋅δ dλ. \int Y \, d \nu = \lim_n \int X_n \, d \nu = \lim_n \int X_n \cdot \delta \, d \lambda = \int Y \cdot \delta \, d \lambda.

□\square

Corollary. Let Y:Ψ→RY: \Psi \rightarrow \mathbb{R} be measurable M/B\mathcal{M} / \mathcal{B}. It is integrable with respect to ν\nu if and only if Y⋅fY \cdot f is integrable with respect to λ\lambda.

Proof.

By applying the previous theorem to ∣Y∣|Y|.

□\square

Equality

Theorem. If YY is non-negative, then

E[Y]=∫Rx dμ=∫RP[Y>t] dt=∫RP[Y≥t] dt, \mathbb{E}[ Y ] = \int_{ \mathbb{R} } x \, d \mu = \int_{ \mathbb{R} } \mathbb{P}[ Y > t ] \, d t = \int_{ \mathbb{R} } \mathbb{P}[ Y \ge t ] \, d t,

where ∫R⋅ dt\int_{ \mathbb{R} } \cdot \, d t is the Lebesgue integral.

Proof. Since there are countably many of points in R\mathbb{R} for which P(Y=x)≠0\mathbb{P}(Y = x) \neq 0, therefore the set for which P(Y≥t)≠P(Y>t)\mathbb{P}(Y \ge t) \neq \mathbb{P}(Y > t) has Lebesgue measure 0. It holds that

∫RP[Y>t] dt=∫RP[Y≥t] dt. \int_{ \mathbb{R} } \mathbb{P}[ Y > t ] \, d t = \int_{ \mathbb{R} } \mathbb{P}[ Y \ge t ] \, d t.

Case One: YY is simple.

If Y=∑i∈[n]ai1AiY = \sum_{i \in [n] } a_i \mathbf{1}_{A_i} is a simple non-negative function such that the

a0≐0≤a1<…<an a_0 \doteq 0 \le a_1 < \ldots < a_n

are distinct, and the AiA_i are disjoint. For each i∈[n]i \in [n], define Δi=ai−ai−1\Delta_i = a_i - a_{i - 1}. Then

E[Y]=∑i∈[n]aiP(Y=ai)=∑i∈[n]∑j∈[i]ΔjP(Y=ai)=∑j∈[n]∑i=jnΔjP(Y=ai)=∑j∈[n]ΔjP(Y≥ai) \begin{aligned} \mathbb{E}[ Y ] &= \sum_{i \in [n] } a_i \mathbb{P}(Y = a_i) \\ &= \sum_{i \in [n] } \sum_{j \in [i] } \Delta_j \mathbb{P}(Y = a_i) \\ &= \sum_{j \in [n] } \sum_{i = j }^n \Delta_j \mathbb{P}(Y = a_i) \\ &= \sum_{j \in [n] } \Delta_j \mathbb{P}(Y \ge a_i) \end{aligned}

Since for each t∈(ai−1,ai]t \in (a_{i - 1}, a_i], it holds that P[Y≥t]=P[Y≥ai]\mathbb{P}[Y \ge t] = \mathbb{P}[ Y \ge a_i], and for each t>ant > a_n, it holds that P[Y≥t]=0\mathbb{P}[Y \ge t] = 0, we get

E[Y]=∑j∈[n]ΔjP(Y≥ai)=∑j∈[n]∫t∈(ai−1,ai]P(Y≥t) dt=∫t∈(a0,an]P(Y≥t) dt=∫t=0∞P(Y≥t) dt. \begin{aligned} \mathbb{E}[ Y ] &= \sum_{j \in [n] } \Delta_j \mathbb{P}(Y \ge a_i) \\ &= \sum_{j \in [n] } \int_{ t \in (a_{i - 1}, a_i] } \mathbb{P}(Y \ge t) \, d t \\ &= \int_{ t \in (a_0, a_n] } \mathbb{P}(Y \ge t) \, d t \\ &= \int_{ t = 0 }^\infty \mathbb{P}(Y \ge t) \, d t. \end{aligned}

Since P(Y≥t)=P(Y>t)\mathbb{P}(Y \ge t) = \mathbb{P} (Y > t) almost everywhere

E[Y]=∫t=0∞P(Y≥t) dt.=∫t=0∞P(Y>t) dt. \mathbb{E}[ Y ] = \int_{ t = 0 }^\infty \mathbb{P}(Y \ge t) \, d t. = \int_{ t = 0 }^\infty \mathbb{P}(Y > t) \, d t.

Case Two: YY is general non-negative measurable function.

If YY is non-negative, then there is an increasing sequence of simple random variables {Xn}↑Y\{ X_n \} \uparrow Y. Hence

P(Xn>t)=P({ω∈Ω:Xn(ω)>t})↑P(Y>t)=P({ω∈Ω:Y(ω)>t}). \begin{aligned} \mathbb{P}( X_n > t) &= \mathbb{P} \left( \{ \omega \in \Omega : X_n(\omega) > t \} \right) \\ &\uparrow \mathbb{P} (Y > t) = \mathbb{P} \left( \{ \omega \in \Omega : Y(\omega) > t \} \right). \end{aligned}

As

E[Xn]=∫t=0∞P(Xn>t) dt. \mathbb{E}[ X_n ] = \int_{ t = 0 }^\infty \mathbb{P}(X_n > t) \, d t.

By applying monotone convergence theorem to both hand side,

E[Y]=∫t=0∞P(Y>t) dt. \mathbb{E}[ Y ] = \int_{ t = 0 }^\infty \mathbb{P}(Y > t) \, d t.

Remark: We can't argue that P(Xn≥t)↑P(Y≥t)\mathbb{P}(X_n \ge t) \uparrow \mathbb{P}(Y \ge t), even though Xn↑YX_n \uparrow Y. For example, the functions Xn=(1−1/n)⋅1[0,1]X_n = (1 - 1 / n) \cdot \mathbb{1}_{[0, 1]} increases to Y=1[0,1]Y = \mathbb{1}_{[0, 1]}. But P(Xn≥1)=0\mathbb{P}(X_n \ge 1) = 0 and P(Y≥1)=1\mathbb{P}(Y \ge 1) = 1.

□\square