Lecture Note Expectation and Variance: Lecture 2 Notes (Part I).pdf
Lecture Note Probability Distribution: Lecture 2 Notes (Part II).pdf
Next: 2086 Lecture 3 - Estimation and Maximum Likelihood
Expectation
Expectation is the expected value of the random variable X, if we do multiple tries, we expecting to get this result in average.
Discrerte RVs:
E[X]=x∈X∑xp(x)
Continuous RVs:
E[f(X)]=∫Xf(x)p(x)dx
For example, consider a uniform distribution, where x=0,1 and p0=p1=0.5
Then E[X]=0×0.5+1×0.5=0.5
Rule of Expectation
E[f(X)]=f(E[X])
They are equal if and only if f(x)=ax+b, otherwise we might get result like E[X2]=E[X]2 when f(X)=x2 which is incorrect.
But we can rewrite it as:
EX[f(X)]=EXf[Xf].
Where Xf=f(X)
Linearity of Expectation
E[bX+c]=bE[X]+c
EX[XY]=YEX[X]
EX,Y[X+Y]=EX[X]+EY[Y]
Variance
Variance measures the spread of data, i.e. how different it is from expectation to a random variable we draw.
V[X]=E[X2]−E[X]2