Random Variables

Sources:

  1. NOTES ON PROBABILITY by Greg Lawler

Random Variables

Notation

Symbol Type Description
Set Sample space, the set of all possible outcomes
Element of A specific outcome in the sample space
σ-algebra Event space, the collection of subsets of that satisfy the properties of a σ-algebra
Function P:F[0,1] Probability measure, a function P:F[0,1] satisfying Kolmogorov’s axioms
X Random variable A measurable function X:
μX Function μX:B[0,1] Distribution of the random variable X, defined on Borel subsets of
σ-algebra The Borel σ-algebra on
FX(x) Cumulative distribution function (CDF) Probability that X takes a value less than or equal to x, FX(x)=(Xx)
fX(x) Probability density function (PDF) Describes the density of X if X is absolutely continuous
pX(x) Probability mass function (PMF) Describes the probability of X taking a specific value x if X is discrete
(,,X) Probability space The transformed probability space induced by the random variable X

Abbreviations

Abbreviation Description
r.v. Random variable
PDF Probability density function
PMF Probability mass function
CDF Cumulative distribution function

Definition

The term "random variable" is somewhat misleading, as it is neither "random" nor a "variable" in the conventional sense. Instead, it is a function.

A random variable X is a measurable function that maps outcomes in the sample space Ω to the real numbers R. Formally, it is defined as:

X:ΩR

such that for every Borel set BR,

X1(B)={ωΩ:X(ω)B}F.

Here, we use the shorthand notation:

{XB}={ωΩ:X(ω)B}

Distribution of a Random Variable

If X is a random variable, then for every Borel set BR,X1(B)F. Using this, we can define a function μX on Borel sets: μX(B)=P(XB)=P(X1(B)).

This function μX is a measure, making (R,B,μX) a probability space. The measure μX is called the distribution of the random variable X.

Nature of Random Variable

使用随机变量的本质就是转换概率空间, 将 (Ω,F,P) 转化为 (R,B,μX), 使问题的形式更加方便用数学处理.

Explanation

首先我们知道:

  • 对于概率空间 (Ω,F,P), 概率度量函数P(E)的参数为E, EΩ, EF.
  • 对于概率空间 (R,B,μX), 概率度量函数μX(B)的参数为B, BΩ, EB.

虽然我们用statement(->参见前文))将 BE 定义为event, 但 BE 自身是outcome的集合.

Example

例如, 定义随机实验为"购买一个汉堡, 品尝其肉馅是什么肉", 规定:

  • Ω={,,,}, 记四个元素(outcome)为ω1,ω2,ω3,ω4.
  • F = {(E1),(E2)}={(ω1,ω4),(ω2,ω3)}.
    • 定义event E1: "汉堡是牛肉馅或者鱼肉馅的", 这个event是ω1,ω4的集合, 即: E1={ω1,ω4}. ω1,ω4Ω.
    • 定义event E2: "汉堡是猪肉馅或者鸭肉馅的", E2={ω2,ω3}. ω1,ω3Ω.
  • P(E) = 事件E发生的概率.

概率空间 = (Ω,F,P).

接着定义随机变量X: X(ωi)=i. 记X的取值为X, 则:

  • X={1,2,3,4}, 记四个元素(outcome)为x1,x2,x3,x4.
  • B = {(B1),(B2)}={(x1,x4),(x2,x3)}={(1,4),(2,3)}.
    • 定义event B1: "X1(B1)为True", 这个event是x1,x4的集合, 即: B1={x1,x4}={1,4}. 1,4X, (1,4)B.
    • 定义event B1: "X1(B2)为True", 这个event是x2,x3的集合, 即: B2={x2,x3}={2,3}. 2,3X, (2,3)B.
  • μX(B) = 事件B发生的概率.

概率空间 = (R,B,μX), 或者说 (X,B,μX).

定义event B: "X取值为1或者4", 这个event其实是x1,x4的集合, 即: B={1,4}. x1,x4X, XR的子集.

注意到, B1,B2自身只是outcome的集合, 但我们用"X1(B1),X1(B2)成立"这两个statement来定义它们. B1,B2的取值让statement为True, 也就是事件发生.

Cumulative distribution function (CDF)

The distribution μX is often expressed in terms of its cumulative distribution function (CDF): FX(x)=P(Xx)=μX((,x])

where (,x] is indeed a Borel set in R.

Properties of a CDF:

  1. limxF(x)=0.

  2. limxF(x)=1.

  3. F is non-decreasing.

  4. F is right-continuous: F(x+)=limϵ0F(x+ϵ)=F(x).

Reconstruction from the CDF

From FX(x), we can reconstruct μX as: μX((,x])=FX(x),

extending uniquely to all Borel sets.

Discrete and continuous random variables

  • If μX gives measure one to a countable set of reals, then X is called a discrete random variable.
  • If μX gives zero measure to every singleton set, and hence to every countable set, X is called a continuous random variable.

Probability density function (PDF)

For a continuous random variable X, the PDF fX, if it exists, satisfies:

  1. FX(x)=xfX(t)dt.

  2. If fX is continuous at x,

fX(x)=ddxFX(x).

  1. The total integral equals 1 :

fX(x)dx=1

Probability mass function (PMF)

The PMF pX(x) of a discrete random variable is defined as: pX(x)=P(X=x),

where pX(x)>0 for values x in the support of X.

Note: In writing P(X=x), we are using X=x to denote an event, consisting of all outcomes ω to which X assigns the number x. This event is also written as {X=x}; formally, {X=x} is defined as {ωΩ:X(s)=x}, but writing {X=x} is shorter and more intuitive.