Every problem in the chapter beside the book’s answer, a chapter at a time as you scroll.

Chapter 6: Expected Value and Variance

26 problems · 0 figures

Exercise 6.2.1 §6.2 source ↗

A number is chosen at random from the set S={−1,0,1}⁠. Let X be the number chosen. Find the expected value, variance, and standard deviation of X⁠.

Answer

E(X)=0⁠, V(X)=23⁠, σ=D(X)=23⁠.

Exercise 6.2.3 §6.2 source ↗

You place a 1-dollar bet on the number 17 at Las Vegas, and your friend places a 1-dollar bet on black (see Exercises 1.1.6 and 1.1.7). Let X be your winnings and Y be her winnings. Compare E(X)⁠, E(Y)⁠, and V(X)⁠, V(Y)⁠. What do these computations tell you about the nature of your winnings if you and your friend make a sequence of bets, with you betting each time on a number and your friend betting on a color?

Exercise 1.1.6 in the book ↗

In Las Vegas, a roulette wheel has 38 slots numbered 0, 00, 1, 2, …, 36. The 0 and 00 slots are green and half of the remaining 36 slots are red and half are black. A croupier spins the wheel and throws in an ivory ball. If you bet 1 dollar on red, you win 1 dollar if the ball stops in a red slot and otherwise you lose 1 dollar. Write a program to find the total winnings for a player who makes 1000 bets on red.

Exercise 1.1.7 in the book ↗

Another form of bet for roulette is to bet that a specific number (say 17) will turn up. If the ball stops on your number, you get your dollar back plus 35 dollars. If not, you lose your dollar. Write a program that will plot your winnings when you make 500 plays of roulette at Las Vegas, first when you bet each time on red (see Exercise 6), and then for a second visit to Las Vegas when you make 500 plays betting each time on the number 17. What differences do you see in the graphs of your winnings on these two occasions?

Answer

E(X)=−119⁠, E(Y)=−119⁠, V(X)=33.21⁠, V(Y)=.99 .

Exercise 6.2.5 §6.2 source ↗

In a certain manufacturing process, the (Fahrenheit) temperature never varies by more than 2∘ from 62∘⁠. The temperature is, in fact, a random variable F with distribution PF=(60616263641/102/104/102/101/10) .

(a) Find E(F) and V(F)⁠.

(b) Define T=F−62⁠. Find E(T) and V(T)⁠, and compare these answers with those in part (a).

(c) It is decided to report the temperature readings on a Celsius scale, that is, C=(5/9)(F−32)⁠. What is the expected value and variance for the readings now?

Answer

(a) E(F)=62⁠, V(F)=1.2 .

(b) E(T)=0⁠, V(T)=1.2 .

(c) E(C)=503⁠, V(C)=1027 .

Exercise 6.2.7 §6.2 source ↗

A coin is tossed three times. Let X be the number of heads that turn up. Find V(X) and D(X)⁠.

Answer

V(X)=34⁠, D(X)=32 .

Exercise 6.2.9 §6.2 source ↗

A die is loaded so that the probability of a face coming up is proportional to the number on that face. The die is rolled with outcome X⁠. Find V(X) and D(X)⁠.

Answer

V(X)=34⁠, D(X)=253 .

Exercise 6.2.11 §6.2 source ↗

A number is chosen at random from the integers 1, 2, 3, …, n⁠. Let X be the number chosen. Show that E(X)=(n+1)/2 and V(X)=(n−1)(n+1)/12⁠. Hint: The following identity may be useful: 12+22+⋯+n2=(n)(n+1)(2n+1)6 .

Answer

E(X)= (1+2+⋯+n)/n= (n+1)/2⁠. V(X)=(12+22+⋯+n2)/n−(E(X))2=(n+1)(2n+1)/6−(n+1)2/4=(n+1)(n−1)/12.

Exercise 6.2.13 §6.2 source ↗

Peter and Paul play Heads or Tails (see Example 1.4). Let Wn be Peter’s winnings after n matches. Show that E(Wn)=0 and V(Wn)=n⁠.

Example 1.4 in the book ↗

(Heads or Tails) For our next example, we consider a problem where the exact answer is difficult to obtain but for which simulation easily gives the qualitative results. Peter and Paul play a game called heads or tails. In this game, a fair coin is tossed a sequence of times—we choose 40. Each time a head comes up Peter wins 1 penny from Paul, and each time a tail comes up Peter loses 1 penny to Paul. For example, if the results of the 40 tosses are

