Upload
salama-badawi
View
221
Download
5
Embed Size (px)
Citation preview
Chapter 4
Expectation
4.1 The Expectation of a Random Variable
Commentary
It is useful to stress the fact that the expectation of a random variable depends only on the distributionof the random variable. Every two random variables with the same distribution will have the same mean.This also applies to variance (Sec. 4.3), other moments and m.g.f. (Sec. 4.4), and median (Sec. 4.5). For thisreason, one often refers to means, variance, quantiles, etc. of a distribution rather than of a random variable.One need not even have a random variable in mind in order to calculate the mean of a distribution.
Solutions to Exercises
1. The mean of X is
E(X) =
xf(x)dx =
ba
x
b adx =b2 a22(b a) =
a+ b
2.
2. E(X) =1
100(1 + 2 + + 100) = 1
100
(100)(101)
2= 50.5.
3. The total number of students is 50. Therefore,
E(X) = 18
(20
50
)+ 19
(22
50
)+ 20
(4
50
)+ 21
(3
50
)+ 25
(1
50
)= 18.92.
4. There are eight words in the sentence and they are each equally probable. Therefore, the possible valuesof X and their probabilities are as follows:
x f(x)
2 1/83 5/84 1/89 1/8
It follows that E(X) = 2
(1
8
)+ 3
(5
8
)+ 4
(1
8
)+ 9
(1
8
)= 3.75.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.
108 Chapter 4. Expectation
5. There are 30 letters and they are each equally probable:
2 letters appear in the only two-letter word;
15 letters appear in three-letter words;
4 letters appear in the only four-letter word;
9 letters appear in the only nine-letter word.
Therefore, the possible values of Y and their probabilities are as follows:
y g(y)
2 2/303 15/304 4/309 9/30
E(Y ) = 2
(2
30
)+ 3
(15
30
)+ 4
(4
30
)+ 9
(9
30
)= 4.867.
6. E
(1
X
)=
10
1
x 2xdx = 2.
7. E
(1
X
)=
10
1
xdx = lim
x0 log(x) = . Since the integral is not finite, E(1
X
)does not exist.
8. E(XY ) =
10
x0
xy 12y2dydx = 12.
9. If X denotes the point at which the stick is broken, then X has the uniform distribution on the interval[0, 1]. If Y denotes the length of the longer piece, then Y = max{X, 1 X}. Therefore,
E(Y ) =
10
max(x, 1 x)dx = 1/20
(1 x)dx+ 11/2
xdx =3
4.
10. Since has the uniform distribution on the interval [/2, /2], the p.d.f. of is
f() =
1
for
2< 0 and F (x) = 0 for x 0. The quantile function isF1(p) = log(1 p). So, the 0.25 and 0.75 quantiles are respectively log(0.75) = 0.2877 and log(0.25) = 1.3863. The IQR is then 1.3863 0.2877 = 1.0986.
13. From Table 3.1, we find the 0.25 and 0.75 quantiles of the distribution of X to be 1 and 2 respectively.This makes the IQR equal to 2 1 = 1.
14. The result will follow from the following general result: If x is the p quantile of X and a > 0, then axis the p quantile of Y = aX. To prove this, let F be the c.d.f. of X. Note that x is the greatest lowerbound on the set Cp = {z : F (z) p}. Let G be the c.d.f. of Y , then G(z) = F (z/a) because Y z ifand only if aX z if and only if X z/a. The p quantile of Y is the greatest lower bound on the set
Dp = {y : G(y) p} = {y : F (y/a) p} = {az : F (z) p} = aCp,
where the third equality follows from the fact that F (y/a) p if and only if y = za where F (z) p.The greatest lower bound on aCp is a times the greatest lower bound on Cp because a > 0.
Section 4.6. Covariance and Correlation 121
4.6 Covariance and Correlation
Solutions to Exercises
1. The location of the circle makes no difference since it only affects the means of X and Y . So, weshall assume that the circle is centered at (0,0). As in Example 4.6.5, Cov(X,Y ) = 0. It follows that(X,Y ) = 0 also.
2. We shall follow the hint given in this exercise. The relation [(X X)+ (Y Y )]2 0 implies that
(X X)(Y Y ) 12[(X X)2 + (Y Y )2].
Similarly, the relation [(X X) (Y Y )]2 0 implies that
(X X)(Y Y ) 12[(X X)2 + (Y Y )2].
Hence, it follows that
|(X X)(Y Y )| 12[(X X)2 + (Y Y )2].
By taking expectations on both sides of this relation, we find that
E[|(X X)(Y Y )|] 12[Var(X) + Var(Y )] < .
Since the expectation on the left side of this relation is finite, it follows that
Cov(X,Y ) = E[(X X)(Y Y )]
exists and is finite.
3. Since the p.d.f. of X is symmetric with respect to 0, it follows that E(X) = 0 and that E(Xk) = 0 forevery odd positive integer k. Therefore, E(XY ) = E(X7) = 0. Since E(XY ) = 0 and E(X)E(Y ) = 0,it follows that Cov(X,Y ) = 0 and (X,Y ) = 0.
4. It follows from the assumption that 0 < E(X4) < , that 0 < 2X < and 0 < 2Y < . Hence,(X,Y ) is well defined. Since the distribution of X is symmetric with respect to 0, E(X) = 0 andE(X3) = 0. Therefore, E(XY ) = E(X3) = 0. It now follows that Cov(X,Y ) = 0 and (X,Y ) = 0.
5. We have E(aX + b) = aX + b and E(cY + d) = cY + d. Therefore,
Cov(aX + b, cY + d) = E[(aX + b aX b)(cY + d cY d)]= E[ac(X X)(Y Y )] = acCov(X,Y ).
6. By Exercise 5, Cov(U, V ) = acCov(X,Y ). Also, Var(U) = a22X and Var(V ) = c22Y . Hence
p(U, V ) =acCov(X,Y )
|a|X |c|Y ={
(X,Y ) if ac > 0,(X,Y ) if ac < 0.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.
122 Chapter 4. Expectation
7. We have E(aX + bY + c) = aX + bY + c. Therefore,
Cov(aX + bY + c, Z) = E[(aX + bY + c aX bY c)(Z Z)]= E{[a(X X) + b(Y Y )](Z Z)}= aE[(X X)(Z Z)] + bE[(Y Y )(Z Z)]= aCov(X,Z) + bCov(Y,Z).
8. We have
Cov
m
i=1
aiXi,n
j=1
bjYj
= E
mi=1
ai(Xi Xi)n
j=1
bj(Yj Yj )
= E
mi=1
nj=1
aibj(Xi Xi)(Yj Yj)
=mi=1
nj=1
aibjE[(Xi Xi)(Yj Yj)
]
=mi=1
nj=1
aibj Cov(Xi, Yj).
9. Let U = X + Y and V = X Y . ThenE(UV ) = E[(X + Y )(X Y )] = E(X2 Y 2) = E(X2) E(Y 2).
Also,
E(U)E(V ) = E(X + Y )E(X Y ) = (X + Y )(X Y ) = 2X 2Y .Therefore,
Cov(U, V ) = E(UV ) E(U)E(V ) = [E(X2) 2X ] [E(Y 2) 2Y ]= Var(X)Var(Y ) = 0.
It follows that (U, V ) = 0.
10. Var(X + Y ) = Var(X) + Var(Y ) + 2Cov(X,Y ) and Var(X Y ) = Var(X) + Var(Y ) 2Cov(X,Y ).Since Cov(X,Y ) < 0, it follows that
Var(X + Y ) < Var(X Y ).11. For the given values,
Var(X) = E(X2) [E(X)]2 = 10 9 = 1,Var(Y ) = E(Y 2) [E(Y )]2 = 29 4 = 25,
Cov(X,Y ) = E(XY ) E(X)E(Y ) = 0 6 = 6.Therefore,
(X,Y ) =6
(1)(5)= 6
5, which is impossible.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.
Section 4.6. Covariance and Correlation 123
12.
E(X) =
10
20
x 13(x+ y)dy dx =
5
9,
E(Y ) =
10
20
y 13(x+ y)dy dx =
11
9,
E(X2) =
10
20
x2 13(x+ y)dy dx =
7
18,
E(Y 2) =
10
20
y2 13(x+ y)dy dx =
16
9,
E(XY ) =
10
20
xy 13(x+ y)dy dx =
2
3.
Therefore,
Var(X) =7
18
(5
9
)2=
13
162,
Var(Y ) =16
9
(11
9
)2=
23
81,
Cov(XY ) =2
3
(5
9
)(11
9
)= 1
81.
It now follows that
Var(2X 3Y + 8) = 4Var(X) + 9Var(Y ) (2)(2)(3)Cov(X,Y )=
245
81.
13. Cov(X,Y ) = (X,Y )XY = 16(3)(2) = 1.
(a) Var(X + Y ) = Var(X) + Var(Y ) + 2Cov(X,Y ) = 11.
(b) Var(X 3Y + 4) = Var(X) + 9Var(Y ) (2)(3)Cov(X,Y ) = 51.14. (a) Var(X + Y + Z) = Var(X) + Var(Y ) + Var(Z) + 2Cov(X,Y ) + 2Cov(X,Z) + 2Cov(Y,Z) = 17.
(b) Var(3XY 2Z+1) = 9Var(X)+Var(Y )+4Var(Z)6Cov(X,Y )12Cov(X,Z)+4Cov(Y,Z) =59.
15. Since each variance is equal to 1 and each covariance is equal to 1/4,
Var(X1 + +Xn) =i
Var(Xi) + 2
i
124 Chapter 4. Expectation
The variances of R1 and R2 are Var(R1) = 75 and Var(R2) = 17.52. Since the correlation betweenR1 and R2 is 1, their covariance is 1(75)1/2(17.52)1/2 = 36.25. To make the variance 0, we need75s21 + 17.52s
22 36.25s1s2 = 0. This equation can be rewritten (751/2s1 17.521/2s2)2 = 0. So, we
need to solve the two equations
751/2s1 17.521/2s2 = 0, and 50s1 + 30s2 = 6000.
The solution is s1 = 53.54 and s2 = 110.77. The reason that such a portfolio is unrealistic is that ithas positive mean (1126.2) but zero variance, that is one can earn money with no risk. Such a moneypump would surely dry up the moment anyone recognized it.
17. Let X = E(X) and Y = E(Y ). Apply Theorem 4.6.2 with U = X X and V = Y Y . Then(4.6.4) becomes
Cov(X,Y )2 Var(X)Var(Y ). (S.4.3)
Now |(X,Y )| = 1 is equivalent to equality in (S.4.3). According to Theorem 4.6.2, we get equalityin (4.6.4) and (S.4.3) if and only if there exist constants a and b such that aU + bV = 0, that isa(X X) + b(Y Y ) = 0, with probability 1. So |(X,Y )| = 1 implies aX + bY = aX = bY withprobability 1.
18. The means of X and Y are the same since f(x, y) = f(y, x) for all x and y. The mean of X (and themean of Y ) is
E(X) =
10
10
x(x+ y)dxdy =
10
(1
3+
y
2
)dy =
1
3+
1
4=
7
12.
Also,
E(XY ) =
10
10
xy(x+ y)dxdy =
10
(y
3+
y2
2
)dy =
1
6+
1
6=
1
3.
So,
Cov(X,Y ) =1
3
(7
12
)2= 0.00695.
4.9 Supplementary Exercises
Solutions to Exercises
1. If u 0, u
xf(x)dx u u
f(x)dx = u[1 F (u)].
Since
limu
u
xf(x)dx = E(X) =
xf(x)dx < ,
it follows that
limu
[E(X)
u
xf(x)dx
]= lim
u
u
xf(x)dx = 0.
Section 4.9. Supplementary Exercises 135
0 A b
0 A b
(i)
(ii)
0 A
(iii)
b 0 A bA/2
(iv)
Figure S.4.4: Figure for Exercise 14 of Sec. 4.8.
2. We use integration by parts. Let u = 1 F (x) and dv = dx. Then du = f(x)dx and v = x, and theintegral given in this exercise becomes
[uv]0 0
vdu =
0
xf(x)dx = E(X).
3. Let x1, x2, . . . denote the possible values of X. Since F (X) is a step function, the integral given inExercise 1 becomes the following sum:
(x1 0) + [1 f(x1)](x2 x1) + [1 f(x1) f(x2)](x3 x2) + = x1f(x1) + x2 f(x2) + x3f(x3) + = E(X).
4. If X, Y , and Z each had the required uniform distribution, then
E(X + Y + Z) = E(X) + E(Y ) + E(Z) =1
2+
1
2+
1
2=
3
2.
But since X + Y + Z 1.3, this is impossible.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.
136 Chapter 4. Expectation
5. We need E(Y ) = a+ b = 0 and
Var(Y ) = a22 = 1.
Therefore, a = 1 and b = a.6. The p.d.f. h1(w) of the range W is given at the end of Sec. 3.9. Therefore,
E(W ) = n(n 1) 10
wn1(1 w)dw = n 1n+ 1
.
7. The dealers expected gain is
E(Y X) = 136
60
y0(y x)x dx dy = 3
2.
8. It follows from Sec. 3.9 that the p.d.f. of Yn is
gn(y) = n[F (y)]n1 f(y).
Here, F (y) =
y0
2xdx = y2, so
gn(y) = 2ny2n1 for 0 < y < 1.
Hence, E(Yn) =
10
y gn(y)dy =2n
2n+ 1.
9. Suppose first that r(X) is nondecreasing. Then
Pr[Y r(m)] = Pr[r(X) r(m)] Pr(X m) 12,
and
Pr[Y r(m)] = Pr[r(X) r(m)] Pr(X m) 12.
Hence, r(m) is a median of the distribution of Y . If r(X) is nonincreasing, then
Pr[Y r(m)] Pr(X m) 12
and
Pr[Y r(m)] Pr(X m) 12.
10. Since m is the median of a continuous distribution,
Pr(X < m) = Pr(X > m) =1
2. Hence,
Pr(Yn > m) = 1 Pr(All X i s < m)= 1 1
2n.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.
Section 4.9. Supplementary Exercises 137
11. Suppose that you order s liters. If the demand is x < s, you will make a profit of gx cents on the xliters sold and suffer a loss of c(s x) cents on the s x liters that you do not sell. Therefore, yournet profit will be gx c(s x) = (g + c)x cs. If the demand is x s, then you will sell all s litersand make a profit of gs cents. Hence, your expected net gain is
E =
s0[(g + c)x cs]f(x)dx+ gs
s
f(x)dx
=
s0(g + c)x f(x)dx csF (s) + gs[1 F (s)].
To find the value of s that maximizes E, we find, after some calculations, that
dE
ds= g (g + c) F (s).
Thus, dEds = 0 and E is maximized when s is chosen so that F (s) = g/(g + c).
12. Suppose that you return at time t. If the machine has failed at time x t, then your cost is c(t x).If the machine has net yet failed (x > t), then your cost is b. Therefore, your expected cost is
E =
t0c(t x)f(x)dx+ b
t
f(x)dx = ctF (t) c t0xf(x)dx+ b[1 F (t)].
Hence,
dE
dt= cF (t) bf(t).
and E will be maximized at a time t such that cF (t) = bf(t).
13. E(Z) = 5(3) 1 + 15 = 29 in all three parts of this exercise. Also,
Var(Z) = 25Var(X) + Var(Y ) 10Cov(X,Y ) = 109 10Cov(X,Y ).
Hence, Var(Z) = 109 in parts (a) and (b). In part (c),
Cov(X,Y ) = XY = (.25)(2)(3) = 1.5
so Var(Z) = 94.
14. In this exercise,n
j=1
yj = xn x0. Therefore,
Var(Y n) =1
n2Var(Xn X0).
Since Xn and X0 are independent,
Var(Xn X0) = Var(Xn) + Var(X0).
Hence, Var(Y n) =22
n2.
Copyright 2012 Pearson Education, Inc. Publishing as Addison-Wesley.