Professional Documents
Culture Documents
Expected Value
Expected Value
1
This slide show is an open-source document. See last slide for copyright
information.
1 / 32
Expected Value Variance Covariance
Overview
1 Expected Value
2 Variance
3 Covariance
2 / 32
Expected Value Variance Covariance
Definition
P
Provided x |x| px (x) < ∞. If the sum diverges, the
expected value does not exist.
Existence is only an issue for infinite sums (and integrals
over infinite intervals).
3 / 32
Expected Value Variance Covariance
PN
xi
For the jar full of numbered balls, E(X) = i=1
N
5 / 32
Expected Value Variance Covariance
Pn P
Compare E(X) = j=1 vj P (X = vj ) and x x px (x)
6 / 32
Expected Value Variance Covariance
Definition
7 / 32
Expected Value Variance Covariance
8 / 32
Expected Value Variance Covariance
Sometimes
R∞ the expected value does not exist
Need −∞
|x| fx (x) dx < ∞
1
For the Cauchy distribution, f (x) = π(1+x2 )
.
Z ∞
1
E(|X|) = |x| dx
−∞ π(1 + x2 )
Z ∞
x
= 2 dx
0 π(1 + x2 )
u = 1 + x2 , du = 2x dx
1 ∞1
Z
= du
π 1 u
= ln u|∞
1
= ∞−0=∞
10 / 32
Expected Value Variance Covariance
11 / 32
Expected Value Variance Covariance
R∞
E(g(X)) = −∞ g(x) fX (x) dx
R∞ R∞
E(g(X)) = −∞ · · · −∞ g(x1 , . . . , xp ) fX (x1 , . . . , xp ) dx1 . . . dxp
P
E (g(X)) = x g(x)pX (x)
P P
E(g(X)) = x1 ··· xp g(x1 , . . . , xp ) pX (x1 , . . . , xp )
12 / 32
Expected Value Variance Covariance
X
E(aX) = ax pX (x)
x
X
= a x pX (x)
x
= a E(X)
So E(aX) = aE(X).
13 / 32
Expected Value Variance Covariance
X
E(a) = a pX (x)
x
X
= a pX (x)
x
= a·1
= a
So E(a) = a.
14 / 32
Expected Value Variance Covariance
Z ∞ Z ∞
E(X + Y ) = (x + y) fxy (x, y) dx dy
Z−∞ −∞
∞ Z ∞ Z ∞Z ∞
= x fxy (x, y) dx dy + y fxy (x, y) dx dy
−∞ −∞ −∞ −∞
= E(X) + E(Y )
15 / 32
Expected Value Variance Covariance
Putting it together
n
! n
X X
E aiXi = aiE(Xi)
i=1 i=1
You can move the expected value sign through summation signs
and constants. Expected value is a linear transformation.
16 / 32
Expected Value Variance Covariance
E(g(X)) 6= g(E(X))
E(X k ) 6= (E(X))k
That is, the statements are not true in general. They might be
true for some distributions.
17 / 32
Expected Value Variance Covariance
2
V ar(X) = E (X − µ)
18 / 32
Expected Value Variance Covariance
Variance rules
19 / 32
Expected Value Variance Covariance
20 / 32
Expected Value Variance Covariance
Markov’s inequality
Let Y be a random variable with P (Y ≥ 0) = 1 and E(Y ) = µ.
Then for any t > 0, P (Y ≥ t) ≤ E(Y )/t. Proof:
Z ∞
E(Y ) = yf (y) dy
−∞
Z t Z ∞
= yf (y) dy + yf (y) dy
Z−∞
∞
t
≥ yf (y) dy
Zt ∞
≥ tf (y) dy
t
Z ∞
= t f (y) dy
t
= t P (Y ≥ t)
So P (Y ≥ t) ≤ E(Y )/t.
21 / 32
Expected Value Variance Covariance
Chebyshev’s inequality
Let X be a random variable with E(X) = µ and V ar(X) = σ 2 .
Then for any k > 0,
1
P (|X − µ| ≥ kσ) ≤
k2
We are measuring distance from the mean in units of the
standard deviation.
The probability of observing a value of X more than 2
standard deviations away from the mean cannot be more
than one fourth.
This is true for any random variable that has a standard
deviation.
For the normal distribution, P (|X − µ| ≥ 2σ) ≈ .0455 < 14 .
22 / 32
Expected Value Variance Covariance
E (X − µ)2
2 2 2
P (X − µ) ≥ k σ ≤
k2 σ2
σ 2 1
= 2 2
= 2
k σ k
1
So P (|X − µ| ≥ kσ) ≤ k2
.
23 / 32
Expected Value Variance Covariance
Example
1
Chebyshev says P (|X − µ| ≥ kσ) ≤ k2
1 1
Compared to 32
= 9 = 0.11.
24 / 32
Expected Value Variance Covariance
Conditional Expectation
The idea
25 / 32
Expected Value Variance Covariance
X
E(Y |X = x) = y py|x(y|x)
y
If X and Y are continuous,
Z ∞
E(Y |X = x) = y fy|x(y|x) dy
−∞
26 / 32
Expected Value Variance Covariance
27 / 32
Expected Value Variance Covariance
Z ∞ Z ∞
E[E(Y |X)] = y fy|x (y|x) dy fx (x) dx
−∞ −∞
Z ∞Z ∞
fxy (x, y)
= y dy fx (x) dx
fx (x)
Z−∞ −∞
∞ Z ∞
= y fxy (x, y) dy dx
−∞ −∞
= E(Y )
28 / 32
Expected Value Variance Covariance
Definition of Covariance
Let X and Y be jointly distributed random variables with
E(X) = µx and E(Y ) = µy . The covariance between X and Y
is
Properties of Covariance
30 / 32
Expected Value Variance Covariance
Correlation
Cov(X, Y )
Corr(X, Y ) = ρ = p
V ar(X) V ar(Y )
−1 ≤ ρ ≤ 1
Scale free: Corr(aX, bY ) = Corr(X, Y )
31 / 32
Expected Value Variance Covariance
Copyright Information
http://www.utstat.toronto.edu/∼ brunner/oldclass/256f18
32 / 32