THTHHHHTTHTHHTTHHTTTTHHHTHHTHHHTHHHTTTHH.

Peter’s winnings may be graphed as in Figure 1.1. Figure 1.1: Peter’s winnings in 40 plays of heads or tails.
Figure 1.1: Peter’s winnings in 40 plays of heads or tails.

Peter has won 6 pennies in this particular game. It is natural to ask for the probability that he will win j pennies; here j could be any even number from −40 to 40⁠. It is reasonable to guess that the value of j with the highest probability is j=0⁠, since this occurs when the number of heads equals the number of tails. Similarly, we would guess that the values of j with the lowest probabilities are j=±40⁠.

A second interesting question about this game is the following: How many times in the 40 tosses will Peter be in the lead? Looking at the graph of his winnings (Figure 1.1), we see that Peter is in the lead when his winnings are positive, but we have to make some convention when his winnings are 0 if we want all tosses to contribute to the number of times in the lead. We adopt the convention that, when Peter’s winnings are 0, he is in the lead if he was ahead at the previous toss and not if he was behind at the previous toss. With this convention, Peter is in the lead 34 times in our example. Again, our intuition might suggest that the most likely number of times to be in the lead is 1/2 of 40, or 20, and the least likely numbers are the extreme cases of 40 or 0.

It is easy to settle this by simulating the game a large number of times and keeping track of the number of times that Peter’s final winnings are j⁠, and the number of times that Peter ends up being in the lead by k⁠. The proportions over all games then give estimates for the corresponding probabilities. The program HTSimulation carries out this simulation. Note that when there are an even number of tosses in the game, it is possible to be in the lead only an even number of times. We have simulated this game 10,000 times. The results are shown in Figures 1.2 and 1.3. These graphs, which we call spike graphs, were generated using the program Spikegraph. The vertical line, or spike, at position x on the horizontal axis, has a height equal to the proportion of outcomes which equal x⁠. Our intuition about Peter’s final winnings was quite correct, but our intuition about the number of times Peter was in the lead was completely wrong. The simulation suggests that the least likely number of times in the lead is 20 and the most likely is 0 or 40. This is indeed correct, and the explanation for it is suggested by playing the game of heads or tails with a large number of tosses and looking at a graph of Peter’s winnings. In Figure 1.4 we show the results of a simulation of the game, for 1000 tosses and in Figure 1.5 for 10,000 tosses.

In the second example Peter was ahead most of the time. It is a remarkable fact, however, that, if play is continued long enough, Peter’s winnings will continue to come back to 0, but there will be very long times between the times that this happens. These and related results will be discussed in Chapter 12.

Figure 1.1 in the book ↗

Figure 1.1: Peter’s winnings in 40 plays of heads or tails.
Figure 1.1: Peter’s winnings in 40 plays of heads or tails.

Figure 1.2 in the book ↗

Figure 1.2: Distribution of winnings.
Figure 1.2: Distribution of winnings.

Figure 1.3 in the book ↗

Figure 1.3: Distribution of number of times in the lead.
Figure 1.3: Distribution of number of times in the lead.

Figure 1.4 in the book ↗

Figure 1.4: Peter’s winnings in 1000 plays of heads or tails.
Figure 1.4: Peter’s winnings in 1000 plays of heads or tails.

Figure 1.5 in the book ↗

Figure 1.5: Peter’s winnings in 10,000 plays of heads or tails.
Figure 1.5: Peter’s winnings in 10,000 plays of heads or tails.

Answer

Let X1,…,Xn be identically distributed random variables such that P(Xi=1)=P(Xi=−1)=12 . Then E(Xi)=0⁠, and V(Xi)=1⁠. Thus Wn=∑j=1nXi⁠. Therefore E(Wn)=∑i=1nE(Xi)=0⁠, and V(Wn)=∑i=1nV(Xi)=n⁠.

Exercise 6.2.15 §6.2 source ↗

Suppose that n people have their hats returned at random. Let Xi=1 if the i⁠th person gets his or her own hat back and 0 otherwise. Let Sn=∑i=1nXi⁠. Then Sn is the total number of people who get their own hats back. Show that

(a) E(Xi2)=1/n⁠.

(b) E(Xi⋅Xj)=1/n(n−1) for i≠j⁠.

