Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Math 295 October 28, 2002 Solutions #7 Problem A. A card is drawn at random from a deck of six cards, numbered 2 through 7. Let X = the number on the selected card. a. Construct a probability function for X. a 2 3 4 5 6 7 b. What is E(X) ? E(X) = pX(a) 1/6 1/6 1/6 1/6 1/6 1/6 a P(X a) all a = (2)(1/6) + (3)(1/6) + (4)(1/6) + (5)(1/6) + (6)(1/6) + (7)(1/6) = 4.5 Problem B. Consider this experiment: Roll two three-sided dice. Use this sample space… 11 12 13 21 22 23 31 32 33 …with uniform probabilities. a. Let Y = sum of the two dice. What is E(X)? b. Let Z = absolute difference of two dice (highest minus lowest, regardless of sign, so that Z is never negative). What is E(Z)? c. Let W = Y plus Z. That is, for every s in the sample space, W is defined by W(s) = Y(s) + Z(s). What is E(W)? d. Let U = Y times Z. What is E(U)? Is it the same as E(Y)E(Z)? e. Let V = the square of the number on the first die (regardless of the second die). What is E(V)? f. Let T = Y times V. What is E(T)? Is it the same as E(Y)E(V)? Note: It might help to make one large table showing the values of Y, Z, W, U, V, and T for each outcome in the sample space. Once you have done this, is it worth the trouble to construct a pmf for each random variable, or not? See table, next page… 1 s m(s) Y (sum) 11 12 13 21 22 23 31 32 33 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 1/9 2 3 4 3 4 5 4 5 6 The random variables… Z W U V (abs =Y+Z =YZ (1st, diff) squar’d) 0 2 0 1 1 4 3 1 2 6 8 1 1 4 3 4 0 4 0 4 1 6 5 4 2 6 8 9 1 6 5 9 0 6 0 9 4 8/9 Expected val. 4 89 32/9 14/3 T =YV 2 3 4 12 16 20 36 45 54 64/3 You can get each expected value by E(X) = P(s)X(s) (where X is the random variable)… sS that is, multiply each value by 1/9 and sum them. (Of course you can add them first and then divided by 9, which is the same thing.) Note that this is not quite the same formula for E(X) as was used in the previous problem. Can you see why they always give the same result? Once we go to the trouble of building a table with all of the P(s)’s, there is no need to construct separate probability functions for each random variable. Notice that E(YZ) = E(Y) E(Z), but E(YV) E(Y) E(V). Here are the secrets: (1) If W = X + Y, then E(W) = E(X) + E(Y) always, provided only that E(X) and E(Y) exist. This is true regardless of what X and Y are, or how they are related. We’ll prove this. (2) If U = YZ, then E(U) may or may not be the same as E(Y)E(Z). We will discover when these numbers are equal. When they are not equal, we will make a big deal of the difference E(Y)E(Z) – (YZ). 2 Problem C. Y has density function 2y3 if y 1 f (y) otherwise. 0 2 0 1 a. Is this really a possible density function? The question is whether its integral is 1. Well, y 2 3 f (y)dy 2y dy 2 |y 1 1. y y1 2 So, f is really a possible density function. b. What is the cdf of Y? Calculate: y 2 a 2 f (y)dt 2 |y 1 1 a y 2 F(a) a Actually, that’s valid only for y 1 (can you see exactly where that’s required?); otherwise F(y) = 0. So the cdf is 1 y2 if y 1 F(y) otherwise. 0 2 1 0 1 c. What is P( 1 Y 2 ) ? You could do another integral, but it’s easier to notice that the event 1 Y 2 is the same as the event Y 2, so the answer is F(2) = 1 – 2-2 = 3/4. d. What is E(Y) ? From the definition, E(Y) = y y f (y)dy . Now calculate: 3 y y f (y)dy y f (y)dy y 1 y 1 y 2y 3dx 2y 2 dx y 1 (2 / y) |y 1 2 (Note: The average value of this random variable is 2. But, we just saw in part c that 3/4 of the time, Y is less than 2. This isn’t a paradox. It’s just an example of the median being different from the mean.) 0 1 2 4 k: Problem D. (Given , get expected value, variance, std.dev. of X) 1 1 1 1 p (k) : 3 3 6 6 X 1 1 1 1 E(X) = 0 3 1 3 2 6 4 6 = 4/3. E(X2) = 02 13 12 13 22 1 6 42 1 6 = 11/3. Var(X) = E(X2)- E(X)2 = 17/9. Std.Dev.(X) = V(X) = 17 /3 ~ 1.374. Problem E. (If E(X) = 100 and Var(X) = 15, then what are…) a. E(X2). Since V(X) = E(X2)-E(X)2, we must have 15 = E(X2)-10000, so E(X2) = 10015. b. E( 3X + 10 ) = 3 E(X) + 10 = 310. The key to c, d, e is to write “–X” as (–1)X. c. E(–X) = E((-1)X) = (–1)E(X) = –100. d. Var(–X) = Var((-1)X) = (–1)2V(X) = V(X) = 15. e. Std.Dev.(–X) = V(X) = 15 . OR: Std.Dev.((-1)X) = |-1|StdDev(X) = 15 . Problem F. If X has range [-1,1] and density fX(x) = (3/2)x2 in that range, then what are (X) and 2(X) ? First note: (X) is a synonym for E(X), and 2(X) is a synonym for Var(X). Now: 4 1 1 3 x 3dx 3 x |1 0. E(X) = xf (x)dx = x 3 x 2dx 2 2 2 4 x 1 x 1 x 1 x (Actually, if you graph f(x) and notice that it is symmetric around the vertical axis, it is clear that E(X) must be zero.) 5 1 1 3 x 4dx 3 x |1 3 . E(X2) = x 2f (x)dx = x 2 3 x 2dx 2 2 2 5 x 1 5 x 1 x 1 x Since E(X)=0, this means that Var(X) = E(X2) – E(X)2 = 3/5 also. 4