View
216
Download
2
Embed Size (px)
Citation preview
Chris Morgan, MATH [email protected]
February 3, 2012Lecture 11
Chapter 5.3: Expectation (Mean) and Variance
1
2
Expected Value
3
Question: How do you determine the “value” of a game? Is it better to play Roulette than the Lottery? We are looking for ways of describing random variables.
Definition of an Expected Value
–The expected value of a random variable X with PMF is given by:
–The expected value is a weighted average of the possible values of X, weighted by the probabilities.
( ) * ( )E X x p x
Expected Value
4
We may interchangeably use the terms mean, average, expectation, and expected value and the notations E(X) or μ
Note: The expected value of a random variable can be understood as the long-run-average value of the random variable in repeated independent trials. If you are playing a game, and X is what you win in the game, then E(X) would be your average win if you would play the game many many many many many many many many many times.
Example #1
5
Recall from last lecture:
x P(x)0 1/16
1 4/16
2 6/16
3 4/16
4 1/16
1 4 6 4 1( ) 0 1 2 3 4
16 16 16 16 16E X
Fundamental Expected-Value Formula
6
Instead of E(X) we can also compute the expected value of a function of X.
– If X is a discrete random variable with PMF and is any real valued function of X, then:
[ ( )] ( )* ( )E g x g x p x
Example #2
7
Recall from last lecture:
I can also compute:
x P(x)0 1/16 1 4/16 2 6/16 3 4/16 4 1/16
1 4 6 4 1( ) 0 1 2 3 4 2
16 16 16 16 16E X
2 2 2 2 2 21 4 6 4 1( ) 0 1 2 3 4 5
16 16 16 16 16E X
Example #3
8
Or I can compute:
or even:
x P(x)0 1/16 1 4/16 2 6/16 3 4/16 4 1/16
1 4 6 4 1( 3) (0 3) (1 3) (2 3) (3 3) (4 3) 5
16 16 16 16 16E X
1 4 6 4 1(2 ) (2*0) (2*1) (2*2) (2*3) (2*4) 4
16 16 16 16 16E X
So then:
E(X+3) = E(X) + 3E(2X) = 2*E(X)
E(X2) ≠ E(X)2
Expectation in a Linear Operator
9
Let X be a random variable and a, b be constants. Then:
Let X1,…,Xn be random variables. Then:
( ) ( )E aX b aE X b
1 1
( )n n
i ii i
E X E X
( )E b b (10) 10E
Variance
10
The definition of variance of a random variable is a measure of the spread of its distribution. It is the expected squared deviation from the mean:
where μ = E[X]
If we know the pmf of X then we can calculate the variance as follows:
We can simplify the variance equation to this:
2( ) ( ) * ( )Var X k f k
2 2 2( ) [( ) ] ( ) [ ( )]Var X E X E X E X
2 2( ) [( ) ]x Var x E X
Variance
11
- Var(X) is always non-negative (Var(X) >= 0)
- Sometimes, we’ll abbreviate: σ2
- Var(X) is a measure of the spread of the random variable. If Var(X)=0, then the spread is zero, i.e. all the probability is concentrated in one point (nothing is random anymore).
- The variance is not measured in the same units that the random variable is measure in. (This is a disadvantage!)
Example #4
12
Recall from last lecture:
I can also compute:
Then:
1 4 6 4 1( ) 0 1 2 3 4 2
16 16 16 16 16E X
2 2 2 2 2 21 4 6 4 1( ) 0 1 2 3 4 5
16 16 16 16 16E X
2 2 2( ) ( ) [ ( )] 5 [2] 1Var X E X E X
Example #4
13
Theorem: Variance is not a linear operator! Let X be a random variable and a, b, c be constants. Then:
2( ) ( )Var aX b a Var X
( ) 0Var c
Variance
14
If X1, X2, …, Xn are independent, then:
1 1
( )n n
i ii i
Var X Var X
Standard Deviation
15
Standard deviation of a random variable X is:
Note: unlike variance, standard deviation is measured in the same units
( ) ( )SD X Var X
Practice #5
16
Let X be a discrete random variable with PMF:
E(X)=
Var(X)=
E(2X-3)=
Var(2x-3)=
X 0 1 2 3
p(x) 0.4 0.2 0.3 0.1
Practice #6
17
Let X be a RV with mean μ=5 and variance σ²=9
Find E((X-1)2).
Find the standard deviation of X.
Practice #7
18
For a game, you tell a friend that if a 6-sided die rolls a 2, you will pay her $2. If the die rolls a 3, she will pay you $3. Any other numbers (so 1, 4, 5, or 6) you pay her a quarter.
Let W be the random variable representing your friend’s winnings.
Practice #7
19
What is the pmf of W?
What is the expected amount of money your friend will win?
Practice #7
20
What is the standard deviation of your friend’s winnings?
Practice #7
21
If you and your friend played this game 5 times, what would the overall expected value and standard deviation of your friend’s winnings be?
Practice #8
22
If Var(Z) = 4, then find:
Var(5) =
Var(Z+1) =
Var(2Z) =
Var(aZ + b) =
Var(b-aZ) =
Practice #8
23
Given that the Var(Y) = 9 and the E(Y) = 4, can we find E(Y2)?