(c) E(Sn2)=2 (using (a) and (b)).

(d) V(Sn)=1⁠.

Answer

(a) PXi=(01n−1n1n)⁠. Therefore, E(Xi)2=1/n for i≠j⁠.

(b) PXiXj= (011−1n(n−1)1n(n−1)) for i≠j .

Therefore, E(XiXj)=1n(n−1) .

(c) E(Sn)2=∑iE(Xi)2+∑i∑j≠iE(XiXj)=n⋅1n+n(n−1)⋅1n(n−1)=2 . (d) V(Sn)=E(Sn)2−E(Sn)2=2−(n⋅(1/n))2=1 .

Exercise 6.2.16 §6.2 source ↗

Let Sn be the number of successes in n independent trials. Use the program BinomialProbabilities (Section 3.2) to compute, for given n⁠, p⁠, and j⁠, the probability P(−jnpq<Sn−np<jnpq) .

(a) Let p=.5⁠, and compute this probability for j=1⁠, 2, 3 and n=10⁠, 30, 50. Do the same for p=.2⁠.

(b) Show that the standardized random variable Sn∗=(Sn−np)/npq has expected value 0 and variance 1. What do your results from (a) tell you about this standardized quantity Sn∗⁠?

Answer

(a) For p=.5⁠: k12310.656.979.998N30.638.957.99950.678.967.997 For p=.2⁠: k12310.772.967.994N30.749.964.99750.629.951.997 (b) Use Exercise 12 and the fact that E(Sn)=np and V(Sn)=npq⁠. The two examples in (a) suggests that the probability that the outcome is within k standard deviations is approximately the same for different values of p⁠. We shall see in Chapter 9 that the Central Limit Theorem explains why this is true.

Exercise 6.2.19 §6.2 source ↗

Let X be a random variable taking on values a1⁠, a2⁠, …, ar with probabilities p1⁠, p2⁠, …, pr and with E(X)=μ⁠. Define the spread of X as follows: σ‾=∑i=1r|ai−μ|pi . This, like the standard deviation, is a way to quantify the amount that a random variable is spread out around its mean. Recall that the variance of a sum of mutually independent random variables is the sum of the individual variances. The square of the spread corresponds to the variance in a manner similar to the correspondence between the spread and the standard deviation. Show by an example that it is not necessarily true that the square of the spread of the sum of two independent random variables is the sum of the squares of the individual spreads.

Answer

Let X1⁠, X2 be independent random variables with pX1=pX2=(−111212) . Then pX1+X2=(−202141214) . Then σ‾X1=σ‾X2=1,σ‾X1+X2=1 . Therefore V(X1+X2)=1≠V(X1)+V(X2)=2 , and σ‾X1+X2=1≠σ‾X1+σ‾X2=2 .

Exercise 6.2.21 §6.2 source ↗

Let X be a random variable with E(X)=μ and V(X)=σ2⁠. Show that the function f(x) defined by f(x)=∑ω(X(ω)−x)2p(ω) has its minimum value when x=μ⁠.

Answer

f′(x)=−∑ω2(X(ω)−x)p(ω)=−2∑ωX(ω)p(ω)+2x∑ωp(ω)=−2μ+2x . Thus x=μ is a critical point. Since f′′(x)≡2⁠, we see that x=μ is the minimum point.

Exercise 6.2.23 §6.2 source ↗

If X and Y are any two random variables, then the covariance of X and Y is defined by Cov⁠(X,Y)= E((X−E(X))(Y−E(Y)))⁠. Note that Cov⁠(X,X)=V(X)⁠. Show that, if X and Y are independent, then Cov⁠(X,Y)=0⁠; and show, by an example, that we can have Cov⁠(X,Y)=0 and X and Y not independent.

Answer

If X and Y are independent, then Cov⁡(X,Y)=E(X−E(X))⋅E(Y−E(Y))=0 . Let U have distribution pU=(0π/2π3π/21/41/41/41/4) . Then let X=cos⁡(U) and Y=sin⁡(U)⁠. X and Y have distributions pX=(10−101/41/41/41/4) , pY=(010−11/41/41/41/4) . Thus E(X)=E(Y)=0 and E(XY)=0⁠, so Cov⁡(X,Y)=0⁠. However, since sin2⁡(x)+cos2⁡(x)=1⁠, X and Y are dependent.

Exercise 6.2.25 §6.2 source ↗

