My Avatar

LanternD's Castle

An electronics enthusiast - survive technically

STT 861 Theory of Prob and STT I Lecture Note - 4

2017-09-27

Expectation and its theorems, Geometry distribution, Negative Binomial distribution and their examples; Theorem of linerarity, PMF of a pair of random variables, Markov's inequality; variance and its examples, uniform distribution.

Portal to all the other notes

Lecture 04 - Sept 27 2017

Expectation

Avg(X1)+Avg(X2)+...+Avg(Xn)=np

Definition: Let X be a (discrete) r.v. with PMF pk=P[X=k],kZ. We say that the expectation of X is

E[X]:=k=xkpk

Example 1

A game of dice. Throw 1 die, win \$ 1 if outcome is even, win \$ outcome/2 if outcome is odd.

E[x]=1+1+16+0.5+1.5+2.56=7.56=1.25

Example 2

Let XBern(p), thus E(X)=p.

Example 3

Let XBin(n,p), E(X)=k=0nkCnkpk(1p)nk, this is the dumb way to solve.

Another way, use linearity,

E[X]=E[Xi]=n×p

Example 4

Let XGeom(p), then E[x]=1p (prove this at home). Here is a link to it. I don’t want to type it again.

Example 5

Let XNegBin(X), then

E[X]=E[Xi]=np

Try at home

Find the definition, PMF and expectation for the “Multinomial” distribution.

Theorem of Linearity: Let X amd Y be two r.v.’s and α,βR Let Z=αX+βY.

E[Z]=E[αX+βY]=αE[X]+βE[Y]

Don’t require X and Y be independent.

Theorem Let X and Y be two independent r.v.’s, then

E[XY]=E[X]E[Y]

(try to prove it at home)

PMF of (X,Y)

For (X,Y) a pair of r.v.s, we can define PMF of (X,Y):

px,y=P[X=x and Y=y]

Note: if X and Y are independent, then px,y=pxpy=P[X=x]P[Y=y].

Example 6

Let Y=X2 where X is a r.v. Assume P[X=k]=pk, then

E[Y]=E[X2]=k=(xk)2pk

Theorem: Let X be a r.v.with PMF P[X=xk]=pk, let F be a function from R to R, let Y=F(X), Then

E[Y]=E[F(X)]=k=F(xk)pk

Theorem: Let X be a r.v. such that X0 (P[X0]=1). Then E[X]0. Proven by the definition.

Theorem (Markov’s inequality): Let X be a non-negative r.v. Let X be fixed real >0. Then

P[X>C]E[X]C

(Chebyshev inequality is related to Markov inequality).

Variance (Chapter 1.6)

Empirically the variance is the average squared deviation from the mean.

With data x1,x2,,xn, let

μ=1ni=1nxi

and

σ2=variance=1ni=1n(xiμ)2

Mathematically, variance is defined as:

Let X be a r.v.

Var(X)=E[(XE[X])2]

(General formula)

Here we used the approximate corresponding 1nX, μE[X].

Proposition: Var(X)=E[X2](E[X])2. This is extremely important, especially in doing homework. :-)

Proof:

Var(X)=E[(XE[X])2]=E[X22XE[X]+(E[X])2]=E[X2]E[2XE[X]]+E[(E[X])2]=E[X2]2E[X]2+E[X]2=E[X2](E[X])2

Usually if PMF of X is given, it is easier compute to Var(X) using the 2nd formula than the original definition.

Usual Notation

Let X be a r.v.

Example 7

Let X have this PMF: for k=1,2,3,4, pk=P[X=k]=k10.

Then μ=E[X]=1+4+9+1610=3,

E[X2]=1+8+27+6410=10

Finally, Var[X]=E[X2]E[X]2=109=1

Properties of the variance: Let cR, let X & Y be independent r.v. Then

Example 8

Let XBinom(n,p), therefore,

X=i=1nXi

where Xi are i.i.d Bernoulli(p). Thus

Var(X)=Var(X1)+Var(X2)+...+Var(Xn)

Variance of Bernoulli:

Var(Xi)=E[Xi2]E[Xi]2=pp2=p(1p)

Thus,

Var(X)=np(1p)

In Ch2, we will calculate Var(XGeom(p))=1pp2.

Let XNegBin(n,p), then Var(X)=n(1p)p2.

Proposition: Let X be a r.v. Let cR, then

E[(Xc)2]=Var(X)+(cμ)2

where μ=E[X].

Proof:

E[(Xc)2]=E(Xμ+μc)2=E[(Xμ)2+2(Xμ)(μc)+(μc)2]=Var(X)+0+(μc)2=Var(X)+(μc)2

Indeed, for c=x, we get the definition of Var(X). For cμ we get

E[(Xc)2]>Var(X)

Example 9

Let X be a uniform r.v. is the set of integers from 1 to N, P[X=k]=1N for k=1,2,3,,n (definition).

Then

E[N]=N+12, Var(N)=N2112

End note

Sometimes people (the professor) use different notation for expectation and variance,

Just choose whichever you like. I prefer ( ) to [ ].



Disqus Comment 0