Solutions to HW2, Stat 470, Spring 2006 ======================================================= NOTE: numerical solutions to problems 5 and 6(b)-(c) hsve been corrected, as of 2/24/06. ======================================================== 1. ( (1+.05/4)^(4*4) * (1-.03/2)^(-2*5) )^(1/9) - 1 [1] 0.03964303 2. The equation to solve is B(t+1) = 1.06*B(t) - .015*B(t), since the interest earned between t and t+1 is .06*B(t) and 1/4 of this must be paid back. Thus B(t+1)=1.045*B(t) and we can see that B(9) = 1.045^9 *B(0) and the effective APR is i = .045. Thus, in this instance, the taxable investment in problem 1 is better. 3. > lx <- c(1000,850,800,760,700,620,520,400,250,75,0) px <- c(-diff(lx)/1000,0) Unconditional expectations: > sum(1000*(10-(0:10))*px) [1] 5025 > sum(10000*(1.04^(-(1:11)))*px) [1] 7965.06 Conditional expectations: > sum(1000*(10-(3:10))*px[4:11])/(lx[4]/1000) [1] 3625 > sum(10000*(1.04^(-(4:11)))*px[4:11])/(lx[4]/1000) [1] 7506.415 4. In this problem we can integrate t times f(t) = 3(t-39)^(-4) to get an approximate answer (but note that there is a tiny (= (90-39)^(-3) = 7.539e-06) probability left that a population member must be killed off instantanteously at 90), ie, f(t) integrates only to 1-7.539e-6. A way to avoid this difficulty is to use the formulas E(T) = int_0^omega S(t) dt or E(T-x | T>=x) = int_x^omega S(t) dt/S(x). (a) (S(60)-S(80))/S(50) = .1244 (b) The formula for expectations we have been using gives: > integrate(function(t) 3*t*(t-39)^(-4),60,90)$val*(60-39)^3 [1] 62.43639 ## To be 100% precise, we must add to this 90 times the conditional ## probability of being killed off just at the 90th birthday: > 7.538579e-06*90*(60-39)^3 [1] 6.2833 ### So exact answer is 68.71972, which can be obtained ### directly, using the formula given above, as: 60 + (60-39)^3 * int_60^90 (t-39)^(-3) dt = 60 + (60-39)^3 * 0.5*((60-39)^(-2)-(90-39)^(-2)) = 68.72 (c) The conditional probabilities for whole-number ages at death z=60,61,...,89 are (S(z)-S(z+1))/S(60), with the probability for 90 given by S(90)/S(60), so we get the answer : > (sum((60:89)*(-diff(((60:90)-39)^(-3)))) + 90*((90-39)^(-3)))*(60-39)^3 [1] 68.26618 ### The exact formula, analogous to the one above but now ### gotten via summation (rather than integration) by parts, is ### 60 + summation from 61 to 90 of S(z)/S(60), = > 60 + sum(((61:90)-39)^(-3))*(60-39)^3 [1] 68.26618 5. (a) Integral of r(t) from 0 to 10 is sum of integrals from 0 to 5 and from 5 to 10, = .01*(5*5-.1*25) + .01*(2*5 + .2*(10^2-5^2)) = 0.475 ## So the balance after the 10 years is 10000 multiplied by > exp(0.475) [1] 1.608014 ### and to find internal rate of return, equate this to (1+i)^10 ### so i = > 1.608014^.1-1 [1] 0.048646 (b) Accumulation factors (= balance to which $1 accumulates) are: from 0 to 3, exp(.01*(5*3-.1*9)) = 1.151425 from 0 to 6, exp(.01*(5*5-.1*25)+.01*(2*1+.2*(6^2-5^2))) = 1.306040 from 0 to 10, 1.608014 as found above. ### So the answer to this problem is: > 2000*1.608014 + 2000*1.608014/1.151425 + 2000*1.608014/1.306040 [1] 8471.54 (c) Take answer to (b) and subtract the amount accumulated by $400 over the last 5 years, ie subtract > 400*exp(.01*(2*5+.2*(10^2-5^2))) ### = 513.6102 ## So answer in (c) is 8471.54-513.61 = 7957.93 6. (a) Integrate D(t)*(1.08^(10-t)) from 0 to 10 to get > (1/log(1.08))*(3000*(1.08-sqrt(1.08))+2000*(sqrt(1.08)-1))* (1.08^10-1)/.08 [1] 37791.33 ### Compare this with 2500 deposited per year, which is the ### average, compounded from times .5, 1.5, ..., 9.5, or ### 2500*sqrt(1.08)*(1.08^10-1)/.08 = 37637.19 (b) Accumulation factor as function of time is A(t) = exp(.01*(6*t+.25*t^2)). So answer involves integrals of this, which must be numerical, making the whole problem messier > Dfcn <- function(t) ifelse (t-floor(t) < .5, 3, 2) > integrate(function(t) Dfcn(t)/exp(.01*(6*t+.25*t^2)),0,10, subdivision=500)$val* exp(.01*(60+25))*1000 [1] 41232.23 (c) Subtract from (a), 500*sqrt(1.08)*(1.08^10-1)/.08 = 7527.439 So new answer for case (a) is 37791.33-7527.44 = 30263.89 Subtract from (b) > 500*exp(.06*10+.0025*10^2)*sum(exp(-.06*seq(.5,9.5,1)- .0025*seq(.5,9.5,1)^2)) [1] 8212.315