(Lamperti (Private communication.)) An urn contains exactly 5000 balls, of which an unknown number X are white and the rest red, where X is a random variable with a probability distribution on the integers 0, 1, 2, …, 5000.

(a) Suppose we know that E(X)=μ⁠. Show that this is enough to allow us to calculate the probability that a ball drawn at random from the urn will be white. What is this probability?

(b) We draw a ball from the urn, examine its color, replace it, and then draw another. Under what conditions, if any, are the results of the two drawings independent; that is, does P(white,white)=P(white)2 ?

(c) Suppose the variance of X is σ2⁠. What is the probability of drawing two white balls in part (b)?

Answer

(a) The expected value of X is μ=E(X)=∑i=15000iP(X=i) . The probability that a white ball is drawn is P(white ball is drawn)=∑i=1nP(X=i)i5000 . Thus P(white ball is drawn)=μ5000 . (b) To have P(white,white)= P(white)2 we must have ∑i=15000(i5000)2P(X=i)=(∑i=1ni5000P(X=i))2 . But this would mean that E(X2)=E(X)2⁠, or V(X)=0⁠. Thus we will have independence only if X takes on a specific value with probability 1.

(c) From (b) we see that P(white,white)=150002E(X2) . Thus V(X)=(σ2+μ2)50002 .

Exercise 6.2.27 §6.2 source ↗

Referring to Exercise 6.1.30, find the variance for the number of boxes of Wheaties bought before getting half of the players’ pictures and the variance for the number of additional boxes needed to get the second half of the players’ pictures.

Exercise 6.1.30 in the book ↗

Assume that, every time you buy a box of Wheaties, you receive a picture of one of the n players for the New York Yankees (see Exercise 3.2.34). Let Xk be the number of additional boxes you have to buy, after you have obtained k−1 different pictures, in order to obtain the next new picture. Thus X1=1⁠, X2 is the number of boxes bought after this to obtain a picture different from the first pictured obtained, and so forth.

(a) Show that Xk has a geometric distribution with p=(n−k+1)/n⁠.

(b) Simulate the experiment for a team with 26 players (25 would be more accurate but we want an even number). Carry out a number of simulations and estimate the expected time required to get the first 13 players and the expected time to get the second 13. How do these expectations compare?

(c) Show that, if there are 2n players, the expected time to get the first half of the players is 2n(12n+12n−1+⋯+1n+1) , and the expected time to get the second half is 2n(1n+1n−1+⋯+1) .

(d) In Example 6.11 we stated that 1+12+13+⋯+1n∼log⁡n+.5772+12n . Use this to estimate the expression in (c). Compare these estimates with the exact values and also with your estimates obtained by simulation for the case n=26⁠.

Exercise 3.2.34 in the book ↗

Assume that every time you buy a box of Wheaties, you receive one of the pictures of the n players on the New York Yankees. Over a period of time, you buy m≥n boxes of Wheaties.

(a) Use Theorem 3.8 to show that the probability that you get all n pictures is
1−(n1)(n−1n)m+(n2)(n−2n)m−⋯+(−1)n−1(nn−1)(1n)m.
Hint: Let Ek be the event that you do not get the k⁠th player’s picture.

(b) Write a computer program to compute this probability. Use this program to find, for given n⁠, the smallest value of m which will give probability ≥.5 of getting all n pictures. Consider n=50⁠, 100, and 150 and show that m=nlog⁡n+nlog⁡2 is a good estimate for the number of boxes needed. (For a derivation of this estimate, see Feller. (W. Feller, Introduction to Probability Theory and its Applications, vol. I, 3rd ed. (New York: John Wiley & Sons, 1968), p. 106.))

Theorem 3.8 in the book ↗

Let P be a probability distribution on a sample space Ω⁠, and let {A1, A2, …, An} be a finite set of events. Then P(A1∪A2∪⋯∪An)=∑i=1nP(Ai) −∑1≤i<j≤nP(Ai∩Aj)

                                                         +∑1≤i<j<k≤nP(Ai∩Aj∩Ak)−⋯ .

