Jump to content

Probability/Properties of Distributions

From Wikibooks, open books for an open world


Introduction

[edit | edit source]

Recall that pdf (or cdf) describes the random behaviour of a random variable completely . However, we may sometimes find the pdf (or cdf) to be too complicated, and only want to know some partial information about the random variable. In view of this, we study some properties of distributions in this chapter, which provide partial descriptions of the random behaviour of the random variable.

Some examples of such partial descriptions include

  • location (e.g. pdf is 'located' at left or right?),
  • dispersion (e.g. 'sharp' of 'flat' pdf?),
  • skewness (e.g. pdf is symmetric, skewed to left, or skewed to right?), and
  • tail property (e.g. pdf have 'light' or 'heavy' tails?).

We can qualitatively describe them, but such descriptions are quite subjective and inaccurate. To give a more objective and accurate measure to such descriptions, we evaluate them quantitatively using some quantitative measures derived from the pdf (or cdf) of the random variable.

We will discuss some of such quantitative measures in this chapter. Among these, the expectation is the most important one, since many of other properties base upon the concept of expectation.

Expectation

[edit | edit source]

We have different alternative names for expectation, e.g. expected value and mean.

Definition. (Expectation) The expectation of a random variable X is

(i) (if X is discrete) 𝔼[X]=∑x∈supp⁡(X)xℙ(X=x)=∑x∈supp⁡(X)xf(x)⏟pmf in which f is pmf of X;

(ii) (if X is continuous) 𝔼[X]=∫−∞∞xf(x)⏟pdfdx in which f is pdf of X;

