Expectations

advertisement
Expectations
Example (Problem 75 revisit)
A restaurant serves three fixed-price dinners costing $12, $15, and $20.
For a randomly selected couple dinning at this restaurant, let X = the
cost of the man’s dinner and Y = the cost of the woman’s
dinner. If the joint pmf of X and Y is assumed to be
y
p(x, y )
12 15 20
12 .05 .05 .10
x
15 .05 .10 .35
20 0 .20 .10
What is the expected total expense for that couple?
Let Z = the total expense for that couple. Then Z = X + Y .
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
1 / 12
Expectations
p(x, y )
x
12
15
20
12
.05
.05
0
y
15
.05
.10
.20
20
.10
.35
.10
Z =X +Y
E (Z ) = .05(12 + 12) + .05(12 + 15) + .10(12 + 20)
+ .05(15 + 12) + .10(15 + 15) + .35(15 + 20)
+ 0(20 + 12) + .20(20 + 15) + .10(20 + 20)
= 33.35
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
2 / 12
Expectations
Definition
Let X and Y be jointly distributed rv’s with pmf p(x, y ) or pdf f (x, y )
according to whether the variables are discrete or continuous. Then the
expected value of a function h(X , Y ), denoted by E [h(X , Y )] or µh(X ,Y ) , is
given by
(P P
h(x, y ) · p(x, y )
if X and Y are discrete
E [h(X , Y )] = R ∞x R y∞
if X and Y are continuous
−∞ −∞ h(x, y ) · f (x, y )dxdy
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
3 / 12
Expectations
Example (Problem 12)
Two components of a minicomputer have the following joint pdf for their
useful lifetimes X and Y :
(
xe −x(1+y ) x ≥ 0 and y ≥ 0
f (x, y ) =
0
otherwise
If the lifetime of the minicomputer is the sum of the lifetimes of the two
components, then what is the expected lifetime of the minicomputer?
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
4 / 12
Covariance
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
5 / 12
Covariance
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
6 / 12
Covariance
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
7 / 12
Covariance
Definition
The covariance between two rv’s X and Y is
Cov (X , Y ) = E [(X − µX )(Y − µY )]
(P P
y (x − µX )(y − µY )p(x, y )
= R ∞x R ∞
−∞ −∞ (x − µX )(y − µY )f (x, y )dxdy
X , Y discrete
X , Y continuous
Remark: The covariance depends on both the set of possible pairs and the
probabilities.
Proposition
Cov (X , Y ) = E (XY ) − µX · µY
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
8 / 12
Covariance
Example (Problem 75 revisit)
A restaurant serves three fixed-price dinners costing $12, $15, and $20.
For a randomly selected couple dinning at this restaurant, let X = the
cost of the man’s dinner and Y = the cost of the woman’s
dinner. If the joint pmf of X and Y is assumed to be
y
12 15 20
p(x, y )
12 .05 .05 .10
x
15 .05 .10 .35
20 0 .20 .10
Cov (X , Y ) = E (XY ) − µX · µY = 276.7 − 15.9 · 17.45 = −0.755
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
9 / 12
Covariance
If we change the unit for the previous example from dollar to cent, then
the joint pmf would be
y
p(x, y )
1200 1500 2000
1200 .05
.05
.10
x
1500 .05
.10
.35
0
.20
.10
2000
And correspondingly,
Cov (X , Y ) = E (XY ) − µX · µY = 7550
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
10 / 12
Covariance
Definition
The correlation coefficient of X and Y , denoted by Corr (X , Y ), ρX ,Y or
just ρ is defined by
Cov (X , Y )
ρX ,Y =
σX · σY
e.g. for the previous example, the correlation coefficient of X and Y is
ρ=
Liang Zhang (UofU)
−0.755
= −0.09
2.91 · 2.94
Applied Statistics I
July 7, 2008
11 / 12
Covariance
Proposition
1. Corr (aX + b, cY + d) = Corr (X , Y ) if a · c > 0.
2. −1 ≤ Corr (X , Y ) ≤ 1.
3. ρ = 1 or −1 iff Y = aX + b for some a and b with a 6= 0.
4. If X and Y are independent, then ρ = 0. However, ρ = 0 does not
imply that X and Y are independent
Liang Zhang (UofU)
Applied Statistics I
July 7, 2008
12 / 12
Download