That is, to find the probability that at least one of n events Ai occurs, first add the probability of each event, then subtract the probabilities of all possible two-way intersections, add the probability of all three-way intersections, and so forth. Proof. If the outcome ω occurs in at least one of the events Ai⁠, its probability is added exactly once by the left side of Equation 3.3. We must show that it is added exactly once by the right side of Equation 3.3. Assume that ω is in exactly k of the sets. Then its probability is added k times in the first term, subtracted (k2) times in the second, added (k3) times in the third term, and so forth. Thus, the total number of times that it is added is (k1)−(k2)+(k3)−⋯(−1)k−1(kk) . But 0=(1−1)k=∑j=0k(kj)(−1)j=(k0)−∑j=1k(kj)(−1)j−1 . Hence, 1=(k0)=∑j=1k(kj)(−1)j−1 . If the outcome ω is not in any of the events Ai⁠, then it is not counted on either side of the equation.

Equation 3.3 in the book ↗

                                                         +∑1≤i<j<k≤nP(Ai∩Aj∩Ak)−⋯ .

Example 6.11 in the book ↗

We start keeping snowfall records this year and want to find the expected number of records that will occur in the next n years. The first year is necessarily a record. The second year will be a record if the snowfall in the second year is greater than that in the first year. By symmetry, this probability is 1/2. More generally, let Xj be 1 if the j⁠th year is a record and 0 otherwise. To find E(Xj)⁠, we need only find the probability that the j⁠th year is a record. But the record snowfall for the first j years is equally likely to fall in any one of these years, so E(Xj)=1/j⁠. Therefore, if Sn is the total number of records observed in the first n years, E(Sn)=1+12+13+⋯+1n . This is the famous divergent harmonic series. It is easy to show that E(Sn)∼log⁡n as n→∞⁠. A more accurate approximation to E(Sn) is given by the expression log⁡n+γ+12n , where γ denotes Euler’s constant, and is approximately equal to .5772.

Therefore, in ten years the expected number of records is approximately 2.9298⁠; the exact value is the sum of the first ten terms of the harmonic series which is 2.9290.

Answer

The number of boxes needed to get the j’th picture has a geometric distribution with p=(2n−k+1)2n . Thus V(Xj)=2n(k−1)(2n−k+1)2 . Therefore, for a team of 26 players the variance for the number of boxes needed to get the first half of the pictures would be ∑k=11326(k−1)(26−k+1)2=7.01 , and to get the second half would be ∑k=142626(k−1)(26−k+1)2=979.23 . Note that the variance for the second half is much larger than that for the first half.

Exercise 6.3.1 §6.3 source ↗

Let X be a random variable with range [−1,1] and let fX(x) be the density function of X⁠. Find μ(X) and σ2(X) if, for |x|<1⁠,

(a) fX(x)=1/2⁠.

(b) fX(x)=|x|⁠.

(c) fX(x)=1−|x|⁠.

(d) fX(x)=(3/2)x2⁠.

Answer

(a) μ=0⁠, σ2=1/3

(b) μ=0⁠, σ2=1/2

(c) μ=0⁠, σ2=3/5

(d) μ=0⁠, σ2=3/5

Exercise 6.3.3 §6.3 source ↗

The lifetime, measure in hours, of the ACME super light bulb is a random variable T with density function fT(t)=λ2te−λt⁠, where λ=.05⁠. What is the expected lifetime of this light bulb? What is its variance?

Answer

μ=40⁠, σ2=800

Exercise 6.3.5 §6.3 source ↗

Let X be a random variable with range [−1,1] and density function fX(x)=ax2+bx+c if |x|<1 and 0 otherwise.

(a) Show that 2a/3+2c=1 (see Exercise 4).

(b) Show that 2b/3=μ(X)⁠.

(c) Show that 2a/5+2c/3=σ2(X)⁠.

(d) Find a⁠, b⁠, and c if μ(X)=0⁠, σ2(X)=1/15⁠, and sketch the graph of fX⁠.

(e) Find a⁠, b⁠, and c if μ(X)=0⁠, σ2(X)=1/2⁠, and sketch the graph of fX⁠.

Exercise 6.3.4 in the book ↗

Let X be a random variable with range [−1,1] and density function fX(x)=ax+b if |x|<1⁠.

(a) Show that if ∫−1+1fX(x)dx=1⁠, then b=1/2⁠.

(b) Show that if fX(x)≥0⁠, then −1/2≤a≤1/2⁠.

(c) Show that μ=(2/3)a⁠, and hence that −1/3≤μ≤1/3⁠.

(d) Show that σ2(X)= (2/3)b− (4/9)a2= 1/3− (4/9)a2⁠.

Answer