(iii) (if X is mixed) If X={discrete random variableVwith probabilityα,continuous random variableWwith probability1−α, 𝔼[X]=α𝔼[V]+(1−α)𝔼[W]=α∑u∈supp⁡(X)vfV(v)⏟pmf+(1−α)∫−∞∞wfW(w)⏟pdfdw, in which fV is pmf of V and fW is pdf of W.

Remark.

  • The expectation of X is what we would expect of its value if we are to take an observation of X.
  • It is a weighted average of all possible values attainable by X (i.e. supp⁡(X)), with heavier weighting to points with higher value of pmf or pdf.
  • Expectation tells us the 'centre' of distribution of X, and 'average' position of X when generated in the long run.
  • Actually the '∈supp⁡(X)' is not needed, since the pmf or pdf will equal zero for input outside its support.

Example. Let X be the number facing up after throwing a fair six-faced dice once. Then, the expectation of X is 𝔼[X]=1[ℙ(X=1)⏟1/6]+2[ℙ(X=2)⏟1/6]+⋯+6[ℙ(X=6)⏟1/6]=3.5. If the dice is loaded, and thus the probability that number '6' faces up becomes 0.5, and there are equal probability for the other five numbers facing up, the expectation of X becomes 𝔼[X]=1[ℙ(X=1)⏟0.1]+2[ℙ(X=2)⏟0.1]+⋯+5[ℙ(X=5)⏟0.1]+6[ℙ(X=6)⏟0.5]=4.5.

Example. (Expectation of uniform distribution) Let X∼𝒰[a,b], the uniform distribution with parameters a and b. Then, the pdf of X is f(x)=𝟏{x∈[a,b]}b−a, and the expectation of X is 𝔼[X]=∫−∞∞x𝟏{x∈[a,b]}b−adx=1b−a∫abxdx⏟b2/2−a2/2=b2−a22(b−a)=(b−a)(b+a)2(b−a)=a+b2.

Clipboard

Exercise. In a process, we first toss an unfair coin one time, with probability p for the head to come up. If head comes up in the first toss, we toss another unfair coin one time, with probability q for the head to come up. If tails comes up in the first toss instead, We throw an arrow to the ground one time. Let X be the number of head coming up in all tosses, Y be the angle from the north direction to the direction pointed by the arrow, measured clockwise and in radian, and Z be the number we get from the process finally. Suppose that Y∼𝒰[0,2π).

1

Choose correct expression(s) of 𝔼[X].

p
q
p+q
(1−p)(1−q)+p(1−q)+q(1−p)+2pq
2p(1−q)+2pq

2

Choose correct expression(s) of 𝔼[Y].

π
pπ
qπ
(1−p)π
(1−q)π

3

Choose correct expression(s) of 𝔼[Z].

pq+(1−p)π
p(p+q)+(1−p)π
pq+(1−p)qπ
p(p+q)+(1−p)pπ

4

If the two coins are fair, choose correct statement(s).

𝔼[Z] increases.
𝔼[Z] decreases.
Change in 𝔼[Z] depends on values of p and q.
𝔼[Y] remains unchanged.
𝔼[Z] increases if p=q=1/3.


In the following, we introduce a useful result that gives the relationship between expectation and probability, we can use expectation to ease the computation of probability using this result.

Proposition. (Fundamental bridge between probability and expectation) For each event E⊆Ω, 𝔼[𝟏{E}]=ℙ(E).

Proof. Let X=𝟏{E}. Since X=𝟏{E}∼Ber⁡(ℙ(E)) (which is a discrete random variable), 𝔼[X]=0[ℙ(X=0)]+1[ℙ(X=1)]=ℙ(𝟏{E}=1)=ℙ(E).

◻

When there are multiple random variables involved, we may derive the joint pmf or pdf first to compute the expectation, but it can be quite difficult and complicated to do so. Practically, we use the following theorem more often.

Theorem. (Law of the unconscious statistician (LOTUS)) Let X1,…,Xn be random variables. Define Y=g(X1,…,Xn) for a function g. Then,

(i) (if Y is discrete) 𝔼[Y]=∑x1⋯∑xng(x1,…,xn)f(x1,…,xn)⏟joint pmf, in which f is joint pmf of (X1,…,Xn);

(ii) (if Y is continuous) 𝔼[Y]=∫−∞∞⋯∫−∞∞g(x1,…,xn)f(x1,…,xn)⏟joint pdfdx1⋯dxn, in which f is joint pdf of (X1,…,Xn).

Remark.

  • If Y is mixed, we can apply the definition of expectation and use the above two results for the expectations of the discrete and continuous random variables.
  • This theorem is known as the law of the unconscious statistician, because we often tend to use this identity without realizing that it is a result of a theorem, instead of a definition.
  • This theorem also holds when there is only one random variables involved (the joint pmf and pdf become normal pmf and pdf) , e.g.

𝔼[g(X)]=∫−∞∞g(x)f(x)dx

The proof is quite complicated, and hence we skip it. In the following, we will introduce several properties of expectation that can help us to simplify computations of the expectation.

Proposition. (Properties of expectation) For each constant α,β,γ and random variable X,Y,

  • (Linearity) 𝔼[αX+βY+γ]=α𝔼[X]+β𝔼[Y]+γ;
  • (Nonnegativity) if X≥0, 𝔼[X]≥0;
  • (Monotonicity) if X≥Y, 𝔼[X]≥𝔼[Y];
  • (Triangle inequality) |𝔼[X]|≤𝔼[|X|];
  • (Multiplicativity under independence) if X,Y are independent, 𝔼[XY]=𝔼[X]𝔼[Y].

Proof.

Linearity:

for continuous random variables X,Y, 𝔼[αX+βY+γ]=∫−∞∞∫−∞∞(αx+βy+γ)f(x,y)⏟joint pdfdxdy=α∫−∞∞x∫−∞∞f(x,y)dy⏟marginal pdf of Xdx+β∫−∞∞y∫−∞∞f(x,y)dx⏟margianl pdf of Ydy+γ∫−∞∞f(x,y)dxdy⏟1=α∫−∞∞xfX(x)dx⏟𝔼[X]+β∫−∞∞yfY(y)dy⏟𝔼[Y]+γ=α𝔼[X]+β𝔼[Y]+γ. Similarly, for discrete random variables X,Y, 𝔼[αX+βY+γ]=∑x∑y(αx+βy+γ)f(x,y)=α∑xx∑yf(x,y)+β∑yy∑xf(x,y)+γ∑x∑yf(x,y)=α∑xfX(x)+β∑yfY(y)+γ(1)=α𝔼[X]+β𝔼[Y]+γ.

Nonnegativity:

For continuous random variable X, ∫0∞⏟∵X≥0xfX(x)≥0. Similarly, for discrete random variable X, ∑x≥0⏟∵X≥0xfX(x)≥0.

Monotonicity:

For random variables X,Y that are either both discrete or both continuous, X≥Y⇒X−Y≥0⇒𝔼[X]−𝔼[Y]=linearity𝔼[X−Y]≥nonnegativity0.

Triangle inequality:

−|X|≤X≤|X|⇒monotonicity−𝔼[|X|]≤𝔼[X]≤𝔼[|X|]

Multiplicativity under independence:

For continuous random variables X,Y, 𝔼[XY]=∫−∞∞∫−∞∞xyf(x,y)⏟joint pdfdxdy=∫−∞∞∫−∞∞xyfX(x)fY(y)⏟marginal pdf'sdxdy=∫−∞∞yfY(y)∫−∞∞xfX(x)dx⏟independent from ydy=∫−∞∞xfX(x)dx∫−∞∞yfY(y)dy=𝔼[X]𝔼[Y]. Similarly, for discrete random variables X,Y, 𝔼[XY]=∑x∑yxyf(x,y)⏟joint pmf=∑y∑xxyfX(x)fY(y)⏟marginal pmf's=(∑xxfX(x))(∑yyfY(y))=𝔼[X]𝔼[Y].

◻

Remark.

  • (Nonmultiplicativity) 𝔼[XY]≠𝔼[X]𝔼[Y] in general.
  • We cannot apply linearity property similarly when the function inside the expectation is nonlinear. E.g., 𝔼[2X]≠2𝔼[X] in general.
  • From linearity, we can see that the expectation of a constant is simply the constant itself. This is intuitive, since the value we expect for a constant is simply the constant.
  • The converse of multiplicativity under independence is true in general, but not always true. For some special dependent random variables, the converse does not hold.

Mean of some distributions of a discrete random variable

[edit | edit source]

Proposition. (Mean of Bernoulli and binomial r.v.'s) Let X∼Ber⁡(p) and Y∼Binom⁡(n,p). Then, 𝔼[X]=p, and 𝔼[Y]=np.

Proof.

  • 𝔼[X]=0⋅ℙ(X=0)⏟=0+1⋅ℙ(X=1)⏟=p=p.
  • Since Y=X1+⋯+Xn, in which X1,…,Xn are i.i.d. and follow Ber⁡(p) [1],
  • 𝔼[Y]=𝔼[X1+⋯+Xn]= linearity 𝔼[X1]+⋯+𝔼[Xn]=p+⋯+p⏟n times=np.

◻

Proposition. (Mean of Poisson r.v.'s) Let X∼Pois⁡(λ). Then, 𝔼[X]=λ.

Proof. 𝔼[X]=∑k=0∞k(λke−λk!)⏟ℙ(X=k)=λ(0+∑k=1⏟k−1=0∞k(λk−1e−λk(k−1)!)⏟ℙ(X=k−1))=λ(0+1)=λ.

◻

Proposition. (Mean of geometric and negative binomial r.v.'s) Let X∼Geo⁡(p) and Y∼NB⁡(k,p) . Then, 𝔼[X]=1−pp, and 𝔼[Y]=k(1−p)p.

Proof.

  • Since

𝔼[X]=∑k=0∞k(1−p)kp⏟ℙ(X=k)=∑k=0∞(k−1)(1−p)kp+∑k=0∞(1−p)kp⏟ℙ(X=k)⏞=1=(0−1)(1−p)0p⏟=−p+((1−p)∑k−1=0∞(k−1)(1−p)k−1p)+1=−p+(1−p)𝔼[X]+1,

  • it follows that p𝔼[X]=1−p⇒𝔼[X]=1−pp..
  • Since Y=X1+⋯+Xk in which X1,…,Xk are i.i.d., and follow Geo⁡(p) [2],
  • 𝔼[Y]=𝔼[X1]+⋯+𝔼[Xk]=1−pp+⋯+1−pp⏟k times=k(1−p)p.

◻

Proposition. (Mean of hypergeometric r.v.'s) Let X∼HypGeo⁡(N,K,n). Then, 𝔼[X]=nK/N.

Proof.

  • Since X=X1+⋯+Xn in which X1,…,Xn∼Ber⁡(K/N) (each of the Bernoulli r.v.'s indicates whether the corresponding draw of ball is of type 1, with probability K/N without knowing the results of other draws [3], since each draw is equally likely to be any of the N balls) [4] ,
  • it follows that 𝔼[X]=𝔼[X1]+⋯+𝔼[Xn]=KN+⋯+KN⏟n times=nKN.

◻


Mean of some distributions of a continuous random variable

[edit | edit source]

We will introduce the formulas for mean of some distributions of a continuous random variable, which are relatively simpler.

Proposition. (Mean of uniform r.v.'s) Let X∼𝒰[a,b] (a<b). Then, 𝔼[X]=a+b2.

Proof. 𝔼[X]=∫abxb−adx=12(b−a)(b2−a2)=(b−a)(b+a)2(b−a).

◻

Proposition. (Mean of gamma, exponential, and chi-squared r.v.'s) Let X∼Gamma⁡(α,λ), Y∼Exp⁡(λ), and Z∼χν2. Then, 𝔼[X]=α/λ, 𝔼[Y]=1/λ, and 𝔼[Z]=ν.

Proof.

  • It suffices to prove the formula for mean of gamma r.v.'s, since exponential and chi-squared r.v.'s are essentially special cases of gamma r.v.'s, and thus we can simply substitute some values into the formula for mean of gamma r.v.'s to obtain the formulas for them.
  • 𝔼[X]=∫0∞x⋅λαxα−1e−λxΓ(α)dx=αλ∫0∞λα+1xα+1−1e−λxΓ(α+1)dx⏟=F(∞)=1,F is the cdf of Gamma⁡(α+1,λ),=αλ.
  • Since Exp⁡(λ)≡Gamma⁡(1,λ), 𝔼[Y]=1/λ by substituting α=1.
  • Since χν2≡Gamma⁡(ν/2,1/2), 𝔼[Z]=(ν/2)/(1/2)=ν by substituting α=ν/2 and λ=1/2.

◻

Proposition. (Mean of beta r.v.'s) Let X∼Beta⁡(α,β). Then, 𝔼[X]=αα+β.

Proof.

  • We use similar approach from the previous proof.

𝔼[X]=∫01x⋅Γ(α+β)Γ(α)Γ(β)xα−1(1−x)β−1dx=αα+β∫01Γ(α+β+1)Γ(α+1)Γ(β)xα+1−1(1−x)β−1dx⏟F(1)=1,F is the cdf of Beta⁡(α+1,β),=αα+β.

◻

Proposition. (Undefined mean of Cauchy r.v.'s) Let X∼Cauchy⁡(θ). Then, 𝔼[X] is undefined.

Proof. 𝔼[X]=𝔼[X−θ]+θby linearity,=θ+1π∫−∞∞(x−θ)⋅11+(x−θ)2dx=θ+1π∫−∞∞u1+u2du,let u=x−θ⇒du=dx,=θ+1π(∫−∞0u1+u2du+∫0∞u1+u2du)=θ+1π(12[ln⁡(1+u2)]u=−∞u=0+12[ln⁡(1+u2)]u=0u=∞)=θ+1π(−∞+∞⏟undefined).

◻

Proposition. (Mean of normal r.v.'s) Let X∼𝒩(μ,σ2). Then, 𝔼[X]=μ.

Proof.

  • Let Z=X−μσ∼𝒩(0,1).
  • 𝔼[Z]=∫−∞∞xφ(x)dx=12π∫−∞∞xe−x2/2dx=−12π∫−∞−∞eudu,let u=−x22⇒du=−dx=−12π(e−∞⏟=0−e−∞⏟=0)=0.
  • It follows that 𝔼[X]=𝔼[σZ+μ]=σ𝔼[Z]⏟=0+μ=μ.

◻

Examples

[edit | edit source]

Example. (St. Petersburg Paradox) Consider a game in which the player toss a fair coin X times, until a head comes up. Since X−1∼Geo⁡(1/2), the expected value of X−1 is 𝔼[X−1]⏟𝔼[X]−1=1−1/21/2⇒𝔼[X]=1+1=2. That is, the player requires two tosses to get a head coming up on average.

The game rewards the player $8 to play the game, but the player must pay back $2X after getting a head coming up.

Some may think that the expected net gain of the player is $8−$22=$4, so the player has an advantage in this game.

However, this is wrong since the correct expected net gain is instead 𝔼[8−2X]=linearity8−𝔼[2X]=8−∑x=1∞[2x⋅(1/2)x−1(1/2)⏟pdf of X]=8−∑x=1∞1=−∞, i.e., on average the player has infinite loss!

Clipboard

Exercise.

1

Choose correct statement(s).

𝔼[X]≥0 for each random variable X.
𝔼[|X|]≥0 for each random variable X.
|𝔼[X]|≥0 for each random variable X.
𝔼[XYZ]=𝔼[X]𝔼[Y]𝔼[Z] if random variables X,Y and Z are pairwise independent.

2

Given that 𝔼[X]=−k=−𝔼[Y], Choose correct expression(s) for 𝔼[aX+bY+c].

a𝔼[X]+𝔼[bY+c]
c𝔼[(a/c)X+(b/c)Y]+c
(b−a)k+c
𝔼[−ak+bk+c]


Let us illustrate the usefulness of fundamental bridge between probability and expectation by giving a proof to inclusion-exclusion using this bridge.

Example. (Proof of inclusion-exclusion formula) Recall that the inclusion-exclusion formula is

For each event A1,A2,… and An,

ℙ(A1∪A2∪⋯∪An)=∑j=1n(−1)j−1∑i1<i2<⋯<ijℙ(Ai1∩Ai2∩⋯∩Aij). The proof is as follows:

X=𝟏{A1∪⋯∪An}=1−𝟏{A1c∩⋯∩Anc}=1−𝟏{A1c}⋯𝟏{Anc}=1−(1−𝟏{A1})⋯(1−𝟏{An})=𝟏{A1}+⋯+𝟏{An}−(𝟏{A1}𝟏{A2}⏟𝟏{A1∩A2}+⋯+𝟏{An−1}𝟏{An}⏟𝟏{An−1∩An})+(⋯)−(⋯)⋯+(−1)n−1𝟏{A1}⋯𝟏{An}⏟𝟏{A1∩⋯∩An}=∑j=1n(−1)j−1∑i1<⋯<ij𝟏{Ai1∩⋯∩Aij}⇒𝔼[𝟏{A1∪⋯∪An}]⏟ℙ(A1∪⋯∪An)=∑j=1n(−1)j−1∑i1<⋯<ij𝔼[𝟏{Ai1∩⋯∩Aij}]⏟ℙ(Ai1∩⋯∩Aij)by linearity ◻

Probability generating functions

[edit | edit source]

An application of expectation is probability generating functions. As suggested by its name, it can generate probabilities in some sense.

Definition. (Probability generating function) Let X be a discrete r.v. with support {0,1,2,…}. The probability generating functions of X is G(y)=𝔼[yX]=∑x=0∞yxℙ(X=x).

Remark.

  • There is also moment generating function, which can generate moments (see next section for the definition) in some sense. We will discuss in the transformation of random variables chapter.
  • By taking derivatives of the probability generating function, we can generate probabilities:

1k!⋅dkdykG(y)|k=0=ℙ(X=k).

  • This can be seen directly by evaluating the derivatives.

Variance (and standard deviation)

[edit | edit source]

Indeed, variance is a special case of central moment, and is related to moment in some sense.

Definition. (rth moment) The rth moment of a random variable X is 𝔼[Xr].

Definition. (rth central moment) The rth central moment of a random variable X is 𝔼[(X−𝔼[X]⏟constant)r].

Definition. (Variance) The variance of a random variable X, denoted by Var⁡(X), is its 2nd central moment, i.e. 𝔼[(X−𝔼[X]⏟constant)2].

Since (X−𝔼[X])2 is the squared deviation of the value of X from its mean, in view of the definition of variance, we can see that variance measure the dispersion (or spread) of distribution, since it is what we would expect of the squared deviation if we are to take an observation of the random variable.

Another term which is closed related is standard deviation.

Definition. (Standard deviation) The standard deviation of random variable X, usually denoted as σ, is Var⁡(X) .

Remark.

  • the interpretation of standard deviation is similar to that of variance
  • standard deviation is also sometimes abbreviated as 's.d.'
  • standard deviation of random variable X has the same unit as X, which is one of its advantage, and one of the reasons to use standard deviation instead of variance to measure dispersion.
  • since standard deviation is usually denoted as σ, it follows that we can denote variance as σ2, although it is not as common as the Var⁡(⋅) notation.

Proposition. (Properties of variance)

  • (alternative expression for variance)

Var⁡(X)=𝔼[X2]−(𝔼[X])2

  • (invariance under change in location parameter)

Var⁡(X+a)=Var⁡(X) for each constant a

  • (homogeneity of degree two)

Var⁡(bX)=b2Var⁡(X) for each constant b

  • (nonnegativity)

Var⁡(X)≥0

  • (zero variance implies non-randomness)

Var⁡(X)=0⇒X=non-random constant⇔there exists a constant c such that ℙ(X=c)=1

  • (additivity under independence)

X1,…,Xn are independent⇒Var⁡(X1+⋯+Xn)=Var⁡(X1)+⋯+Var⁡(Xn)

Proof.

  • alternative expression for variance:
Let μ=𝔼[X] for clearer expression.

𝔼[(X−μ)2]=𝔼[X2−2Xμ+μ2]=𝔼[X2]−2μ𝔼[X]⏟μ+μ2=𝔼[X2]−μ2, and the result follows.

  • invariance under change in location parameter:

Var⁡(X+a)=𝔼[(X+a−𝔼[X+a]⏟𝔼[X]+a)2]=𝔼[(X−𝔼[X])2]=Var⁡(X).

  • nonnegativity: it follows from (X−𝔼[X])2≥0.
  • zero variance implies non-randomness:
Let μ=𝔼[X] for clearer expression. Consider the event En={|X−μ|≥n−1}, in which n is a positive integer.
Since 0=Var⁡(X)=𝔼[(X−μ)2]≥𝔼[(X−μ)2𝟏{En}⏟≤1]=𝔼[|X−a|2𝟏{En}]≥𝔼[n−2⏟constant𝟏{En}]=n−2⏟≥0ℙ(En)⏟≥0≥0,
we have 0≥n−2ℙ(En)≥0⇒0≥ℙ(En)≥0⇒ℙ(En)=0.
Thus,

ℙ(|X−μ|>0⏟X≠μ)=ℙ(⋃n=1∞En)=a lemmalimn→∞ℙ(En)⏟0=0⇒ℙ(X=μ)=1−ℙ(X≠μ)⏟0=1

  • additivity under independence:
For each random variable X and Y that are independent with means μ,ν respectively,

Var⁡(X+Y)=𝔼[(X+Y−𝔼[X+Y])2]Var⁡(X+Y)=𝔼[(X+Y−μ−ν)2]by linearity=𝔼[(X−μ)2]⏟Var⁡(X)+𝔼[(Y−ν)2]⏟Var⁡(Y)+2𝔼[(X−μ)(Y−ν)]by linearity=Var⁡(X)+Var⁡(Y)+2𝔼[XY]−2ν𝔼[X]−2μ𝔼[Y]+2μνby linearity=Var⁡(X)+Var⁡(Y)+2𝔼[X]𝔼[Y]⏟μν−2νμ−2μν+2μνby independence of X,Y=Var⁡(X)+Var⁡(Y)+2μν−2νμ=Var⁡(X)+Var⁡(Y). Thus, inductively, Var⁡(X1+⋯+Xn)=Var⁡(X1)+Var⁡(X2+⋯+Xn)=⋯=Var⁡(X1)+⋯+Var⁡(Xn) if X1,…,Xn are independent.

◻

Variance of some distributions of a discrete random variable

[edit | edit source]

Proposition. (Variance of Bernoulli and binomial r.v.'s) Let X∼Ber⁡(p) and Y∼Binom⁡(n,p). Then, Var⁡(X)=p(1−p) and Var⁡(Y)=np(1−p).

Proof.

  • 𝔼[X2]=0⋅ℙ(X=0)+1⋅ℙ(X2=1⏟⇔X=1)=p since X is nonnegative.
  • It follows that Var⁡(X)=𝔼[X2]−(𝔼[X])2=p−p2=p(1−p).
  • Similar to the proof for the mean of Bernoulli and binomial r.v.'s, Y=X1+⋯+Xn in which X1,…,Xn are i.i.d. and follow Ber⁡(p).
  • Because of the independence (from i.i.d. property), Var⁡(Y)=Var⁡(X1)+⋯+Var⁡(Xn)⏟n times=np(1−p).

◻

Proposition. (Variance of Poisson r.v.'s) Let X∼Pois⁡(λ). Then, Var⁡(X)=λ.

Proof.

  • 𝔼[X2]=∑k=0∞k2(λke−λk!)⏟ℙ(X=k)=λ(0+∑k=1⏟k−1=0∞k(kλk−1e−λk(k−1)!))=λ(∑k−1=0∞(k−1)e−λλk−1(k−1)!⏟𝔼[X]+∑k−1=0∞e−λλk−1(k−1)!⏟ℙ(X=k−1)⏞=1)=λ(λ+1).
  • Hence, Var⁡(X)=𝔼[X2]−(𝔼[X])2=λ(λ+1)−λ2=λ.

◻

Proposition. (Variance of geometric and negative binomial r.v.'s) Let X∼Geo⁡(p) and Y∼NB⁡(k,p) . Then, Var⁡(X)=1−pp2, and 𝔼[Y]=k(1−p)p2.

Proof.

  • Since

𝔼[X]=∑k=0∞k2(1−p)kp⏟ℙ(X=k)=∑k=0∞(k−1+1)2(1−p)kp⏟ℙ(X=k)=∑k=0∞(k−1)2(1−p)kp+∑k=0∞2(k−1)(1−p)kp+∑k=0∞(1−p)kp⏟ℙ(X=k)⏞=1=(0−1)2(1−p)0p⏟=p+(1−p)∑k−1=0∞(k−1)2(1−p)k−1p+2(0−1)(1−p)0p⏟=−2p+2(1−p)∑k−1=0∞(k−1)(1−p)k−1p+1=p+(1−p)𝔼[X2]−2p+2(1−p)𝔼[X]⏟(1−p)/p+1=(1−p)𝔼[X2]+2(1−p)2p+1−p,

  • it follows that p𝔼[X2]=2(1−p)2p+1−p⇒𝔼[X2]=2(1−p)2+p(1−p)p2.
  • Hence, Var⁡(X)=𝔼[X2]−(𝔼[X])2=2(1−p)2+p(1−p)p2−(1−p)2p2=(1−p)2+p(1−p)p2=(1−p)(1−p+p)p2.
  • Similarly, Y=X1+⋯+Xk in which X1,…,Xk are i.i.d., and follow Geo⁡(p) [5].
  • Because of the independence, Var⁡(Y)=Var⁡(X1)+⋯+Var⁡(Xk)=1−pp2+⋯+1−pp2⏟k times=k(1−p)p2.

◻

Variance of some distributions of a continuous random variable

[edit | edit source]

Proposition. (Variance of uniform r.v.'s) Let X∼𝒰[a,b]. (a<b) Then, Var⁡(X)=(b−a)212.

Proof. Var⁡(X)=𝔼[X2]−(𝔼[X])2=∫abx2b−adx−(b+a2)2=1b−a(b3/3−a3/3)−(a+b2)2=13(b−a)(b3−a3)−(a+b2)2=13(b−a)(b−a)(b2+ba+a2)−a2+2ab+b24=4b2+4ab+4a2−3b2−62ab−3a212=b2−2ab+a212=(b−a)212.

◻

Proposition. (Variance of gamma, exponential and chi-squared r.v.'s) Let X∼Gamma⁡(α,λ), Y∼Exp⁡(λ), and Z∼χν2. Then, Var⁡(X)=α/λ2, Var⁡(Y)=1/λ2, and Var⁡(Z)=2ν.

Proof.

  • Similarly, it suffices to prove the formula for variance of gamma r.v.'s.
  • 𝔼[X2]=∫0∞x2⋅λαxα−1e−λxΓ(α)dx=(α+1)αλ2∫0∞λα+2xα+2−1e−λxΓ(α+2)dx⏟=F(∞)=1,F is the cdf of Gamma⁡(α+2,λ),=(α+1)αλ2.
  • It follows that Var⁡(X)=𝔼[X2]−(𝔼[X]2)=(α+1)αλ2−α2λ2=αλ2.
  • Since Exp⁡(λ)≡Gamma⁡(1,λ), Var⁡(Y)=1/λ2 by substituting α=1.
  • Since χν2≡Gamma⁡(ν/2,1/2), Var⁡(Z)=(ν/2)/(1/2)2=2ν by substituting α=ν/2 and λ=1/2.

◻

Proposition. (Variance of beta r.v.'s) Let X∼Beta⁡(α,β). Then, Var⁡(X)=αβ(α+β)2(α+β+1).

Proof.

  • 𝔼[X2]=∫01x2⋅Γ(α+β)Γ(α)Γ(β)xα−1(1−x)β−1dx=(α+1)α(α+β+1)(α+β)∫01Γ(α+β+2)Γ(α+2)Γ(β)xα+2−1(1−x)β−1dx⏟F(1)=1,F is the cdf of Beta⁡(α+2,β),=(α+1)α(α+β+1)(α+β).
  • It follows that Var⁡(X)=𝔼[X2]−(𝔼[X])2=(α+1)α(α+β+1)(α+β)−α2(α+β)2=(α+1)(α)(α+β)−α2(α+β+1)(α+β)2(α+β+1)=α(α2+αβ+α+β−α2−αβ−α)(α+β)2(α+β+1)=αβ(α+β)2(α+β+1).

◻

Proposition. (Undefined variance of Cauchy r.v.'s) Let X∼Cauchy⁡(θ). Then, Var⁡(X) is undefined.

Proof. It follows from the proposition about undefined mean of Cauchy r.v.'s and the formula Var⁡(X)=𝔼[X2]−(𝔼[X])2 (arbitrary term minus undefined term is undefined).

◻

Proposition. (Variance of normal r.v.'s) Let X∼𝒩(μ,σ2). Then, Var⁡(X)=σ2.

Proof.

  • Let Z=X−μσ∼𝒩(0,1).
  • 𝔼[Z2]=∫−∞∞x2φ(x)dx=12π∫−∞∞x2e−x2/2dx=−12π∫−∞∞xd(e−x2/2)=−12π([xe−x2/2]−∞∞−∫−∞∞e−x2/2dx)by integration by parts,=−12π(0−0−∫−∞∞e−x2/2dx)since exponential function ↓ much faster than linear function, or by L'Hospital rule,=∫−∞∞φ(x)dx⏟=Φ(∞)=1=1.
  • It follows that Var⁡(Z)=𝔼[Z2]−(𝔼[Z])2=1−0=1.
  • Hence, Var⁡(X)=Var⁡(σZ+μ)=σ2Var⁡(Z)=σ2.

◻

Clipboard

Exercise.

Choose correct statement(s).

Var⁡(aX)=0⇒X=non-random constant for each constant a.
Var⁡(aX+b)=a2Var⁡(X) for each random variable X, and for each constant a,b.
Var⁡(X)=𝔼[X]⇒X=non-random constant
Var⁡(X)≤0 if X≤0
Standard deviation of random variable X, σ<Var⁡(X)



Coefficient of variation

[edit | edit source]

Definition. (Coefficient of variation) The coefficient of variation is the ratio of the standard deviation to the mean, i.e. σ/μ.

Remark.

  • It is also known as relative standard deviation, since it measures the dispersion relatively (relative to the mean).
  • Thus, it tells the dispersion more accurately than standard deviation without mean.
  • Also, coefficient of variation has no unit.
  • So, it is useful to compare dispersion between different data sets.
  • It shows the extent of dispersion in relation to the mean.
  • However, if the mean is zero, then the coefficient of variation is undefined. So, this is a limitation for it.

Example. If 𝔼[X]=10 and σX=2, then for each a≠0, the coefficient of variation of aX is Var⁡(aX)𝔼[aX]=a2Var⁡(X)a𝔼[X]=|a|Var⁡(X)a𝔼[X]={1/5,a>0;−1/5,a<0, while the coefficient of variation of X is 1/5, which equals that of aX if a>0, equals negative of that of aX if a<0 (they are the same in magnitude, i.e. absolute value). This is expected, since the scaling of random variable itself should not affect the extent of its dispersion.

Clipboard

Exercise.

1

Assume 𝔼[X] is increased to 20. Calculate σX such that the coefficient of variation of X remains unchanged.

1
2
4
5
8

2

Calculate σX such that the standard deviation of X remains unchanged.

1
2
4
5
8



Remark.

  • In general, when the mean is negative, then the coefficient of variation will be nonpositive, since standard deviation is always nonnegative.

Quantile

[edit | edit source]

Then, we will discuss quantile. In particular, median and interqaurtile range are quite related to quantiles.

Definition. (Quantile) Quantile of order α (αth quantile) of random variable X is F−1(α)=inf⁡{x∈ℝ:F(x)>α}.

Remark.

  • Definition of quantile is not unique. There are several alternative definitions, namely

inf⁡{x∈ℝ:F(x)≥α},sup⁡{x∈ℝ:F(x)≤α} and sup⁡{x∈ℝ:F(x)<α}.

  • If F is strictly increasing, all alternative definitions become equivalent and equal the inverse of cdf at α F−1(α), and thus we can calculate the αth quantile by solving the equation F(x)=α .
  • Practical applications focus only on α∈(0,1).

The following are some terminologies related to quantiles.

Definition. (Percentile) The (100α)th percentile is αth quantile.

Example. 70th percentile is 0.7th quantile.

Definition. (Median) The median is 0.5th quantile.

Definition. (Quartile) The jth quartile is (j/4)th quantile in which j∈{1,2,3} .

Example. 2nd quartile is 0.5th quantile, which is also median.

Definition. (Interquartile range) The interquartile range is 3rd quartile minus 1st quartile.

Median and interquartile range measure centrality and dispersion respectively. Recall that mean and variance measure the same things respectively. One advantage of median and interquartile range is robust, since they are always defined, while mean and variance can be infinite, and they fail to measure centrality and dispersion in those occasions. However, median and interquartile range also have some disadvantages, e.g. they may be more difficult to be computed, and may not be very accurate.

Example. (Quantile of uniform distribution) The αth quantile of uniform distribution with parameters a and b>a is a+α(b−a), since F(x)=x−ab−a𝟏{a<x<b}=α⇒x=F−1(α)=a+α(b−a), and we can see that x∈(a,b) if α∈(0,1).

Then, median of uniform distribution is a+b2 which is the same as its mean, and the interquartile range of uniform distribution is a+(3/4)(b−a)−a−(1/4)(b−a)=b−a2, which is different from its variance, namely (b−a)212.

Clipboard

Exercise.

Choose correct statement(s).

20th quantile is 0.2th percentile
4th quartile is 1st quantile
2nd quantile is undefined.
0th quantile = 0th percentile = 0th quartile.
Interquartile range must be nonnegative.
Median must be nonnegative.



Mode is another measure of centrality.

Definition. (Mode)

  • The mode of a pmf (pdf) is the value of x at which the pmf (pdf) takes its maximum value (has its local maximum).

Remark.

  • The mode is the value that is most likely to be sampled (for pmf).
  • Mode is less frequently used than mean.

Example. The modes of the pmf of the numbers coming up from throwing a fair six-faced dice are 1,2,3,4,5 and 6, since the probability for each of these numbers coming up is 1/6, so the pmf takes its maximum value (1/6) at each of these numbers.

Clipboard

Exercise.

Suppose the dice is loaded such that the probability for the number six coming up is 1/2, while other numbers are still equally likely to come up. Which of the following is (are) the mode(s) of the pmf now?

1
2
3
4
5
6



Remark.

  • From this example, we can see that the mode is not necessarily unique.

Covariance and correlation coefficients

[edit | edit source]

In this section, we will discuss two important properties of joint distributions, namely covariance and correlation coefficients. As we will see, covariance is related to variance in some sense, and correlation coefficient is closed related to correlation.

Definition. (Covariance) For each random variable X,Y, the covariance of X,Y is Cov⁡(X,Y)=𝔼[(X−𝔼[X])(Y−𝔼[Y])].

Definition. (Correlation coefficient) For each random variable X,Y such that Var⁡(X),Var⁡(Y)>0, the correlation coefficient is ρ(X,Y)=Cov⁡(X,Y)Var⁡(X)Var⁡(Y).

Both covariance and correlation coefficient measure linear relationship between X and Y. As we will see, ρ(X,Y)∈[−1,1], X,Y are more highly correlated as |ρ(X,Y)| increases, and X has a linear relationship with Y if |ρ(X,Y)|=1.

Proposition. (Properties of covariance)

(i) (symmetry) for each random variable X,Y, Cov⁡(X,Y)=Cov⁡(Y,X) (ii) for each random variable X, Cov⁡(X,X)=Var⁡(X) (iii) (alternative formula of covariance) Cov⁡(X,Y)=𝔼[XY]−𝔼[X]𝔼[Y] (iv) for each constant a1,…,an,b1,…,bm,c,d, and for each random variables X1,…,Xn,Y1,…,Ym, Cov⁡(∑i=1n(aiXi+c),∑j=1m(bjYj+d))=∑i=1n∑j=1maibjCov⁡(Xi,Yj) (v) for each random variable X1,…,Xn, Var⁡(X1+⋯+Xn)=∑i=1nVar⁡(Xi)+2∑1≤i<j≤nCov⁡(Xi,Yj)

Proof.

(i) Cov⁡(X,Y)=𝔼[(X−𝔼[X])(Y−𝔼[Y])]=𝔼[(Y−𝔼[Y])(X−𝔼[X])]=Cov⁡(Y,X) (ii) Cov⁡(X,X)=𝔼[(X−𝔼[X])(X−𝔼[X])]=𝔼[(X−𝔼[X])2]=Var⁡(X) (iii) Cov⁡(X,Y)=𝔼[(X−𝔼[X])(Y−𝔼[Y])]=𝔼[XY−X𝔼[Y]−Y𝔼[X]+𝔼[X]𝔼[Y]]=𝔼[XY]−𝔼[Y]𝔼[X]−𝔼[X]𝔼[Y]+𝔼[X]𝔼[Y]by linearity=𝔼[XY]−𝔼[X]𝔼[Y] (iv) Cov⁡(∑i=1n(aiXi+c),∑j=1m(bjYj+d))=𝔼[(∑i=1n(aiXi+c)−∑i=1n𝔼[aiXi+c])(∑j=1m(bjYj+d)−∑j=1m𝔼[bjYj+d])]=𝔼[∑i=1n(aiXi−𝔼[aiXi])∑j=1m(bjYj−𝔼[bjYj])]=𝔼[∑i=1n∑j=1m(aiXi−𝔼[aiXi])(bjYj−𝔼[bjYj])]=∑i=1n∑j=1m𝔼[(aiXi−ai𝔼[Xi])(bjYj−bj𝔼[Yj])]by linearity=∑i=1n∑j=1maibj𝔼[Xi−𝔼[Xi]]𝔼[Yj−𝔼[Yj]]=∑i=1n∑j=1maibjCov⁡(Xi,Yj) (v) Var⁡(∑i=1nXi)=(ii)Cov⁡(∑i=1nXi,∑j=1nXj)=(iv)∑i=1n∑j=1nCov⁡(X1,Xj)=∑1≤i=j≤nCov⁡(Xi,Xj)+∑1≤i≠j≤nCov⁡(Xi,Xj)=(ii)∑i=1nVar⁡(Xi)+∑1≤i<j≤nCov⁡(Xi,Xj)+∑1≤j<i≤nCov⁡(Xi,Xj)=(i)∑i=1nVar⁡(Xi)+2∑1≤i<j≤nCov⁡(Xi,Xj)

◻

Then, we will discuss about correlation coefficients. The following is the definition of correlation between correlation between two random variables.

Definition. (Correlation between two random variables) Random variables X,Y are uncorrelated if Cov⁡(X,Y)=0, and are correlated if Cov⁡(X,Y)≠0

Remark.

  • Cov⁡(X,Y)=0⇔ρ(X,Y)=0, and Cov⁡(X,Y)≠0⇔ρ(X,Y)≠0 if Var⁡(X)≠0 and Var⁡(Y)≠0. This explains why we use covariance instead of correlation coefficient. It is because covariance is always defined, but correlation coefficient may be undefined.

Covariance and correlation coefficient are similar, but they have differences. In particular, Cov⁡(X,Y) depends on variances of X and Y, not just their relationship. Thus, this number is affected by the variances, and does not measure their relationship accurately. On the other hand, ρ(X,Y) adjusts for variances of X and Y, and therefore measures their relationships more accurately.

The following is one of the most important properties of correlation coefficient.

Proposition. (Universal measure by correlation coefficient) Correlation coefficient lies between -1 and 1 (inclusively).

Proof. For each random variable X,Y,

Aim: prove that ρ(X,Y)≤1⇔Cov⁡(X,Y)Var⁡(X)Var⁡(Y)≤1. To get rid of the square root to make the proof neater, we square both side of the inequality, and get Cov⁡(X,Y)2Var⁡(X)Var⁡(Y)≤1⇔Cov⁡(X,Y)2Var⁡(Y)≤Var⁡(X)⇔Var⁡(X)+Cov⁡(X,Y)2Var⁡(Y)≥0.

Recall that Var⁡(⋅)≥0. So, one way to prove the rightmost inequality is expressing its left side as Var⁡(⋅), as follows: Var⁡(X)−Cov⁡(X,Y)2)Var⁡(Y)=Var⁡(X)+(Cov⁡(X,Y))Var⁡(Y))2Var⁡(Y)−2(Cov⁡(X,Y)Var⁡(Y))=(iv,v)Var⁡(X−Cov⁡(X,Y)Var⁡(Y)Y). Thus, the result follows.

◻

Remark. For each random variable X,Y,

  • the higher the |ρ(X,Y)|, the higher the correlation between X,Y
  • because of this, we can compare the correlation of different pairs of random variables
  • if ρ(X,Y)=1, X increases linearly with Y
  • if ρ(X,Y)=−1, X decreases linearly with Y

Then, we will define several terminologies related to correlation coefficient.

Definition. (Positively correlated, negatively correlated, and uncorrelated) Random variables X,Y are positively (negatively) correlated if ρ(X,Y)>0(<0), i.e. X tends to ↑(↓) as Y↑.

They are uncorrelated if ρ(X,Y)=0.


Then, we will state an important result that is related to independence and correlation. Intuitively, you may think that 'independent' is the same as 'uncorrelated'. However, this is wrong. Indeed, 'independent' is stronger than 'uncorrelated'.

Proposition. (Relationship between independence and correlation) If two random variables are independent, they are uncorrelated.

Proof. For each independent random variable X,Y with mean μ,ν respectively, Cov⁡(X,Y)=𝔼[(X−μ)(Y−ν)]=independence𝔼[X−μ]𝔼[Y−ν]=linearity(𝔼[X]⏟μ−μ)(𝔼[Y]⏟ν−ν)=0

◻

However, converse is not true, as we will see in the following example.

Example. Let V,W∼Ber⁡(1/2) such that they are independent. Set X=V+W,Y=|V−W|. Since V=W=0⇔X=Y=0, (V,W)=(1,0) or (0,1)⇔X=Y=1, and V=W=1⇔X=2 and Y=0, their joint pmf is f(x,y)=𝟏{X=Y=0}/4+𝟏{X=Y=1}/2+𝟏{X=2 and Y=0}/4. The covariance Cov⁡(X,Y)=𝔼[XY]−𝔼[X]𝔼[Y]=1(1)(1/2)−[1(1/2)+2(1/4)][1(1/2)]=0, and so X,Y are uncorrelated.

On the other hand, ℙ(X=Y=0)=1/4≠ℙ(X=0)ℙ(Y=0)=(1/4)(1/4+1/4)=1/8, and so X,Y are not independent.

This illustrates that 'uncorrelated' does not imply 'independent'.

Clipboard

Exercise.

Choose correct statement(s).

Two random variables X,Y are uncorrelated if at least one of them is non-random constant.
For each random variable, it is uncorrelated with itself.
For each random variable, it increases linearly with itself.
Random variables X,Y are more highly correlated than random variables V,W if ρ(X,Y)>ρ(V,W).



  1. ↑ Each of the Bernoulli r.v.'s acts as an indicator for the success of the corresponding trial. Since, there are n independent Bernoulli trials, there are n such indicators.
  2. ↑ Each geometric r.v. shows the number of failure for the corresponding success.
  3. ↑ since this probability is unconditional, because the corresponding mean is also unconditional, so that their sum is also unconditional mean (as in the proposition)
  4. ↑ X1,…,Xn are dependent, but we can still use the linearity of expectation, since it does not require independence.
  5. ↑ Each geometric r.v. shows the number of failure for the corresponding success.