%% Solutions to HW1, Stat 470, Spring 2006 ------------------------------------------ 1. (a) C = 0.02396067 = .02/(1-exp(-1.8)) = 1 divided by integral from 0 to 90 of C*exp(-.02*t). (b) 0.09757927 = integral from 40 to 50 of C*exp(-.02*t) = (C/.02)*(exp(-40*.02)-exp(-50*.02)) (c) 32.17697 = C* integral from 0 to 90 of t*exp(-.02*t). (d) 31.67864 (calculated two different ways to check !) ## The answer here is C* summation over t=0 to 89 of the quantity t* integral_0^t exp(-.02*x) dx. After integrating, this answer becomes, sum_{t=0}^89 C*t*exp(-.02*t)*(1-exp(-.02))/.02 = 31.67864. 2. (a) .58947, (b) .56 + .56 - (.56)^2 = .8064, 2*(.2)*(.95-.56) - (.95-.8)^2 = .1335 ### For this second part of 2b, the idea is: for each person, the prob of dying before 40 is 1-.8 = .2; the prob of dying between 30 and 60 is .95 - (.8)*(.7) = .39; the probability that person A dies before 40 and (independently) person B dies between 30 and 60 is .2*.39. But we need to add the same amount again to accopunt for A dying between 30 and 60 and B dying before 40, and also subtract the probability (.95-.8)^2 that both A and B die between 30 and 40 (in which case both people satisfy both events and we have double-counted this intersection). 3.(a) 87119/95385 = 0.91334 (b) (89870-85393)/95051 = 0.047101 (c) (94295-92315+53484)/94295 = 0.5881966 4. (a) 200*(1+i)^15 = 350, so i = .03801, i^(2) = .03766 (b) 2^(1/7)-1 = .1041 (c) 3^.1-1 = .1161 5. > uniroot(function(v) (1-v^10)/(v^(-.25)-1)-20, c(0.01,.99))$root [1] 0.857097 ### This solves for v, using Splus or R code. ### The function we are trying to set to 0 is : ### 250*v^(.25)*(1-v^10)/(1-v^(.25)) - 5000 , or equivalently ### (1-v^10)/(v^(-.25)-1) - 20. > 1/.Last.value-1 [1] 0.1667290 ### This solves for i = APR interest rate = (1/v)-1 ### Apparently many of you did not interpolate of use a root- finder to get sufficient accurancy in the interest rate. See page 15, end of Sec.1.2.1 in Chapter 1, for an indication of how to do this by linear interpolation, after finding the value of the function for many values of the interest rate. ### In particular: with f(r) defined as the difference of the two sides of the balance equation with interest rate r: > f(r) = 250*(1+r)^(-.25)*(1-(1+r)^(-10))/(1-(1+r)^(-.25)) - 5000 > f(.16) [1] 114.2578 > f(.165) [1] 28.83892 > f(.17) [1] -54.1203 ### So the interprolated interest-rate solution is > .165 + (28.83892/(28.83892+54.1203))*.005 [1] 0.1667381 ### which is remarkably close to the true value above. 6. (a) 12000/(21*(1.05^5-1)) = 2068.283 (b) 12000/(1.05^5+1.05^4+2*(1.05^3+1.05^2+1.05)) = 1316.939