(d) a=−3/2⁠, b=0⁠, c=1

(e) a=4548⁠, b=0⁠, c=316

Exercise 6.3.7 §6.3 source ↗

Let X be a random variable with density function fX⁠. Show, using elementary calculus, that the function ϕ(a)=E((X−a)2) takes its minimum value when a=μ(X)⁠, and in that case ϕ(a)=σ2(X)⁠.

Answer

f(a)= E(X−a)2= ∫(x−a)2f(x)dx . Thus f′(a)=−∫2(x−a)f(x)dx=−2∫xf(x)dx+2a∫f(x)dx=−2μ(X)+2a . Since f′′(a)=2⁠, f(a) achieves its minimum when a=μ(X)⁠.

Exercise 6.3.9 §6.3 source ↗

Let X⁠, Y⁠, and Z be independent random variables, each with mean μ and variance σ2⁠.

(a) Find the expected value and variance of S=X+Y+Z⁠.

(b) Find the expected value and variance of A=(1/3)(X+Y+Z)⁠.

(c) Find the expected value of S2 and A2⁠.

Answer

(a) 3μ⁠, 3σ2

(b) E(A)=μ⁠, V(A)=σ23

(c) E(S2)=3σ2+9μ2⁠, E(A2)=σ23+μ2

Exercise 6.3.11 §6.3 source ↗

The Pilsdorff Beer Company runs a fleet of trucks along the 100 mile road from Hangtown to Dry Gulch. The trucks are old, and are apt to break down at any point along the road with equal probability. Where should the company locate a garage so as to minimize the expected distance from a typical breakdown to the garage? In other words, if X is a random variable giving the location of the breakdown, measured, say, from Hangtown, and b gives the location of the garage, what choice of b minimizes E(|X−b|)⁠? Now suppose X is not distributed uniformly over [0,100]⁠, but instead has density function fX(x)=2x/10,000⁠. Then what choice of b minimizes E(|X−b|)⁠?

Answer

In the case that X is uniformly distributed on [0,100]⁠, one finds that E(|X−b|)=1200(b2+(100−b)2) , which is minimized when b=50⁠.

When fX(x)=2x/10,000⁠, one finds that E(|X−b|)=2003−b+b315000 , which is minimized when b=502⁠.

Exercise 6.3.13 §6.3 source ↗

Let X be a random variable that takes on nonnegative values and has distribution function F(x)⁠. Show that E(X)=∫0∞(1−F(x))dx . Hint: Integrate by parts.

Illustrate this result by calculating E(X) by this method if X has an exponential distribution F(x)=1−e−λx for x≥0⁠, and F(x)=0 otherwise.

Answer

Integrating by parts, we have E(X)=∫0∞xdF(x)=−x(1−F(x))|0∞+∫0∞(1−F(x))dx=∫0∞(1−F(x))dx . To justify this argment we have to show that a(1−F(a)) approaches 0 as a tends to infinity. To see this, we note that ∫0∞xf(x)dx=∫0axf(x)dx+∫a∞xf(x)dx≥∫0axf(x)dx+∫0aaf(x)dx=∫0axf(x)dx+a(1−F(a)) . Letting a tend to infinity, we have that E(X)≥E(X)+lima→∞⁡a(1−F(a)) . Since both terms are non-negative, the only way this can happen is for the inequality to be an equality and the limit to be 0.

To illustrate this with the exponential density, we have ∫0∞(1−F(x))dx=∫0∞e−λxdx=1λ=E(X) .

Exercise 6.3.15 §6.3 source ↗

Let X be a random variable distributed uniformly over [0,20]⁠. Define a new random variable Y by Y=⌊X⌋ (the greatest integer in X⁠). Find the expected value of Y⁠. Do the same for Z=⌊X+.5⌋⁠. Compute E(|X−Y|) and E(|X−Z|)⁠. (Note that Y is the value of X rounded off to the nearest smallest integer, while Z is the value of X rounded off to the nearest integer. Which method of rounding off is better? Why?)

Answer

E(Y)=9.5⁠, E(Z)=10⁠, E(|X−Y|)=1/2⁠, E(|X−Z|)=1/2 .

Z is better, since it has the same expected value as X and the variance is only slightly larger.

Exercise 6.3.17 §6.3 source ↗

Let X and Y be random variables. The covariance Cov(X,Y) is defined by (see Exercise 6.2.23) cov(X,Y)=E((X−μ(X))(Y−μ(Y))) .

