Suggested solutions to DHW textbook exercisesExercise 2.1 (a) The probability that a newborn life dies before age 60 is given by Pr[T 0 ≤ 60] = F 0 (60) = 1−(1−60/105) 1/5 = 1−(45/105) 1/5 = 1−(3/7) 1/5 = 0.1558791. (b) The probability that (30) survives to at least age 70 is Pr[T 30 > 40] = Pr[T 0 > 70] Pr[T 0 > 30] = 1 −F 0 (70) 1 −F 0 (30) = 35 1/5 75 1/5 = 7 15 1/5 = 0.8586207. (c) The probability that (20) dies between 90 and 100 is Pr[70 < T 20 ≤ 80] = Pr[90 < T 0 ≤ 100] Pr[T 0 > 20] = F 0 (100) −F 0 (90) 1 −F 0 (20) = 15 1/5 −5 1/5 85 1/5 = 0.1394344. (d) First, derive the form of the force of mortality: µ x = f 0 (x) 1 −F 0 (x) = dF 0 (x)/dx 1 −F 0 (x) = 1 5 1 − x 105 −4/5 1 105 1 − x 105 1/5 = 1 5(105 −x) . Thus, µ 50 = 1 5(55) = 0.003636364. (e) The median future lifetime of (50) is the solution m to Pr[T 50 > m] = 1 2 = 1 − m 55 1/5 . This leads us to m = 55[1 −(1/2) 5 ] = 53.28125. (f) For a person currently age 50, his survival function is p t 50 = Pr[T 50 > t] = Pr[T 0 > 50 + t] Pr[T 0 > 50] = 55 −t 55 1/5 = 1 − t 55 1/5 , for 0 ≤ t ≤ 55. His complete expectation of life is therefore ˚e 50 = 55 0 p t 50 dt = 55 0 1 − t 55 1/5 dt = 55 1 0 u 1/5 du = 55(5/6) = 45.83333. (g) The curtate expectation of life at age 50 is e 50 = 55 k=1 p k 50 = 55 k=1 1 − k 55 1/5 = 54 55 1/5 + 53 55 1/5 +· · · + 1 55 1/5 = 45.17675. The sum above can be done in an R program as follows: > k <- 1:54 > e <- (k/55)^(1/5) > sum(e) [1] 45.17675 Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.2 (a) The implied limiting age ω is the solution to G(ω) = 0 which leads us to 18000 −110ω −ω 2 = −(ω −90)(ω + 200) = 0. Thus, ω = 90 since the limiting age cannot be negative. (b) For G to be a legitimate survival function, it must satisfy 3 conditions: (i) G(0) = 1: trivial (ii) G(ω) = 0: verified in (a) above. (iii) G must be non-increasing. We check whether dG(x)/dx ≤ 0. dG(x) dx = −2(55 + x) 18000 which clearly is non-positive for all 0 ≤ x ≤ 90. (c) Now that we have verified G(x) is a legitimate survival function, we can write it as S 0 (x) so that p 20 0 = Pr[T 0 > 20] = S 0 (20) = 18000 −110(20) −20 2 18000 = 15400 18000 = 77 90 = 0.8555556. This gives the probability that a newborn will survive to age 20. (d) The survival function for a life age 20 can be expressed as S 20 (t) = Pr[T 20 > t] = Pr[T 0 > 20 + t] Pr[T 0 > t] = S 0 (20 + t) S 0 (20) = [18000 −110(20 + t) −(20 + t) 2 ]/18000 [18000 −110(20) −20 2 ]/18000 = [18000 −110(20) −110t −20 2 −40t −t 2 ]/18000 [18000 −110(20) −20 2 ]/18000 = 1 − 150t + t 2 15400 . (e) The probability that (20) will die between the ages of 30 and 40 is Pr[10 < T 20 < 20] = S 20 (10) −S 20 (20) = 150(20) + 20 2 15400 − 150(10) + 10 2 15400 = 1800 15400 = 9 77 = 0.1168831. (f) The force of mortality at age x is given by µ x = −dS 0 (x)/dx S 0 (x) = [110 + 2x]/18000 [18000 −110x −x 2 ]/18000 = 110 + 2x 18000 −110x −x 2 , so that µ 50 = 110 + 2(50) 18000 −110(50) −50 2 = 21 1000 = 0.021. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.3 We are given S 0 (x) = 1 10 √ 100 −x = (100 −x) 1/2 10 , for 0 ≤ x ≤ 100. The probability that a newborn will die between ages 19 and 36 is given by 19|17 q 0 = Pr[19 < T 0 ≤ 36] = S 0 (19) −S 0 (36) = 81 1/2 −64 1/2 10 = 1 10 = 0.10. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.4 (a) To show S 0 is a legitimate survival function, we show 3 conditions: (i) S 0 (0) = 1: trivial (ii) lim x→∞ S 0 (x) = 0: Since all parameters A, B, C and D are all positive, then the term Ax + 1 2 Bx 2 + C log D D x − C log D →∞ as x →∞ so that lim x→∞ S 0 (x) = e −∞ = 0. (iii) S 0 must be non-increasing: Define the term H(x) = Ax + 1 2 Bx 2 + C log D D x − C log D so that dH(x) dx = A + Bx + CD x and that dS 0 (x) dx = −e −H(x) dH(x) dx , which is clearly strictly negative for all x. (b) We have S x (t) = S 0 (x + t) S 0 (x) = exp _ − _ A(x + t) + B(x + t) 2 + C log D D x+t − C log D __ exp _ − _ Ax + Bx 2 + C log D D x − C log D __ = exp _ − _ At + B(2xt + t 2 ) + C log D D x (D t −1) __ . (c) The force of mortality at age x can be expressed as µ x = −dS 0 (x)/dx S 0 (x) = e −H(x) dH(x) dx e −H(x) = A + Bx + CD x . The force of mortality has a similar form to that of Makeham’s except for the addition of a linear term on age x. (d) Solving all of part (d) requires use of a computer software. Here we give our solution coded in R. [slightly differ from textbook answers] (i) Note that we can express p t 30 = S 30 (t) = exp _ − _ At + B(60t + t 2 ) + C log D D 30 (D t −1) __ . The R code to compute this for different values of t is given by A <- 0.00005 B <- 0.0000005 C <- 0.0003 D <- 1.07 tp30 <- function (t) { temp <- A*t + B*(60*t + t^2) + (C/log(D))*D^30 * (D^t -1) Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises exp(-temp)} t <- c(1,5,10,20,50,90) output <- cbind(t,round(tp30(t),4)) colnames(output) <- c("t", "tp30") print(output) tp30(90) This gives the output > print(output) t tp30 [1,] 1 0.9976 [2,] 5 0.9861 [3,] 10 0.9671 [4,] 20 0.9061 [5,] 50 0.3807 [6,] 90 0.0000 > tp30(90) [1] 3.497638e-07 (ii) Here we note that we can express q t 40 = 1 −S 40 (t) = 1 −exp _ − _ At + B(80t + t 2 ) + C log D D 40 (D t −1) __ . The R code to compute this for different values of t is given by tq40 <- function (t) { temp <- A*t + B*(80*t + t^2) + (C/log(D))*D^40*(D^t -1) 1-exp(-temp)} t <- c(1,10,20) output <- cbind(t,round(tq40(t),4)) colnames(output) <- c("t", "tq40") print(output) This gives the output > print(output) t tq40 [1,] 1 0.0047 [2,] 10 0.0631 [3,] 20 0.1751 (iii) Here we note that we can express t|10 q 30 = p t 30 − p t+10 30 . This gives the probability that a life (30) will survive the next t years but dies the following 10 years after that. The R code to compute this for different values of t is given by Prepared by E.A. Valdez page 2 Suggested solutions to DHW textbook exercises tbar10q30 <- function (t) { temp1 <- tp30(t) temp2 <- tp30(t+10) temp1-temp2} t <- c(1,10,20) round(tbar10q30(t),4) output <- cbind(t,round(tbar10q30(t),4)) colnames(output) <- c("t", "t|10q30") print(output) This gives the output > print(output) t t|10q30 [1,] 1 0.0351 [2,] 10 0.0610 [3,] 20 0.1084 (iv) We evaluate the curtate expectation of life at age x using e x = ∞ k=1 p k x . The logic in the R code is to keep summing the term p k x until a certain level of very small tolerance. Here we choose our tolerance to be 10 −50 , indeed a very small value. The R code to compute this for different values of x is given by kpx <- function (k,x) { temp <- A*k + B*(2*x*k + k^2) + (C/log(D))*D^x * (D^k -1) exp(-temp)} ex <- function(x,tol) { k<-1 p1 <- kpx(k,x) p <- p1 while (p1 > tol) { k <- k+1 p1 <- kpx(k,x) p <- p + p1} p} x <- 70:75 expd <- rep(0,6) tol <- 10^(-50) expd[1] <- ex(x[1],tol) expd[2] <- ex(x[2],tol) expd[3] <- ex(x[3],tol) expd[4] <- ex(x[4],tol) expd[5] <- ex(x[5],tol) expd[6] <- ex(x[6],tol) output <- cbind(x,round(expd,3)) colnames(output) <- c("x", "ex") print(output) Prepared by E.A. Valdez page 3 Suggested solutions to DHW textbook exercises This gives the output > print(output) x ex [1,] 70 13.041 [2,] 71 12.513 [3,] 72 11.997 [4,] 73 11.495 [5,] 74 11.005 [6,] 75 10.529 (v) Finally, to evaluate the complete expectation of life at age x, we numerically approx- imate the integral ˚e x = _ ∞ 0 p t x dt. To approximate this integral, we use repeated application of Simpson’s rule given in Appendix B of the book: _ a+2h a p t x dt ≈ h 3 [ p a x + 4 p a+h x + p a+2h x ], starting with a = 0 and choosing h = 0.25. We repeat and calculate additively the integral for consecutive intervals of length 2h, until a certain level of very small tolerance. Here we choose h = 0.25 and our tolerance to be 10 −50 . The R code to compute this for different values of x is given by tpx <- function (t,x) { temp <- A*t + B*(2*x*t + t^2) + (C/log(D))*D^x * (D^t -1) exp(-temp)} exc <- function(x,tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(tpx(a,x) + 4* tpx(a+h,x) + tpx(a+2*h,x)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(tpx(lim1,x) + 4* tpx(mid,x) + tpx(lim2,x)) v <- v + v1} v} x <- 70:75 expc <- rep(0,6) tol <- 10^(-50) expc[1] <- exc(x[1],tol) expc[2] <- exc(x[2],tol) expc[3] <- exc(x[3],tol) expc[4] <- exc(x[4],tol) expc[5] <- exc(x[5],tol) Prepared by E.A. Valdez page 4 Suggested solutions to DHW textbook exercises expc[6] <- exc(x[6],tol) output <- cbind(x,round(expc,3)) colnames(output) <- c("x", "exc") print(output) This gives the output > print(output) x exc [1,] 70 13.539 [2,] 71 13.010 [3,] 72 12.494 [4,] 73 11.991 [5,] 74 11.501 [6,] 75 11.025 Prepared by E.A. Valdez page 5 Suggested solutions to DHW textbook exercises Exercise 2.5 Clearly, F 0 (t) is the cdf of an Exponential with mean 1/λ. So T 0 has an Exponential distribution. (a) Since S 0 (t) = e −λt , we have S x (t) = S 0 (x + t) S 0 (x) = e −λ(x+t) e −λx = e −λt . Thus, we see that T x also has the same Exponential distribution as T 0 . (b) µ x = −dS 0 (x)/dx S 0 (x) = λe −λx e −λx = λ, which is independent of x and therefore is said to have a constant force of mortality for all x. (c) The curtate expectation of life for a person age x can be derived as e x = ∞ k=1 p k x = ∞ k=1 S x (k) = ∞ k=1 e −λk = e −λ 1 −e −λ = 1 e λ −1 , which is independent of age x. (d) For human mortality, force of mortality generally increases with age x especially as we become much older and average remaining future lifetime generally decreases with age (the older we get, sadly, closer we are to death). Neither of these characteristics is exhibited by the Exponential distribution. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.6 (a) p x+3 = 1 − q x+3 = 1 − 0.02 = 0.98 (b) p 2 x = p x · p x+1 = (0.99)(0.985) = 0.97515 (c) Since p 3 x+1 = p 2 x+1 · p x+3 , then p 2 x+1 = p 3 x+1 p x+3 = 0.95 0.98 = 0.9693878 (d) p 3 x = p x · p 2 x+1 = (0.99)(0.9693878) = 0.9596939 (e) 1|2 q x = p x · q 2 x+1 = p x (1 − p 2 x+1 ) = 0.99(1 − 0.9693878) = 0.03030612 Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.7 (a) S 0 (x) = 1 −F 0 (x) = 1 1 + x (b) f 0 (x) = dF 0 (x) dx = 1 (1 + x) 2 (c) S x (t) = p t x = S 0 (x + t) S 0 (x) = 1 + x 1 + x + t = 1 − t 1 + x + t (d) p 20 = S 20 (1) = 21 22 = 0.9545455 (e) 10|5 q 30 = p 10 30 − p 15 30 = 31 41 − 31 46 = 0.08218452 Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.8 One can easily verify that S 0 (x) = e −0.001x 2 , for x ≥ 0, is a legitimate survival function by showing that (i) S 0 (0) = 1, (ii) lim x→∞ S 0 (x) = 0, and (iii) S 0 (x) is non-increasing in x. (a) f 0 (x) = − dS 0 (x) dx = 0.002xe −0.001x 2 . One may recognize that this has the form of a density function of a Weibull. (b) µ x = f 0 (x) S 0 (x) = 0.002xe −0.001x 2 e −0.001x 2 = 0.002x. In this case, the force of mortality is linearly increasing with age x. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.9 To verify the formula, we need the Leibnitz rule for differentiating an integral: d dz b(z) a(z) f(x, z)dx = b(z) a(z) ∂f ∂z dx + f(b(z), z) ∂b(z) ∂z − f(a(z), z) ∂a(z) ∂z Therefore, we have d dx p t x = d dx exp − x+t x µ s ds = −exp − x+t x µ s ds · d dx x+t x µ s ds = − p t x (µ x+t − µ x ) = p t x (µ x − µ x+t ), where we applied the Leibnitz rule in the second step above. Generally, because the force of mortality µ x increases with age, we would expect d dx p t x to be non-positive. This implies that as we grow older with age, the rate of change of surviving for another fixed t years decreases. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.10 For Gompertz law, we have µ x = Bc x so that µ 50 µ 30 = 0.000344 0.000130 = 172 65 = c 20 . This gives us c = (172/65) 1/20 and thus, we have p 10 40 = exp − 10 0 µ 40+s ds = exp −Bc 40 10 0 c s ds = exp − B log(c) c 40 (c 10 −1) = exp − 0.000130(172/65) −3/2 log(172/65) 1/20 (172/65) 2 [(172/65) 1/2 −1] = 0.9972799 This value gives the probability that a life (40) will survive to reach age 50. * corrected on Dec 6, 2011 - thanks to W. Vercruysse Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.11 (a) It is not difficult to show that under Makeham’s law, we have S 0 (x) = exp __ x 0 (A + Bc z )dz _ = exp _ − _ Ax + B log(c) (c x −1) __ . It follows therefore that p t x = S x (t) = S 0 (x + t) S 0 (x) = exp _ − _ A(x + t) + B log(c) (c x+t −1) __ exp _ − _ Ax + B log(c) (c x −1) __ = e −At− B log(c) c x (c t −1) = s t g c x (c t −1) where clearly s = e −A and g = e −B/ log(c) . (b) We use result of part (a) by noting that log p t x = t log(s) + c x (c t −1) log(g). It therefore follows that log p 10 70 −log p 10 60 log p 10 60 −log p 10 50 = 10 log(s) + c 70 (c 10 −1) log(g) −10 log(s) −c 60 (c 10 −1) log(g) 10 log(s) + c 60 (c 10 −1) log(g) −10 log(s) −c 50 (c 10 −1) log(g) = c 60 (c 10 −1) c 50 (c 10 −1) = c 10 . The result follows immediately by raising both sides to the power of 0.10. Such property can indeed be generalized as follows: fix x and t, the following can be similarly verified: c = _ log p t x+2t −log p t x+t log p t x+t −log p t x _ 1/t Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.12 (a) For Makeham’s law, it can easily be verified that p x = exp − A + B log(c) c x (c −1) . The following R code produces a table of p x for x = 0 to x = 130: A <- .0001 B <- .00035 c <- 1.075 px <- function (x) { temp <- A + (B/log(c))*c^x*(c-1) exp(-temp)} x <- 0:130 p <- px(x) output <- cbind(x,round(p,5)) colnames(output) <- c("x","px") print(output) This gives the output > print(output) x px [1,] 0 0.99954 [2,] 1 0.99951 [3,] 2 0.99948 [4,] 3 0.99945 [5,] 4 0.99942 [6,] 5 0.99938 [7,] 6 0.99934 [8,] 7 0.99930 [9,] 8 0.99925 [10,] 9 0.99920 [11,] 10 0.99915 [12,] 11 0.99910 [13,] 12 0.99904 [14,] 13 0.99897 [15,] 14 0.99890 [16,] 15 0.99883 [17,] 16 0.99875 [18,] 17 0.99866 [19,] 18 0.99857 [20,] 19 0.99847 [21,] 20 0.99836 Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises [22,] 21 0.99824 [23,] 22 0.99812 [24,] 23 0.99799 [25,] 24 0.99784 [26,] 25 0.99769 [27,] 26 0.99752 [28,] 27 0.99735 [29,] 28 0.99715 [30,] 29 0.99695 [31,] 30 0.99673 [32,] 31 0.99649 [33,] 32 0.99623 [34,] 33 0.99596 [35,] 34 0.99567 [36,] 35 0.99535 [37,] 36 0.99501 [38,] 37 0.99464 [39,] 38 0.99425 [40,] 39 0.99383 [41,] 40 0.99337 [42,] 41 0.99288 [43,] 42 0.99236 [44,] 43 0.99180 [45,] 44 0.99119 [46,] 45 0.99054 [47,] 46 0.98984 [48,] 47 0.98909 [49,] 48 0.98829 [50,] 49 0.98742 [51,] 50 0.98649 [52,] 51 0.98550 [53,] 52 0.98442 [54,] 53 0.98327 [55,] 54 0.98204 [56,] 55 0.98071 [57,] 56 0.97929 [58,] 57 0.97776 [59,] 58 0.97612 [60,] 59 0.97435 [61,] 60 0.97247 [62,] 61 0.97044 [63,] 62 0.96826 [64,] 63 0.96593 [65,] 64 0.96343 [66,] 65 0.96075 [67,] 66 0.95788 Prepared by E.A. Valdez page 2 Suggested solutions to DHW textbook exercises [68,] 67 0.95480 [69,] 68 0.95150 [70,] 69 0.94796 [71,] 70 0.94418 [72,] 71 0.94013 [73,] 72 0.93579 [74,] 73 0.93115 [75,] 74 0.92619 [76,] 75 0.92089 [77,] 76 0.91522 [78,] 77 0.90916 [79,] 78 0.90270 [80,] 79 0.89580 [81,] 80 0.88845 [82,] 81 0.88061 [83,] 82 0.87226 [84,] 83 0.86337 [85,] 84 0.85391 [86,] 85 0.84387 [87,] 86 0.83320 [88,] 87 0.82188 [89,] 88 0.80988 [90,] 89 0.79718 [91,] 90 0.78374 [92,] 91 0.76956 [93,] 92 0.75459 [94,] 93 0.73883 [95,] 94 0.72225 [96,] 95 0.70484 [97,] 96 0.68660 [98,] 97 0.66751 [99,] 98 0.64758 [100,] 99 0.62683 [101,] 100 0.60525 [102,] 101 0.58289 [103,] 102 0.55977 [104,] 103 0.53593 [105,] 104 0.51144 [106,] 105 0.48636 [107,] 106 0.46077 [108,] 107 0.43476 [109,] 108 0.40843 [110,] 109 0.38191 [111,] 110 0.35531 [112,] 111 0.32878 [113,] 112 0.30247 Prepared by E.A. Valdez page 3 Suggested solutions to DHW textbook exercises [114,] 113 0.27652 [115,] 114 0.25111 [116,] 115 0.22639 [117,] 116 0.20252 [118,] 117 0.17967 [119,] 118 0.15796 [120,] 119 0.13755 [121,] 120 0.11853 [122,] 121 0.10101 [123,] 122 0.08506 [124,] 123 0.07070 [125,] 124 0.05796 [126,] 125 0.04682 [127,] 126 0.03721 [128,] 127 0.02907 [129,] 128 0.02230 [130,] 129 0.01676 [131,] 130 0.01234 (b) To find the age last birthday at which (70) is most likely to die, we need to evaluate the deferred probability t| q 70 = p t 70 − p t+1 70 . The R code to generate these probabilities for different values of t is given by tp70 <- function (t) { temp <- A*t + (B/log(c))*c^70*(c^t-1) exp(-temp)} tbarq70 <- function (t) { temp <- tp70(t) - tp70(t+1) temp} x <- 70:130 t <- rev(130-x) q <- tbarq70(t) output <- cbind(x,t,round(q,5)) colnames(output) <- c("x","t","t|q70") print(output) This gives the output > print(output) x t t|q70 [1,] 70 0 0.05582 [2,] 71 1 0.05653 [3,] 72 2 0.05700 [4,] 73 3 0.05719 [5,] 74 4 0.05709 Prepared by E.A. Valdez page 4 Suggested solutions to DHW textbook exercises [6,] 75 5 0.05668 [7,] 76 6 0.05593 [8,] 77 7 0.05484 [9,] 78 8 0.05341 [10,] 79 9 0.05163 [11,] 80 10 0.04952 [12,] 81 11 0.04708 [13,] 82 12 0.04436 [14,] 83 13 0.04139 [15,] 84 14 0.03821 [16,] 85 15 0.03487 [17,] 86 16 0.03144 [18,] 87 17 0.02797 [19,] 88 18 0.02454 [20,] 89 19 0.02120 [21,] 90 20 0.01802 [22,] 91 21 0.01505 [23,] 92 22 0.01233 [24,] 93 23 0.00990 [25,] 94 24 0.00778 [26,] 95 25 0.00597 [27,] 96 26 0.00447 [28,] 97 27 0.00326 [29,] 98 28 0.00230 [30,] 99 29 0.00158 [31,] 100 30 0.00105 [32,] 101 31 0.00067 [33,] 102 32 0.00041 [34,] 103 33 0.00024 [35,] 104 34 0.00014 [36,] 105 35 0.00007 [37,] 106 36 0.00004 [38,] 107 37 0.00002 [39,] 108 38 0.00001 [40,] 109 39 0.00000 [41,] 110 40 0.00000 [42,] 111 41 0.00000 [43,] 112 42 0.00000 [44,] 113 43 0.00000 [45,] 114 44 0.00000 [46,] 115 45 0.00000 [47,] 116 46 0.00000 [48,] 117 47 0.00000 [49,] 118 48 0.00000 [50,] 119 49 0.00000 [51,] 120 50 0.00000 Prepared by E.A. Valdez page 5 Suggested solutions to DHW textbook exercises [52,] 121 51 0.00000 [53,] 122 52 0.00000 [54,] 123 53 0.00000 [55,] 124 54 0.00000 [56,] 125 55 0.00000 [57,] 126 56 0.00000 [58,] 127 57 0.00000 [59,] 128 58 0.00000 [60,] 129 59 0.00000 [61,] 130 60 0.00000 According to this output, the age last birthday with the highest deferred probability of death is 73. (c) It can be shown that p k 70 = exp − Ak + B log(c) c 70 (c k −1) . The following R code produces a table of p k 70 for k = 1 to k = 70: tp70 <- function (t) { temp <- A*t + (B/log(c))*c^70*(c^t-1) exp(-temp)} x <- 70:130 t <- rev(130-x) p70 <- tp70(t)[-1] e70 <- sum(p70) e70 The output: > e70 [1] 9.338684 (d) To evaluate the integral for the complete expectation of life for (70), we use again repeated application of the Simpson’s rule following the same logic as was done in Exercise 2.4 (d). We have the R code: exc <- function(tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(tp70(a) + 4* tp70(a+h) + tp70(a+2*h)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h Prepared by E.A. Valdez page 6 Suggested solutions to DHW textbook exercises mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(tp70(lim1) + 4*tp70(mid) + tp70(lim2)) v <- v + v1} v} tol <- 10^(-50) ec70 <- exc(tol) ec70 The output: > ec70 [1] 9.834068 Prepared by E.A. Valdez page 7 Suggested solutions to DHW textbook exercises Exercise 2.13 (a) We are given µ ∗ x = 2µ x where ∗ refers to smokers and unstarred, non-smokers. It is easy to verify that p ∗ t x = exp − t 0 µ ∗ x+s ds = exp −2 t 0 µ x+s ds = exp − t 0 µ x+s ds 2 = ( p t x ) 2 . Note that because p t x ≤ 1, then p ∗ t x = ( p t x ) 2 ≤ p t x . Intuitively, survival of smokers are worse than non-smokers. (b) The life expectancy for a 50-year-old non-smoker can be expressed as ˚e 50 = ∞ 0 p t 50 dt, where p t 50 = exp − B log(c) c 50 (c t −1) . On the other hand, the life expectancy for a 50- year-old smoker can be found using ˚e ∗ 50 = ∞ 0 ( p t 50 ) 2 dt, The R code to evaluate the difference between these two life expectancies is given below (integrals are approximated using repeated Simpson’s rule): B <- 0.0005 c <- 1.07 tp50ns <- function (t) { temp <- (B/log(c))*c^50*(c^t-1) exp(-temp)} tp50s <- function (t) { temp <- tp50ns(t) temp^2} exc50.ns <- function(tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(tp50ns(a) + 4*tp50ns(a+h) + tp50ns(a+2*h)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(tp50ns(lim1) + 4*tp50ns(mid) + tp50ns(lim2)) v <- v + v1} v} Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises exc50.sm <- function(tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(tp50s(a) + 4*tp50s(a+h) + tp50s(a+2*h)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(tp50s(lim1) + 4*tp50s(mid) + tp50s(lim2)) v <- v + v1} v} tol <- 10^(-50) ec50ns <- exc50.ns(tol) ec50sm <- exc50.sm(tol) ec50ns ec50sm ec50ns-ec50sm The output is given by > ec50ns [1] 21.20182 > ec50sm [1] 14.76935 > ec50ns-ec50sm [1] 6.432468 According to this result, for a 50-year-old, there is a difference of 6.4 extra years of life expectancy between that of a non-smoker and a smoker. (c) To calculate the variances, we use Var[T 50 ] = ∞ 0 t 2 p t 50 µ 50+t dt −(˚e 50 ) 2 and Var[T ∗ 50 ] = ∞ 0 2t 2 ( p t 50 ) 2 µ 50+t dt −(˚e ∗ 50 ) 2 where the integrals in each of the first term in the variance formula are approximated using repeated Simpson’s rule. The following R code evaluates these respective variances: f50sq.ns <- function (t) { temp1 <- tp50ns(t) temp2 <- B*c^(50+t) temp3 <- t^2 Prepared by E.A. Valdez page 2 Suggested solutions to DHW textbook exercises temp1*temp2*temp3} f50sq.sm <- function (t) { temp1 <- tp50s(t) temp2 <- 2*B*c^(50+t) temp3 <- t^2 temp1*temp2*temp3} esq50.ns <- function(tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(f50sq.ns(a) + 4*f50sq.ns(a+h) + f50sq.ns(a+2*h)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(f50sq.ns(lim1) + 4*f50sq.ns(mid) + f50sq.ns(lim2)) v <- v + v1} v} esq50.sm <- function(tol) { a<-0 h<-.25 k<-0 v1 <- (h/3)*(f50sq.sm(a) + 4*f50sq.sm(a+h) + f50sq.sm(a+2*h)) v <- v1 while (v1 > tol) { k <- k+2 lim1 <- a+k*h mid <- a+(k+1)*h lim2 <- a+(k+2)*h v1 <- (h/3)*(f50sq.sm(lim1) + 4*f50sq.sm(mid) + f50sq.sm(lim2)) v <- v + v1} v} tol <- 10^(-50) var.ns <- esq50.ns(tol) - (ec50ns)^2 var.sm <- esq50.sm(tol) - (ec50sm)^2 var.ns var.sm The output: > var.ns (for non-smokers) [1] 125.8860 > var.sm (for smokers) [1] 80.11494 Prepared by E.A. Valdez page 3 Suggested solutions to DHW textbook exercises Exercise 2.14 (a) Starting with ˚e x = ∞ 0 p t x dt = 1 0 p t x dt + ∞ 1 p t x dt ≤ 1 + ∞ 1 p t x dt = 1 + ∞ 1 p x · p t−1 x+1 dt ≤ 1 + ∞ 1 p t−1 x+1 dt = 1 + ∞ 0 p s x+1 ds = 1 +˚e x+1 The inequalities hold because we know that p t x ≤ 1 for all x and t. A heuristic approach is to use the inequality T x ≤ T x+1 +1 and by taking the expectation of both sides, you get the desired result. Here, intuitively, a person age x who reaches to live another year will live a longer life. (b) Because we know that T x ≥ T x = K x , taking the expectation of both sides gives us E[T x ] ≥ E[K x ] and the result immediately follows. (c) The difference between˚e x and e x is the additional average lifetime a person has in the year of death. If we assume deaths uniformly occur between integral ages, an extra half-year would be expected to be lived. (d) From Exercise 2.9, we found that if the force of mortality µ x is non-increasing with age x, then d dx p t x ≤ 0. This leads us to d dx ˚e x = d dx ∞ 0 p t x dt = ∞ 0 d dx p t x dt ≤ 0. Thus for forces of mortality that are non-increasing, then the average future lifetime will also be non-increasing. However, we know that for human mortality pattern, the force of mortality generally decreases at infancy so that this does not generally hold for all ages x. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.15 (a) We know that ˚e x = ∞ 0 p s x ds = ∞ 0 S 0 (x + s) S 0 (x) ds = 1 S 0 (x) ∞ 0 S 0 (x + s)ds. Using a change of variable of integration t = x + s, we find that ˚e x = 1 S 0 (x) ∞ 0 S 0 (x + t)dt = 1 S 0 (x) ∞ x S 0 (t)dt and the result follows. Now taking the derivative of both sides with respect to x, we find d dx ˚e x = −S 0 (x)S 0 (x) + f 0 (x) ∞ x S 0 (t)dt S 0 (x) 2 = −1 + f 0 (x) S 0 (x) · ∞ x S 0 (t)dt S 0 (x) . The result follows because we know that µ x = f 0 (x) S 0 (x) and ˚e x = 1 S 0 (x) ∞ x S 0 (t)dt. Another approach to prove this is to use the result of Exercise 2.9: d dx ˚e x = ∞ 0 p t x (µ x − µ x+t dt = µ x ∞ 0 p t x dt − ∞ 0 p t x µ x+t dt = µ x ˚e x − 1. (b) If we let g(x) = x +˚e x , then d dx g(x) = 1 + d dx ˚e x = 1 + µ x ˚e x − 1 = µ x ˚e x > 0. Thus, g is an increasing function of age x. This means that as you age, the higher your average age at death. Each year you survive is an addition to your average age at death for certain. Prepared by E.A. Valdez page 1 Suggested solutions to DHW textbook exercises Exercise 2.2 (a) The implied limiting age ω is the solution to G(ω) = 0 which leads us to 18000 − 110ω − ω 2 = −(ω − 90)(ω + 200) = 0. Thus, ω = 90 since the limiting age cannot be negative. (b) For G to be a legitimate survival function, it must satisfy 3 conditions: (i) G(0) = 1: trivial (ii) G(ω) = 0: verified in (a) above. (iii) G must be non-increasing. We check whether dG(x)/dx ≤ 0. dG(x) −2(55 + x) = dx 18000 which clearly is non-positive for all 0 ≤ x ≤ 90. (c) Now that we have verified G(x) is a legitimate survival function, we can write it as S0 (x) so that 15400 77 18000 − 110(20) − 202 = = = 0.8555556. 20p0 = Pr[T0 > 20] = S0 (20) = 18000 18000 90 This gives the probability that a newborn will survive to age 20. (d) The survival function for a life age 20 can be expressed as S20 (t) = Pr[T20 > t] = S0 (20 + t) Pr[T0 > 20 + t] = Pr[T0 > t] S0 (20) 2 [18000 − 110(20 + t) − (20 + t) ]/18000 = [18000 − 110(20) − 202 ]/18000 150t + t2 [18000 − 110(20) − 110t − 202 − 40t − t2 ]/18000 = =1− . [18000 − 110(20) − 202 ]/18000 15400 (e) The probability that (20) will die between the ages of 30 and 40 is Pr[10 < T20 < 20] = S20 (10) − S20 (20) = = 150(20) + 202 150(10) + 102 − 15400 15400 1800 9 = = 0.1168831. 15400 77 (f) The force of mortality at age x is given by µx = so that µ50 = −dS0 (x)/dx [110 + 2x]/18000 110 + 2x = = , S0 (x) [18000 − 110x − x2 ]/18000 18000 − 110x − x2 110 + 2(50) 21 = = 0.021. 2 18000 − 110(50) − 50 1000 Prepared by E.A. Valdez page 1 10.3 We are given (100 − x)1/2 1√ 100 − x = . 10 10 Prepared by E. for 0 ≤ x ≤ 100. Valdez page 1 .Suggested solutions to DHW textbook exercises Exercise 2.A. 10 10 The probability that a newborn will die between ages 19 and 36 is given by S0 (x) = 19|17 q0 = Pr[19 < T0 ≤ 36] = S0 (19) − S0 (36) = 811/2 − 641/2 1 = = 0. function (t) { <. Valdez .Suggested solutions to DHW textbook exercises Exercise 2. C and D are all positive. dx dx which is clearly strictly negative for all x. then the term x→∞ Ax + 1 Bx2 + 2 C Dx log D − C log D → ∞ as x → ∞ so that lim S0 (x) = e−∞ = 0.A. (c) The force of mortality at age x can be expressed as e−H(x) dH(x) −dS0 (x)/dx dx µx = = = A + Bx + CDx . B.0003 1.A*t + B*(60*t + t^2) + (C/log(D))*D^30 * (D^t -1) page 1 Prepared by E. −H(x) S0 (x) e The force of mortality has a similar form to that of Makeham’s except for the addition of a linear term on age x.4 (a) To show S0 is a legitimate survival function. we show 3 conditions: (i) S0 (0) = 1: trivial (ii) lim S0 (x) = 0: Since all parameters A. x→∞ C C (iii) S0 must be non-increasing: Define the term H(x) = Ax + 1 Bx2 + log D Dx − log D so 2 dH(x) that = A + Bx + CDx and that dx dS0 (x) dH(x) = −e−H(x) . (d) Solving all of part (d) requires use of a computer software. The R code to compute this for different values of t is given by A <B <C <D <tp30 temp 0.00005 0. Here we give our solution coded in R. [slightly differ from textbook answers] (i) Note that we can express tp30 = S30 (t) = exp − At + B(60t + t2 ) + C D30 (Dt − 1) log D .0000005 0. (b) We have C exp − A(x + t) + B(x + t)2 + log D Dx+t − S0 (x + t) = Sx (t) = C C S0 (x) exp − Ax + Bx2 + log D Dx − log D C log D = exp − At + B(2xt + t2 ) + C Dx (Dt − 1) log D .07 <. 20.] 50 0.0631 [3. "tq40") print(output) This gives the output > print(output) t tq40 [1.c("t".Suggested solutions to DHW textbook exercises exp(-temp)} t <.c("t".5.cbind(t.3807 [6.A.0047 [2.9976 [2.50.] 1 0.497638e-07 (ii) Here we note that we can express t q40 = 1 − S40 (t) = 1 − exp − At + B(80t + t2 ) + C D40 (Dt − 1) log D .20) output <.] 20 0. The R code to compute this for different values of t is given by Prepared by E.] 10 0. Valdez page 2 .round(tp30(t).10.c(1. This gives the probability that a life (30) will survive the next t years but dies the following 10 years after that.10.] 20 0.1751 (iii) Here we note that we can express t|10 q30 = tp30 − t+10p30 .round(tq40(t).cbind(t.9861 [3.] 10 0.0000 > tp30(90) [1] 3.function (t) { temp <.A*t + B*(80*t + t^2) + (C/log(D))*D^40*(D^t -1) 1-exp(-temp)} t <. "tp30") print(output) tp30(90) This gives the output > print(output) t tp30 [1.] 90 0.] 1 0.9671 [4. The R code to compute this for different values of t is given by tq40 <.4)) colnames(output) <.c(1.9061 [5.] 5 0.90) output <.4)) colnames(output) <. Valdez page 3 .p1 while (p1 > tol) { k <.6) tol <.rep(0.] 1 0.round(tbar10q30(t).ex(x[6].function (k.c("x".70:75 expd <.10.Suggested solutions to DHW textbook exercises tbar10q30 <.tol) expd[3] <.] 10 0.A*k + B*(2*x*k + k^2) + (C/log(D))*D^x * (D^k -1) exp(-temp)} ex <.tol) expd[6] <.k+1 p1 <.A.tol) { k<-1 p1 <.x) p <.0351 [2.20) round(tbar10q30(t).cbind(x.ex(x[4].tol) expd[5] <.tol) expd[4] <.4)) colnames(output) <.tp30(t+10) temp1-temp2} t <.c("t".tol) output <.kpx(k.x) { temp <.cbind(t.0610 [3.function(x. indeed a very small value.kpx(k.10^(-50) expd[1] <. The R code to compute this for different values of x is given by kpx <. "ex") print(output) Prepared by E.tp30(t) temp2 <. Here we choose our tolerance to be 10−50 .round(expd.x) p <.ex(x[2]. "t|10q30") print(output) This gives the output > print(output) t t|10q30 [1.function (t) { temp1 <.] 20 0.3)) colnames(output) <.1084 ∞ (iv) We evaluate the curtate expectation of life at age x using ex = k=1 kp x .p + p1} p} x <.ex(x[1].ex(x[5].tol) expd[2] <.c(1. The logic in the R code is to keep summing the term kpx until a certain level of very small tolerance.ex(x[3].4) output <. x) + 4* tpx(mid.x)) v <. we numerically approx∞ imate the integral ˚x = e 0 tpx dt.] 74 11. Here we choose h = 0.529 (v) Finally.rep(0. Valdez page 4 .25 and our tolerance to be 10−50 .x)) v <.a+(k+2)*h v1 <.25 k<-0 v1 <. The R code to compute this for different values of x is given by tpx <.005 [6.041 [2.] 72 11.Suggested solutions to DHW textbook exercises This gives the output > print(output) x ex [1. To approximate this integral.10^(-50) expc[1] <.x) + 4* tpx(a+h. We repeat and calculate additively the integral for consecutive intervals of length 2h. to evaluate the complete expectation of life at age x.(h/3)*(tpx(lim1.tol) expc[2] <.A.exc(x[1].x) { temp <.exc(x[4].exc(x[2]. until a certain level of very small tolerance.] 75 10.] 70 13.function(x.exc(x[5].6) tol <. we use repeated application of Simpson’s rule given in Appendix B of the book: a+2h tpx dt a ≈ h [ p + 4 a+hpx + a+2hpx ].tol) expc[4] <. 3 a x starting with a = 0 and choosing h = 0.] 73 11.a+(k+1)*h lim2 <.A*t + B*(2*x*t + t^2) + (C/log(D))*D^x * (D^t -1) exp(-temp)} exc <.tol) expc[5] <.v + v1} v} x <.495 [5.] 71 12.tol) { a<-0 h<-.x) + tpx(a+2*h.a+k*h mid <.997 [4.25.70:75 expc <.x) + tpx(lim2.exc(x[3].(h/3)*(tpx(a.tol) Prepared by E.function (t.513 [3.k+2 lim1 <.v1 while (v1 > tol) { k <.tol) expc[3] <. Valdez page 5 .] 74 11.round(expc.501 [6.A.] 72 12.Suggested solutions to DHW textbook exercises expc[6] <.] 70 13.exc(x[6].494 [4.c("x".] 71 13. "exc") print(output) This gives the output > print(output) x exc [1.] 73 11.539 [2.010 [3.] 75 11.tol) output <.025 Prepared by E.3)) colnames(output) <.991 [5.cbind(x. force of mortality generally increases with age x especially as we become much older and average remaining future lifetime generally decreases with age (the older we get. (c) The curtate expectation of life for a person age x can be derived as ∞ ∞ kp x = k=1 k=1 ∞ ex = Sx (k) = k=1 e−λk = 1 e−λ = λ .A. (d) For human mortality. F0 (t) is the cdf of an Exponential with mean 1/λ. S0 (x) e−λx Thus. Valdez page 1 .Suggested solutions to DHW textbook exercises Exercise 2. So T0 has an Exponential distribution. we see that Tx also has the same Exponential distribution as T0 . −λ 1−e e −1 which is independent of age x. which is independent of x and therefore is said to have S0 (x) e a constant force of mortality for all x. Neither of these characteristics is exhibited by the Exponential distribution. Prepared by E. (b) µx = −dS0 (x)/dx λe−λx = −λx = λ. sadly. closer we are to death). we have Sx (t) = e−λ(x+t) S0 (x + t) = = e−λt .5 Clearly. (a) Since S0 (t) = e−λt . 95 = 0.99(1 − 0.A.Suggested solutions to DHW textbook exercises Exercise 2.99)(0.9596939 (e) 1|2 qx = px · 2qx+1 = px (1 − 2px+1 ) = 0.9693878 0. then 2px+1 = 3px+1 px+3 = 0.02 = 0.9693878) = 0.03030612 Prepared by E.99)(0.98 (b) 2px = px · px+1 = (0.97515 (c) Since 3px+1 = 2px+1 · px+3 . Valdez page 1 .6 (a) px+3 = 1 − qx+3 = 1 − 0.985) = 0.98 (d) 3px = px · 2px+1 = (0.9693878) = 0. Valdez page 1 .7 1 1+x (a) S0 (x) = 1 − F0 (x) = (b) f0 (x) = dF0 (x) 1 = dx (1 + x)2 1+x t S0 (x + t) = =1− S0 (x) 1+x+t 1+x+t 21 = 0.08218452 41 46 (c) Sx (t) = tpx = (d) p20 = S20 (1) = (e) 10|5 q30 = 10p30 − 15p30 = Prepared by E.Suggested solutions to DHW textbook exercises Exercise 2.9545455 22 31 31 − = 0.A. and (iii) S0 (x) is non-increasing in x.001x2 increasing with age x. In this case. (b) µx = f0 (x) 0.001x .Suggested solutions to DHW textbook exercises Exercise 2. is a legitimate survival function by showing that (i) S0 (0) = 1. the force of mortality is linearly S0 (x) e−0.001x = = 0. for x ≥ 0. One may recognize that this has the form of a density (a) f0 (x) = − dx function of a Weibull. x→∞ 2 dS0 (x) 2 = 0.002x.8 One can easily verify that S0 (x) = e−0. Valdez page 1 .002xe−0.002xe−0.A. 2 Prepared by E. (ii) lim S0 (x) = 0.001x . we need the Leibnitz rule for differentiating an integral: d dz b(z) b(z) f (x.A. z) ∂z ∂z ∂z Therefore. we have d d exp − tpx = dx dx x+t µs ds x x+t x+t d µs ds · = − exp − dx x = − tpx (µx+t − µx ) = tpx (µx − µx+t ). where we applied the Leibnitz rule in the second step above.9 To verify the formula. the rate of change of surviving for another fixed t years decreases.Suggested solutions to DHW textbook exercises Exercise 2. z)dx = a(z) a(z) ∂f ∂b(z) ∂a(z) dx + f (b(z). Prepared by E. µs ds x d Generally. z) − f (a(z). because the force of mortality µx increases with age. Valdez page 1 . we would expect p to be dx t x non-positive. This implies that as we grow older with age. we have µx = Bcx so that 0. * corrected on Dec 6.000130 65 This gives us c = (172/65)1/20 and thus.9972799 This value gives the probability that a life (40) will survive to reach age 50. Valdez page 1 .10 For Gompertz law. 2011 .000130(172/65)−3/2 (172/65)2 [(172/65)1/2 − 1] = exp − log(172/65)1/20 = 0.thanks to W. Vercruysse Prepared by E.000344 172 µ50 = = = c20 .Suggested solutions to DHW textbook exercises Exercise 2.A. we have 10 10p40 = exp − 0 10 µ40+s ds cs ds 0 = exp −Bc40 = exp − B 40 10 c (c − 1) log(c) 0. µ30 0. 11 (a) It is not difficult to show that under Makeham’s law. It follows therefore that tpx = Sx (t) = = S0 (x + t) S0 (x) B (cx+t log(c) exp − A(x + t) + exp − Ax + = e−At− log(c) c B x (ct −1) − 1) B (cx log(c) − 1) = st g c x (ct −1) where clearly s = e−A and g = e−B/ log(c) .Suggested solutions to DHW textbook exercises Exercise 2. c (c − 1) The result follows immediately by raising both sides to the power of 0. the following can be similarly verified: c= log tpx+2t − log tpx+t log tpx+t − log tpx 1/t Prepared by E. Valdez page 1 . we have x S0 (x) = exp 0 (A + Bcz )dz = exp − Ax + B (cx − 1) log(c) . Such property can indeed be generalized as follows: fix x and t. It therefore follows that log 10p70 − log 10p60 10 log(s) + c70 (c10 − 1) log(g) − 10 log(s) − c60 (c10 − 1) log(g) = log 10p60 − log 10p50 10 log(s) + c60 (c10 − 1) log(g) − 10 log(s) − c50 (c10 − 1) log(g) c60 (c10 − 1) = 50 10 = c10 . (b) We use result of part (a) by noting that log tpx = t log(s) + cx (ct − 1) log(g).10.A. .] 15 0.] 20 0.99942 [6.99930 [9.A. it can easily be verified that px = exp − A + B x c (c − 1) log(c) .1. Valdez page 1 .A + (B/log(c))*c^x*(c-1) exp(-temp)} x <.] 4 0.] 16 0.] 7 0.0:130 p <.00035 c <.99920 [11.] 5 0.] 0 0.99951 [3.99954 [2.] 2 0.cbind(x.99847 [21.5)) colnames(output) <.99890 [16.99938 [7.] 13 0.] 8 0.function (x) { temp <.] 19 0.] 1 0..99897 [15.] 3 0.99910 [13.99857 [20.99866 [19.px(x) output <.] 10 0.] 18 0.] 12 0.99915 [12.99925 [10.99945 [5.075 px <.99934 [8.] 9 0.] 11 0.] 6 0."px") print(output) This gives the output > print(output) x px [1.99948 [4.99836 Prepared by E.99875 [18.12 (a) For Makeham’s law. The following R code produces a table of px for x = 0 to x = 130: A <.99883 [17.round(p.0001 B <.c("x".] 17 0.99904 [14.Suggested solutions to DHW textbook exercises Exercise 2.] 14 0. ] [40.] [56.99695 0.96075 0.] [25.A.] [46.98327 0.] [60.] [42.] [24.96343 0.] [67.] [29.98442 0.99535 0.99119 0.] [65.] [51.] [63.] [28.98909 0.] 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 0.99337 0.99623 0.] [50.] [44.99288 0.97247 0.] [31.] [47.] [66.99596 0.] [33.98204 0.] [34.] [23.] [35.99425 0.] [49.96593 0.99649 0.99464 0. Valdez page 2 .] [64.99673 0.] [57.] [58.99054 0.] [39.] [45.98071 0.] [30.99383 0.99501 0.99735 0.] [41.98550 0.] [54.] [36.99567 0.98984 0.] [38.99180 0.] [37.96826 0.99799 0.99752 0.99824 0.] [32.99769 0.] [62.] [59.95788 Prepared by E.] [53.97929 0.97044 0.97435 0.Suggested solutions to DHW textbook exercises [22.] [55.97776 0.] [61.99236 0.] [27.98829 0.] [48.97612 0.98742 0.] [26.99715 0.99812 0.] [43.] [52.99784 0.98649 0. 40843 0.48636 0.] [94.53593 0.] [91.46077 0.] [85.95480 0.43476 0.] [87.] [99.] [103.] [95.60525 0.] [108.] [75.85391 0.92089 0.] [89.82188 0.] [97.] [104.89580 0.91522 0.68660 0.] [77.] [83.] [100.] [107.35531 0.A.] [106.87226 0.58289 0.] [71.] [105.78374 0.76956 0.] [113.] 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 0.] [80.88061 0.] [88.75459 0.] [81.90270 0.] [79.94418 0.] [112.] [84.70484 0.94796 0.] [101.] [78.66751 0.] [72.94013 0.64758 0.73883 0.32878 0.79718 0.84387 0.93115 0. Valdez page 3 .55977 0.] [92.] [110.] [74.80988 0.90916 0.30247 Prepared by E.72225 0.] [76.] [98.] [109.] [102.38191 0.92619 0.] [111.] [90.51144 0.] [82.] [86.93579 0.62683 0.] [69.95150 0.] [73.] [93.] [96.Suggested solutions to DHW textbook exercises [68.86337 0.] [70.83320 0.88845 0. 70:130 t <.05700 [4.round(q.07070 0.01234 (b) To find the age last birthday at which (70) is most likely to die.03721 0.c("x".] [117.27652 0.function (t) { temp <. The R code to generate these probabilities for different values of t is given by tp70 <.] [121.] [125.20252 0.] [118.] [123. we need to evaluate the deferred probability t| q70 = tp70 − t+1p70 .rev(130-x) q <.25111 0.] 73 3 0.] 72 2 0.] [127.tbarq70(t) output <.17967 0."t|q70") print(output) This gives the output > print(output) x t t|q70 [1.] [119.] [124.] [129.] [115.] [116. Valdez page 4 .05653 [3.] [131.05582 [2.] [130.tp70(t+1) temp} x <.t.05796 0.04682 0.10101 0.A*t + (B/log(c))*c^70*(c^t-1) exp(-temp)} tbarq70 <.] 71 1 0.05719 [5.02230 0.cbind(x.08506 0.function (t) { temp <.13755 0.] [126.05709 Prepared by E.Suggested solutions to DHW textbook exercises [114.tp70(t) .01676 0.11853 0.A.22639 0.02907 0.15796 0.] [120.] [122.] 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 0.5)) colnames(output) <."t".] 70 0 0.] 74 4 0.] [128. 00000 0.] [44.00597 0.00002 0.02120 0.00000 0.00004 0.] [36.] [11.00000 0.05593 0.] [15.] [18.02454 0.00014 0.00000 Prepared by E.00000 0.01505 0.00778 0.05341 0.00000 0.00067 0.] 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 0.01802 0.] [26.] [51.] [9.05668 0.03144 0.00000 0.] [30.] [49.] [25.] [29.] [48.] [12.] [20.03821 0.] [31.] [21.] [45.05163 0.] [43.] [35.00105 0.00000 0.] [10.00326 0. Valdez page 5 .] [34.] [40.] [22.] [7.] [27.03487 0.] [39.00158 0.] [37.] [13.00000 0.A.] [50.04708 0.00000 0.00000 0.] [47.00000 0.] [32.00230 0.04139 0.] [42.05484 0.] [33.00007 0.00447 0.Suggested solutions to DHW textbook exercises [6.] [41.] [19.] [23.01233 0.] [24.00990 0.04436 0.04952 0.] [14.00041 0.] [16.] [46.] [38.] [8.00001 0.00024 0.] [17.02797 0.] [28. ] [58.] [55.sum(p70) e70 The output: > e70 [1] 9.A*t + (B/log(c))*c^70*(c^t-1) exp(-temp)} x <.A. Valdez page 6 .] [53.k+2 lim1 <.00000 According to this output.Suggested solutions to DHW textbook exercises [52.a+k*h Prepared by E. the age last birthday with the highest deferred probability of death is 73.] [54.4 (d).00000 0.] [57.(h/3)*(tp70(a) + 4* tp70(a+h) + tp70(a+2*h)) v <.] [59.00000 0.00000 0.25 k<-0 v1 <.] 121 122 123 124 125 126 127 128 129 130 51 52 53 54 55 56 57 58 59 60 0.] [60.] [56.00000 0.] [61.function (t) { temp <. We have the R code: exc <.00000 0.70:130 t <. (c) It can be shown that kp70 = exp − Ak + B 70 k c (c − 1) log(c) .tp70(t)[-1] e70 <.00000 0.00000 0. The following R code produces a table of kp70 for k = 1 to k = 70: tp70 <. we use again repeated application of the Simpson’s rule following the same logic as was done in Exercise 2.rev(130-x) p70 <.338684 (d) To evaluate the integral for the complete expectation of life for (70).v1 while (v1 > tol) { k <.00000 0.00000 0.function(tol) { a<-0 h<-. exc(tol) ec70 The output: > ec70 [1] 9.A.10^(-50) ec70 <.a+(k+1)*h lim2 <.834068 Prepared by E.Suggested solutions to DHW textbook exercises mid <. Valdez page 7 .(h/3)*(tp70(lim1) + 4*tp70(mid) + tp70(lim2)) v <.a+(k+2)*h v1 <.v + v1} v} tol <. (b) The life expectancy for a 50-year-old non-smoker can be expressed as ∞ ˚50 = e 0 tp50 dt.a+k*h mid <. ∗ Note that because tpx ≤ 1.function (t) { temp <.(h/3)*(tp50ns(a) + 4*tp50ns(a+h) + tp50ns(a+2*h)) v <.13 (a) We are given µ∗ = 2µx where ∗ refers to smokers and unstarred.(h/3)*(tp50ns(lim1) + 4*tp50ns(mid) + tp50ns(lim2)) v <. Valdez page 1 .ns <.v + v1} v} Prepared by E. non-smokers. It is easy x to verify that t ∗ tpx t t 2 = exp − 0 µ∗ ds x+s = exp −2 0 µx+s ds = exp − 0 µx+s ds = ( tpx )2 . On the other hand.07 tp50ns <. survival of smokers are worse than non-smokers.(B/log(c))*c^50*(c^t-1) exp(-temp)} tp50s <.Suggested solutions to DHW textbook exercises Exercise 2. The R code to evaluate the difference between these two life expectancies is given below (integrals are approximated using repeated Simpson’s rule): B <.tp50ns(t) temp^2} exc50.function(tol) { a<-0 h<-.function (t) { temp <.a+(k+1)*h lim2 <.0005 c <.25 k<-0 v1 <.A.0. the life expectancy for a 50year-old smoker can be found using ∞ ˚∗ = e50 0 ( tp50 )2 dt. then tpx = ( tpx )2 ≤ tpx .1. B where tp50 = exp − log(c) c50 (ct − 1) .k+2 lim1 <.a+(k+2)*h v1 <. Intuitively.v1 while (v1 > tol) { k <. for a 50-year-old.ns(tol) ec50sm <.76935 > ec50ns-ec50sm [1] 6.function (t) { tp50ns(t) B*c^(50+t) t^2 page 2 Prepared by E.20182 > ec50sm [1] 14.v + v1} v} tol <.v1 while (v1 > tol) { k <.25 k<-0 v1 <.432468 According to this result.k+2 lim1 <.sm <. there is a difference of 6. The following R code evaluates these respective variances: f50sq. (c) To calculate the variances.A.ns temp1 <temp2 <temp3 <<.10^(-50) ec50ns <. Valdez .a+(k+1)*h lim2 <.exc50.(h/3)*(tp50s(a) + 4*tp50s(a+h) + tp50s(a+2*h)) v <.function(tol) { a<-0 h<-.4 extra years of life expectancy between that of a non-smoker and a smoker.sm(tol) ec50ns ec50sm ec50ns-ec50sm The output is given by > ec50ns [1] 21.(h/3)*(tp50s(lim1) + 4*tp50s(mid) + tp50s(lim2)) v <.exc50. we use ∞ Var[T50 ] = 0 t2 tp50 µ50+t dt − (˚50 )2 e ∞ and ∗ Var[T50 ] = 0 2t2 ( tp50 )2 µ50+t dt − (˚∗ )2 e50 where the integrals in each of the first term in the variance formula are approximated using repeated Simpson’s rule.a+(k+2)*h v1 <.a+k*h mid <.Suggested solutions to DHW textbook exercises exc50. (ec50sm)^2 var.ns(a+2*h)) v <.(ec50ns)^2 var.sm(mid) + f50sq.sm(a+h) + f50sq.2*B*c^(50+t) temp3 <.v1 while (v1 > tol) { k <.(h/3)*(f50sq.sm(lim1) + 4*f50sq.sm(a) + 4*f50sq.sm <.A.a+(k+2)*h v1 <.t^2 temp1*temp2*temp3} esq50.a+k*h mid <.sm(tol) .ns(mid) + f50sq.a+(k+1)*h lim2 <.k+2 lim1 <.ns(a) + 4*f50sq.a+k*h mid <.v1 while (v1 > tol) { k <.(h/3)*(f50sq.sm(a+2*h)) v <.ns <.esq50.ns (for non-smokers) [1] 125.25 k<-0 v1 <.a+(k+1)*h lim2 <.esq50.v + v1} v} tol <.sm <.sm The output: > var.11494 Prepared by E.ns(a+h) + f50sq.v + v1} v} esq50.25 k<-0 v1 <.Suggested solutions to DHW textbook exercises temp1*temp2*temp3} f50sq.sm <.8860 > var.ns(lim2)) v <.10^(-50) var. Valdez page 3 .sm(lim2)) v <.tp50s(t) temp2 <.ns <.(h/3)*(f50sq.ns var.k+2 lim1 <.(h/3)*(f50sq.sm (for smokers) [1] 80.a+(k+2)*h v1 <.ns(lim1) + 4*f50sq.function(tol) { a<-0 h<-.function(tol) { a<-0 h<-.function (t) { temp1 <.ns(tol) . 14 (a) Starting with ∞ 1 tpx dt = 0 ∞ 1 0 tpx dt = 1 + ∞ t−1px+1 dt 1 1 tpx dt + ∞ 1 ∞ tpx dt ˚x = e ≤ 1+ ≤ 1+ px · t−1px+1 dt ∞ spx+1 ds 0 =1+ = 1 + ˚x+1 e The inequalities hold because we know that tpx ≤ 1 for all x and t. we found that if the force of mortality µx is non-increasing with age d p ≤ 0. However. you get the desired result. Valdez page 1 . A heuristic approach is to use the inequality Tx ≤ Tx+1 + 1 and by taking the expectation of both sides. dx t x Thus for forces of mortality that are non-increasing. the force of mortality generally decreases at infancy so that this does not generally hold for all ages x. (c) The difference between ˚x and ex is the additional average lifetime a person has in the year e of death. Prepared by E. intuitively. a person age x who reaches to live another year will live a longer life. an extra half-year would be expected to be lived. then dx t x d d ˚x = e dx dx ∞ tpx dt = 0 0 ∞ d p dt ≤ 0. (b) Because we know that Tx ≥ Tx = Kx .Suggested solutions to DHW textbook exercises Exercise 2. This leads us to x.A. taking the expectation of both sides gives us E[Tx ] ≥ E[Kx ] and the result immediately follows. then the average future lifetime will also be non-increasing. Here. (d) From Exercise 2.9. If we assume deaths uniformly occur between integral ages. we know that for human mortality pattern. then e d d g(x) = 1 + ˚x = 1 + µx˚x − 1 = µx˚x > 0. Each year you survive is an addition to your average age at death for certain. 0 Using a change of variable of integration t = x + s. Now taking the derivative of both sides with respect to x. The result follows because we know that µx = and ˚x = e f0 (x) S0 (x) ∞ 1 S0 (x) S0 (t)dt. Valdez page 1 . we find ∞ ∞ d ˚ = e dx x −S0 (x)S0 (x) + f0 (x) x S0 (t)dt S0 (x)2 f0 (x) = −1 + · S0 (x) S0 (t)dt x S0 (x) . Prepared by E.Suggested solutions to DHW textbook exercises Exercise 2. x Another approach to prove this is to use the result of Exercise 2. e (b) If we let g(x) = x + ˚x . e e e dx dx Thus. the higher your average age at death.15 (a) We know that ∞ ∞ spx ds 0 ˚x = e = 0 S0 (x + s) 1 ds = S0 (x) S0 (x) ∞ S0 (x + s)ds.A. This means that as you age. we find that ˚x = e 1 S0 (x) ∞ S0 (x + t)dt = 0 1 S0 (x) ∞ S0 (t)dt x and the result follows.9: d ˚ = e dx x ∞ tpx (µx − µx+t dt = µx 0 0 ∞ tpx dt − 0 ∞ tpx µx+t dt = µx˚x − 1. g is an increasing function of age x.