Chapter #7 – Properties of Expectation 1 Question #4: Let πππ (π₯, π¦) = π¦ when 0 < π¦ < 1 and 0 < π₯ < π¦ and πππ (π₯, π¦) = 0 otherwise. (a) Verify that πππ (π₯, π¦) is a density function, (b) find πΈ[ππ], (c) find πΈ[π], (d) find πΈ[π], and (e) compute the covariance between π and π given by πΆππ£(π, π). 1 1 π₯ π¦ π¦1 a) We must show that 1 = ∫0 ∫0 1 ππ₯ππ¦ = ∫0 [π¦] ππ¦ = ∫0 1 ππ¦ = [π¦]10 = 1. π¦ 0 b) From Proposition 2.1, we know that if the random variables π and π have the joint ∞ ∞ density function πππ (π₯, π¦), then πΈ(π(π, π)) = ∫−∞ ∫−∞ π(π₯, π¦)πππ (π₯, π¦) ππ₯ππ¦. Here we 1 π¦ are given π(π₯, π¦) = π₯π¦, so we have that πΈ(ππ) = ∫0 ∫0 π(π₯, π¦)πππ (π₯, π¦) ππ₯ππ¦ = 1 π¦ π₯π¦ ∫0 ∫0 π¦ 1 π¦ 1 1 1 1 π¦ 1 1 ππ₯ππ¦ = ∫0 ∫0 π₯ ππ₯ππ¦ = 2 ∫0 [π₯ 2 ]0 ππ¦ = 2 ∫0 π¦ 2 ππ¦ = 6 [π¦ 3 ]10 = 6. 1 π¦π₯ c) We are now given that π(π₯, π¦) = π₯, so we can calculate πΈ(π) = ∫0 ∫0 1 1 π₯2 π¦ 1 π¦2 1 ∫ [ ] ππ¦ = 2 ∫0 2 0 π¦ π¦ 0 1 1 1 π¦ ππ₯ππ¦ = 1 ππ¦ = 2 ∫0 π¦ ππ¦ = 4 [π¦ 2 ]10 = 4. 1 π¦π¦ d) We have π(π₯, π¦) = π¦, so πΈ(π) = ∫0 ∫0 1 1 π¦ 1 1 ππ₯ππ¦ = ∫0 [π₯]0 ππ¦ = ∫0 π¦ ππ¦ = 2 [π¦ 2 ]10 = 2. π¦ e) To derive a computational formula, we have πΆππ£(π, π) = πΈ[(π − πΈ(π)(π − πΈ(π)] = πΈ[ππ − ππΈ(π) − ππΈ(π) + πΈ(π)πΈ(π)] = πΈ(ππ) − πΈ(π)πΈ(π) − πΈ(π)πΈ(π) + πΈ(π)πΈ(π) = πΈ(ππ) − πΈ(π)πΈ(π). We therefore see that for these random variables 1 1 1 1 1 πΆππ£(π, π) = πΈ(ππ) − πΈ(π)πΈ(π) = 6 − (4) (2) = 6 − 8 = 8−6 48 2 1 = 48 = 24. Question #5: The county hospital is located at the center of a square whose sides are 3 miles wide. If an accident occurs within this square, then the hospital sends out an ambulance. The road network is rectangular, so the travel distance from the hospital, whose coordinates are (0,0) to the point (π₯, π¦) is |π₯| + |π¦|. If an accident occurs at a point that is uniformly distributed in the square, find the expected travel distance of the ambulance. ο· We first let π = |π| + |π|, so we would like to compute πΈ(π). Since the sides of the 3 3 3 3 square have length 3, we have that − 2 < π < 2 and − 2 < π < 2, which implies that |π| < 3 2 3 3 3 and |π| < 2. Finally, note that π, π~πππΌπΉ(− 2 , 2). Therefore, we have that 3/2 πΈ(π) = πΈ(|π| + |π|) = πΈ(|π|) + πΈ(|π|) = ∫−3/2 (3 2 3/2 π₯ 2 ∫0 3/2 π¦ ππ₯ + 2 ∫0 3 π₯2 ππ¦ = 2 [ 6 ] 3 3/2 0 π¦2 3/2 + 2[ 6 ] 0 3/2 π₯ 3 2 ) ππ₯ + ∫−3/2 (3 −(− ) 9 2 9 36 π¦ 3 2 ) ππ¦ = −(− ) 3 = 2 (24) + 2 (24) = 24 = 2. Question #6: A fair die is rolled 10 times. Calculate the expected sum of the 10 rolls. ο· We have a sum π of 10 independent random variables ππ . We therefore have that 1 1 10 10 10 πΈ(π) = πΈ(∑10 π=1 ππ ) = ∑π=1 πΈ(ππ ) = ∑π=1 [1 ∗ 6 + β― + 6 ∗ 6] = ∑π=1 21 6 21 = 10 ( 6 ) = 35. We could also have found this from noting that πΈ(ππ ) = 3.5 for all π = 1,2, … ,10, so 10 that πΈ(π) = ∑10 π=1 πΈ(ππ ) = ∑π=1 3.5 = 10(3.5) = 35. Question #9: A total of π balls, numbered 1 through π, are put into π urns, also numbered 1 through π in such a way that ball π is equally likely to go into any of the urns 1,2, … , π. Find (a) the expected number of urns that are empty; (b) probability none of the urns is empty. a) Let π be the number of empty urns and define an indicator variable ππ = 1 if urn π is empty and ππ = 0 otherwise. We must find the expected value of this indicator random variable, which is simply the probability that it is one: πΈ(ππ ) = π(ππ = 1). Since a ball can land in any of the π urns with equal probability, the probability that 1 the ith ball will not land in urn π is (1 − π ). Similarly, the probability that the i + 1st 1 ball will not land in urn π is (1 − π+1). Using this reasoning, we calculate that πΈ(ππ ) = 1 1 1 1 π(ππ = 1) = (1 − π ) (1 − π+1) (1 − π+2) … (1 − π) = ( π−1 π π ) (π+1) … ( π−1 π )= can then use this to calculate the πΈ(π) = πΈ(∑ππ=1 ππ ) = ∑ππ=1 πΈ(ππ ) = 1 π 1 1 π(π−1) π π ∑ππ=1 π − 1 = ∑π−1 π=0 π = ( 2 )= π−1 . We π π−1 ∑ππ=1 π = π−1 2 . b) For all of the urns to have at least one ball in them, the nth ball must be dropped into 1 the nth urn, which occurs with probability π. Similarly, the n – 1st ball must be dropped into the n – 1st urn, which has a probability of 1 1 1 , and so on. We can therefore π−1 1 1 1 calculate that π(ππ ππππ‘π¦ π’πππ ) = (π) (π−1) … (2) (1) = π!. Question #11: Consider π independent flips of a coin having probability π of landing on heads. Say that a changeover occurs whenever an outcome differs from the one preceding it. For instance, if π = 5 and the outcome is π»π»ππ»π, then there are 3 changeovers. Find the expected number of changeovers. Hint: Express the number of changeovers as the sum of a total of π − 1 Bernoulli random variables. ο· Let ππ = 1 if a changeover occurs on the ith flip and ππ = 0 otherwise. Thus, πΈ(ππ ) = π(ππ = 1) = π(π − 1 ππ π», π ππ π) + π(π − 1 ππ π, π ππ π») = π(1 − π) + (1 − π)π = 2π(1 − π) whenever π ≥ 2. If we let π denote the number of changeovers, then we have that πΈ(π) = πΈ(∑ππ=2 ππ ) = ∑ππ=2 πΈ(ππ ) = ∑ππ=2 2π(1 − π) = 2(π − 1)(1 − π)π. Question #20: In an urn containing π balls, the ith ball has weight π(π), π = 1, … , π. The balls are removed without replacement, one at a time, according to: At each selection, the probability that a given ball in the urn is chosen is equal to its weight divided by the sum of the weights remaining in the urn. For instance, if at some time π1 , … , ππ is the set of balls remaining in the urn, then the next selection will be ππ with probability ∑π π(ππ ) π=1 π(ππ ) , π = 1, … , π. Compute the expected number of balls that are withdrawn before ball number 1 is removed. ο· Let ππ = 1 if ball π is removed before ball 1 and ππ = 0 otherwise. Then we see that π(π) πΈ(∑π≠1 ππ ) = ∑π≠1 πΈ(ππ ) = ∑π≠1 π(ππ = 1) = ∑π≠1 π(π)+π(1). Question #33: If πΈ(π) = 1 and πππ(π) = 5, find (a) πΈ[(2 + π)2 ], and (b) πππ(4 + 3π). a) We calculate that the πΈ[(2 + π)2 ] = πΈ(4 + 4π + π 2 ) = πΈ(4) + 4πΈ(π) + πΈ(π 2 ) = 4 + 4(1) + πππ(π) + [πΈ(π)]2 = 4 + 4 + 5 + 12 = 14, which can calculate using the identity that πππ(π) = πΈ(π 2 ) − [πΈ(π)]2. b) πππ(4 + 3π) = πππ(3π) = 32 πππ(π) = 9(5) = 45. Question #38: If the joint density πππ (π₯, π¦) = 2π −2π₯ π₯ when 1 ≤ π₯ < ∞ and 0 ≤ π¦ ≤ π₯ and πππ (π₯, π¦) = 0 otherwise, compute πΆππ£(π, π). ο· Since πΆππ£(π, π) = πΈ(ππ) − πΈ(π)πΈ(π), we must compute the following: ∞ π₯ o πΈ(ππ) = ∫0 ∫0 π₯π¦ ∗ ∞ 1 2π −2π₯ π₯ 1 2 ∞ π₯ ∞ ∫0 π₯ 2 π −2π₯ ππ₯ = (2) (2) ∫0 π‘ 2 π −π‘ ππ‘ = π₯ 2π −2π₯ o Since ππ (π₯) = ∫0 π₯ ∞ ππ¦ππ₯ = ∫0 ∫0 2π¦ π −2π₯ ππ¦ππ₯ = ∫0 [π¦ 2 π −2π₯ ]0π₯ ππ₯ = Γ(3) 8 1 = 4. π₯ 1 ππ¦ = 2π −2π₯ , we have πΈ(π) = ∫0 2π₯π −2π₯ ππ₯ = 2 by doing 1 integration by parts with π’ = π₯, ππ£ = 2π −2π₯ so that ππ’ = 1ππ₯, π£ = − 2 π −2π₯ . ∞ ∞ o πΈ(π) = ∫0 ∫π¦ 2π¦ ∗ ∞ ∫0 π₯π −2π₯ ο· ππ₯ = π −2π₯ π₯ ∞ π‘ −π‘ ∫ π 2 0 2 1 ∞ π₯ ππ₯ππ¦ = ∫0 ∫0 2π¦ ∗ ππ‘ = Γ(2) 4 π −2π₯ π₯ ∞ π¦ 2 π −2π₯ ππ₯ππ¦ = ∫0 [ 1 π₯ = 4 with π‘ = 2π₯ and ππ‘ = 2ππ₯. 1 1 1 1 1 1 Thus, πΆππ£(π, π) = πΈ(ππ) − πΈ(π)πΈ(π) = (4) − (2) (4) = 4 − 8 = 8. π₯ ] ππ¦ = 0 Question #41: A pond contains 100 fish, of which 30 are carp. If 20 fish are caught, what are the mean and variance of the number of carp among the 20? ο· Let π denote the number of carp caught of the 20 fish caught. We assume that each of the πΆ(100,20) ways to catch 20 fish from 100 are equally likely, so it is clear that π~π»πππΊ(π = 20, π = 100, π = 30). This implies that πΈ(π) = πππ(π) = ππ (π−1)(π−1) π [ π−1 +1− ππ π 19∗29 ] = 6( 99 + 5) = ππ π = 20∗30 100 = 6, while 112 33 . Question #22: Suppose that π1, π2 and π3 are independent Poisson random variables with respective parameters π1 , π2 and π3 . Let π = π1 + π2 and π = π2 + π3 . Calculate (a) πΈ(π) and πΈ(π), and (b) πΆππ£(π, π). a) πΈ(π) = πΈ(π1 + π2 ) = πΈ(π1 ) + πΈ(π2 ) = π1 + π2 and πΈ(π) = πΈ(π2 + π3 ) = π2 + π3 since whenever a random variable π~πππΌπ(π), we have that πΈ(π) = πππ(π) = π. b) πΆππ£(π, π) = πΆππ£(π1 + π2 , π2 + π3 ) = πΆππ£(π1 , π2 ) + πΆππ£(π1 , π3 ) + πΆππ£(π2 . π2 ) + πΆππ£(π2 , π3 ) = 0 + 0 + πππ(π2 ) + 0 = π2 since the three random variables are independent (implying that their covariance is zero) and πΆππ£(π, π) = πππ(π).