(a) Show that cov(X,Y)=E(XY)−E(X)E(Y)⁠.

(b) Using (a), show that cov(X,Y)=0⁠, if X and Y are independent. (Caution: the converse is not always true.)

(c) Show that V(X+Y)= V(X)+ V(Y)+ 2cov(X,Y)⁠.

Exercise 6.2.23 in the book ↗

If X and Y are any two random variables, then the covariance of X and Y is defined by Cov⁠(X,Y)= E((X−E(X))(Y−E(Y)))⁠. Note that Cov⁠(X,X)=V(X)⁠. Show that, if X and Y are independent, then Cov⁠(X,Y)=0⁠; and show, by an example, that we can have Cov⁠(X,Y)=0 and X and Y not independent.

Answer

(a) Cov⁡(X,Y)=E(XY)−μ(X)E(Y)−E(X)μ(Y)+μ(X)μ(Y)=E(XY)−μ(X)μ(Y)=E(XY)−E(X)E(Y) . (b) If X and Y are independent, then E(XY)=E(X)E(Y)⁠, and so Cov⁡(X,Y)=0⁠.

(c) V(X+Y)=E(X+Y)2−(E(X+Y))2=E(X2)+2E(XY)+E(Y2)−E(X)2−2E(X)E(Y)−E(Y)2=V(X)+V(Y)+2Cov⁡(X,Y) .

Exercise 6.3.19 §6.3 source ↗

Let X and Y be independent random variables with uniform densities in [0,1]⁠. Let Z=X+Y and W=X−Y⁠. Find

(a) ρ(X,Y) (see Exercise 18).

(b) ρ(X,Z)⁠.

(c) ρ(Y,W)⁠.

(d) ρ(Z,W)⁠.

Exercise 6.3.18 in the book ↗

Let X and Y be random variables with positive variance. The correlation of X and Y is defined as ρ(X,Y)=cov(X,Y)V(X)V(Y) .

(a) Using Exercise 17(c), show that 0≤V(Xσ(X)+Yσ(Y))=2(1+ρ(X,Y)) .

(b) Now show that 0≤V(Xσ(X)−Yσ(Y))=2(1−ρ(X,Y)) .

(c) Using (a) and (b), show that −1≤ρ(X,Y)≤1 .

Exercise 6.3.17 in the book ↗

Let X and Y be random variables. The covariance Cov(X,Y) is defined by (see Exercise 6.2.23) cov(X,Y)=E((X−μ(X))(Y−μ(Y))) .

(a) Show that cov(X,Y)=E(XY)−E(X)E(Y)⁠.

(b) Using (a), show that cov(X,Y)=0⁠, if X and Y are independent. (Caution: the converse is not always true.)

(c) Show that V(X+Y)= V(X)+ V(Y)+ 2cov(X,Y)⁠.

Exercise 6.2.23 in the book ↗

If X and Y are any two random variables, then the covariance of X and Y is defined by Cov⁠(X,Y)= E((X−E(X))(Y−E(Y)))⁠. Note that Cov⁠(X,X)=V(X)⁠. Show that, if X and Y are independent, then Cov⁠(X,Y)=0⁠; and show, by an example, that we can have Cov⁠(X,Y)=0 and X and Y not independent.

Answer

(a) 0

(b) 12

(c) −12

(d) 0

Exercise *6.3.21 §6.3 source ↗

Exercise 6.3.20 in the book ↗

When studying certain physiological data, such as heights of fathers and sons, it is often natural to assume that these data (e.g., the heights of the fathers and the heights of the sons) are described by random variables with normal densities. These random variables, however, are not independent but rather are correlated. For example, a two-dimensional standard normal density for correlated random variables has the form fX,Y(x,y)=12π1−ρ2⋅e−(x2−2ρxy+y2)/2(1−ρ2) .

(a) Show that X and Y each have standard normal densities.

(b) Show that the correlation of X and Y (see Exercise 18) is ρ⁠.

Exercise 6.3.18 in the book ↗

Let X and Y be random variables with positive variance. The correlation of X and Y is defined as ρ(X,Y)=cov(X,Y)V(X)V(Y) .

(a) Using Exercise 17(c), show that 0≤V(Xσ(X)+Yσ(Y))=2(1+ρ(X,Y)) .

(b) Now show that 0≤V(Xσ(X)−Yσ(Y))=2(1−ρ(X,Y)) .

