2016 Statistics Midterm Solutions #################### 1.1 right, right, right .763 1.2 right, left, left .129 #################### 2.1 .5+.27 = .75 2.2 0*.25+6*.5+12*.25 = 6 2.3 .25*(0-6)^2 + .5*(6-6)^2 + .25*(12-6)^2 = 18 2.4 sqrt(18) = 4.242641 #################### 3.1 B = -10 + 20 W 3.2 p, p(1-p) = .6, .24 >>> # in python !!!!! >>> import math >>> math.sqrt(.24) 0.4898979485566356 3.3 mean: -10+20*.6 = 2 or -10*.4 + 10*.6 = 2 var: 20^2 * .24 = 96 or .4*(-10-2)^2 + .6*(10-2)^2 = 96 sd: sqrt(96) = 9.797959 or 20*sqrt(.24) = 9.797959 3.4 P(b) b ---- --- .4 -10 .6 10 #################### 4.1 .06 4.2 .56+.14 = .7 4.3 .14/(.14+.06) = 0.7 4.4 p(Y=1|X=0) = .7 so they are independent. 4.4 p(Y=1|X=0) = .7 conditional=marginal so they are independent. 4.5 yes because it has outcomes 0/1. 4.6 p = .2 4.7 Var(Y) is bigger, both are Bernoulli and the p for Y is closer to .5. 4.8 No, they are independent but that are not identically distributed. #################### 5.1 .5 5.2 .95 5.3 .68 5.4 1-.05/2 = 1-.025 = .975 #################### 6.1 1-.9 = .1 6.2 .1*.8 = .08 6.3 .9*.1 = .09 6.4 .08+.09 = .17 6.5 6.2/6.4 = p(T=1,D=1)/p(T=1) = .08/.17 = .47 6.6 The prob p(T=1|D=1) is .8 which means a person with the disease only has a 80% chance of testing positive. This is not very good. Also, p(T=1|D=0) .1 which means there is a substantial chance a person without the disease will test positive. Again, not good. On the other hand, the marginal prob of having the disease is .1 but given you test positive it goes up to .47 so it does tell you something. Not a great test. #################### 7.1 It is the sum of the probs so it should be close to 1. 7.2 .1+3*.167 0.601 or you could just use 6/10, since X1 is the first one. 7.3 same as X1. .1+3*.167 7.4 .033+ .1 = .133 7.5 .1/.133 = 0.7518797