Summer 2020, Statistics Midterm, Solutions ########## Question 1 ### 1.1 .056 ### 1.2 > .216+.604 [1] 0.82 ### 1.3 > .604/(.604+.056) [1] 0.9151515 ### 1.4 No. Previous two answers would have to be the same. ### 1.5 > .056 + .604 [1] 0.66 X ~ Bern(.66) E(X) = p = .66 ### 1.6 p(1-p) > .66*(1-.66) [1] 0.2244 ### 1.7 > sqrt(.2244) [1] 0.4737088 ### 1.8 > .216/(.216+.124) [1] 0.6352941 P(Y=1 | X=0) = .635 Y is more likely to be big when X is big so the move up and down together. corr = 0.3450683 ########## Question 2 ### 2.1 > .1*.12 + .9*.14 [1] 0.138 ### 2.2 > .1^2 * 5.25 + .9^2 * 9.76 + 2*.1*.9*3.063 [1] 8.50944 ### 2.3 > sqrt(8.50944) [1] 2.917094 ### 2.4 > .138 + 2*2.9*c(-1,1) [1] -5.662 5.938 ### 2.5 > pnorm(0,0.138,2.917094) [1] 0.4811341 ########## Question 3 ### 3.1 3.5 ### 3.2 12.25 ### 3.3 > sqrt(12.25) [1] 3.5 ### 3.4 .95 ### 3.5 .68 ### 3.6 .84 ########## Question 4 ### 4.1 Basically yes. Histogram has the bell shape and no obvious pattern in sequence plot. Maybe variance goes down at the end? Maybe right tail a bit heavier. ### 4.2 > .629/sqrt(107) [1] 0.06080773 ### 4.3 > .168 + 2*0.06080773*c(-1,1) [1] 0.04638454 0.28961546 ### 4.4 Huge ### 4.5 yes, 4.6 percent is still a lot different from 0. ### 4.6 > .168 + 0.06080773*c(-1,1) [1] 0.1071923 0.2288077 ### 4.7 for 95: > qnorm(.05/2) [1] -1.959964 for 68: > qnorm(.32/2) [1] -0.9944579 > for 99: > qnorm(.01/2) [1] -2.575829 so you use 2.6. > .168 + 2.6*0.06080773*c(-1,1) [1] 0.009899902 0.326100098 ### 4.8 > .168 + 2*.629*c(-1,1) [1] -1.090 1.426 ########## Question 5 ### 5.1 > 520/1000 [1] 0.52 ### 5.2 > sqrt(.52*(1-.52)/1000) [1] 0.01579873 ### 5.3 > .52 + 2*.0158*c(-1,1) [1] 0.4884 0.5516 ### 5.4 It is big in that we don't know what side of .5 we are on. It is small in that we know we are pretty close to .5. ### 5.5 > sqrt(.52*(1-.52)/9000)*2 [1] 0.01053249 To get it 3 time smaller you need the sample size 9 times bigger. ########## Question 6 ### 6.1 Yes. Pretty noisy but looks like a bit of a linear trend. ### 6.2 > 3.71340 + 0.27148*1 [1] 3.98488 ### 6.3 sigmat ~ .5 , +/1 is 1. 4 +/- 1 pretty big, which makes sense given the scatter plot. ### 6.4 > 0.27148 + 2*0.02837*c(-1,1) [1] 0.21474 0.32822 pretty small!! ### 6.5 p-val is 0 => reject ### 6.6 > 3.71340/165.119 [1] 0.02248924 ### 6.7 dy = bhat xy > 0.27148 * 2 [1] 0.54296 which is quite a bit. ### 6.8 Seems like there is strong evidence for a weak relationship given the small confidence interval for beta1 and the big sigmahat. ######### Question 7 ### 7.1 Only way to get this is if the price went up P(U)= .6 ### 7.2 would need 2 ups in a row P(UU) = .6*.6 = .36 ### 7.3 The price would have to go up by 2: P(U) = .6 ### 7.4 p: 99,102 pr: .4, .6 ### 7.5 p(UU) = .36, P2 = 104 p(DD) = .4^2 = .16, P2=98 p(DU) = .4*.6 = .24, P2 = 101 p(UD) = .4*.6 = .24, P2 = 101 p: 98, 101, 104 pr: .16, .48, .36 ### 7.6 8 possibilites for the price paths!! P(UUU) = .6^3 = .216, P3 = 106 3 ways to have 2 U and 1 D : 3*.6*.6*.4 = .432, P3 = 103 3 ways to have 2D and 1 U: 3*.4*.4*.6 = .288, P# = 100 P(DDD) = .4^3 = .064, P3 = 97 p: 97, 100, 103, 106 pr: .064, .288, .432, .216 ### 7.7 If P3 > 101 C is P3-101, otherwise it is 0 c: 0, 2, 5 p(c): .352 (.288+.064), .432, .216 p