(c) Using (a) and (b), show that −1≤ρ(X,Y)≤1 .

Exercise 6.3.17 in the book ↗

Let X and Y be random variables. The covariance Cov(X,Y) is defined by (see Exercise 6.2.23) cov(X,Y)=E((X−μ(X))(Y−μ(Y))) .

(a) Show that cov(X,Y)=E(XY)−E(X)E(Y)⁠.

(b) Using (a), show that cov(X,Y)=0⁠, if X and Y are independent. (Caution: the converse is not always true.)

(c) Show that V(X+Y)= V(X)+ V(Y)+ 2cov(X,Y)⁠.

Exercise 6.2.23 in the book ↗

If X and Y are any two random variables, then the covariance of X and Y is defined by Cov⁠(X,Y)= E((X−E(X))(Y−E(Y)))⁠. Note that Cov⁠(X,X)=V(X)⁠. Show that, if X and Y are independent, then Cov⁠(X,Y)=0⁠; and show, by an example, that we can have Cov⁠(X,Y)=0 and X and Y not independent.

For correlated random variables X and Y it is natural to ask for the expected value for X given Y⁠. For example, Galton calculated the expected value of the height of a son given the height of the father. He used this to show that tall men can be expected to have sons who are less tall on the average. Similarly, students who do very well on one exam can be expected to do less well on the next exam, and so forth. This is called regression on the mean. To define this conditional expected value, we first define a conditional density of X given Y=y by fX|Y(x|y)=fX,Y(x,y)fY(y) , where fX,Y(x,y) is the joint density of X and Y⁠, and fY is the density for Y⁠. Then the conditional expected value of X given Y is E(X|Y=y)=∫abxfX|Y(x|y)dx . For the normal density in Exercise 20, show that the conditional density of fX|Y(x|y) is normal with mean ρy and variance 1−ρ2⁠. From this we see that if X and Y are positively correlated (0<ρ<1)⁠, and if y>E(Y)⁠, then the expected value for X given Y=y will be less than y (i.e., we have regression on the mean).

Answer

We have fXY(x,y)fY(y)=12π1−ρ2⋅exp⁡(−(x2−2ρxy+y2)2(1−ρ2))12π⋅exp⁡(−y22)=12π(1−ρ2)⋅exp⁡(−(x−ρy)22(1−ρ2)) which is a normal density with mean ρy and variance 1−ρ2⁠. Thus, E(X|Y=y)=∫−∞∞x12π(1−ρ2)⋅exp⁡(−(x−ρy)22(1−ρ2))dx=ρy∫−∞∞12π(1−ρ2)⋅exp⁡(−(x−ρy)2)={ρy<y,if 0<ρ<1;y,if ρ=1.

Exercise 6.3.27 §6.3 source ↗

(from Hamming (ibid., pg. 205.)) A game is played as follows: A random number X is chosen uniformly from [0,1]⁠. Then a sequence Y1,Y2,… of random numbers is chosen independently and uniformly from [0,1]⁠. The game ends the first time that Yi > X⁠. You are then paid (i−1) dollars. What is a fair entrance fee for this game?

Answer

Let Z represent the payment. Then P(Z=k|X=x)=P(Y1≤x,Y2≤x,…,Yk≤x,Yk+1>x)=xk(1−x) . Therefore, P(Z=k)=∫01xk(1−x)dx=[1k+1xk+1−1k+2xk+2]01=1k+1−1k+2=1(k+1)(k+2) . Thus, E(Z)=∑k=0∞k(1(k+1)(k+2)) , which diverges. Thus, you should be willing to pay any amount to play this game.

Loading chapter 7…

Exercises and answers are adapted from Grinstead and Snell's Introduction to Probability by The CHANCE Project, which is free to read and download, and are used under the GNU FDL licence. They are taken from the GNU version’s LaTeX source (4 July 2006), with answers from the authors’ published answers to the odd-numbered exercises, and set for the web, so they may differ slightly from the printed page. This adaptation is released under the same licence and is neither affiliated with nor endorsed by Grinstead and Snell or American Mathematical Society. Copyright (C) 2006 Peter G. Doyle. This work is a version of Grinstead and Snell's ‘Introduction to Probability, 2nd edition’, published by the American Mathematical Society, Copyright (C) 2003 Charles M. Grinstead and J. Laurie Snell.