survival models solution chapter 2

27
Suggested solutions to DHW textbook exercises Exercise 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 = Z 55 0 p t 50 dt = Z 55 0 1 - t 55 1/5 dt = 55 Z 1 0 u 1/5 du = 55(5/6) = 45.83333. (g) The curtate expectation of life at age 50 is e 50 = 55 X k=1 p k 50 = 55 X 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

Upload: nayaz-maudarbucus

Post on 13-Oct-2014

736 views

Category:

Documents


14 download

TRANSCRIPT

Page 1: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.1

(a) The probability that a newborn life dies before age 60 is given by

Pr[T0 ≤ 60] = F0(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[T30 > 40] =Pr[T0 > 70]

Pr[T0 > 30]=

1− F0(70)

1− F0(30)=

351/5

751/5=

(7

15

)1/5

= 0.8586207.

(c) The probability that (20) dies between 90 and 100 is

Pr[70 < T20 ≤ 80] =Pr[90 < T0 ≤ 100]

Pr[T0 > 20]=F0(100)− F0(90)

1− F0(20)=

151/5 − 51/5

851/5= 0.1394344.

(d) First, derive the form of the force of mortality:

µx =f0(x)

1− F0(x)=dF0(x)/dx

1− F0(x)=

15

(1− x

105

)−4/5 ( 1105

)(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[T50 > 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

pt 50 = Pr[T50 > t] =Pr[T0 > 50 + t]

Pr[T0 > 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

pt 50dt =

∫ 55

0

(1− t

55

)1/5

dt = 55

∫ 1

0

u1/5du = 55(5/6) = 45.83333.

(g) The curtate expectation of life at age 50 is

e50 =55∑

k=1

pk 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

Page 2: Survival Models Solution Chapter 2

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 S0(x)so that

p20 0 = Pr[T0 > 20] = S0(20) =18000 − 110(20) − 202

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

S20(t) = Pr[T20 > t] =Pr[T0 > 20 + t]

Pr[T0 > t]=S0(20 + t)

S0(20)

=[18000 − 110(20 + t) − (20 + t)2]/18000

[18000 − 110(20) − 202]/18000

=[18000 − 110(20) − 110t− 202 − 40t− t2]/18000

[18000 − 110(20) − 202]/18000= 1 − 150t+ t2

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

15400− 150(10) + 102

15400

=1800

15400=

9

77= 0.1168831.

(f) The force of mortality at age x is given by

µx =−dS0(x)/dx

S0(x)=

[110 + 2x]/18000

[18000 − 110x− x2]/18000=

110 + 2x

18000 − 110x− x2,

so that µ50 =110 + 2(50)

18000 − 110(50) − 502=

21

1000= 0.021.

Prepared by E.A. Valdez page 1

Page 3: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.3

We are given

S0(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|17q0 = Pr[19 < T0 ≤ 36] = S0(19)− S0(36)

=811/2 − 641/2

10=

1

10= 0.10.

Prepared by E.A. Valdez page 1

Page 4: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.4

(a) To show S0 is a legitimate survival function, we show 3 conditions:

(i) S0(0) = 1: trivial

(ii) limx→∞

S0(x) = 0: Since all parameters A, B, C and D are all positive, then the term

Ax+ 12Bx2 + C

log DDx − C

log D→∞ as x→∞ so that lim

x→∞S0(x) = e−∞ = 0.

(iii) S0 must be non-increasing: Define the term H(x) = Ax+ 12Bx2 + C

log DDx − C

log Dso

thatdH(x)

dx= A+Bx+ CDx and that

dS0(x)

dx= −e−H(x)dH(x)

dx,

which is clearly strictly negative for all x.

(b) We have

Sx(t) =S0(x+ t)

S0(x)=

exp{−[A(x+ t) +B(x+ t)2 + C

log DDx+t − C

log D

]}exp

{−[Ax+Bx2 + C

log DDx − C

log D

]}= exp

{−[At+B(2xt+ t2) +

C

logDDx(Dt − 1)

]}.

(c) The force of mortality at age x can be expressed as

µx =−dS0(x)/dx

S0(x)=e−H(x) dH(x)

dx

e−H(x)= A+Bx+ CDx.

The force of mortality has a similar form to that of Makeham’s except for the additionof a linear term on age x.

(d) Solving all of part (d) requires use of a computer software. Here we give our solutioncoded in R. [slightly differ from textbook answers]

(i) Note that we can express

pt 30 = S30(t) = exp

{−[At+B(60t+ t2) +

C

logDD30(Dt − 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

Page 5: Survival Models Solution Chapter 2

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

qt 40 = 1− S40(t) = 1− exp

{−[At+B(80t+ t2) +

C

logDD40(Dt − 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|10q30 = pt 30 − pt+10 30.

This gives the probability that a life (30) will survive the next t years but dies thefollowing 10 years after that. The R code to compute this for different values of t isgiven by

Prepared by E.A. Valdez page 2

Page 6: Survival Models Solution Chapter 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 ex =∞∑

k=1

pk x. The logic

in the R code is to keep summing the term pk x until a certain level of very smalltolerance. Here we choose our tolerance to be 10−50, indeed a very small value. TheR 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

Page 7: Survival Models Solution Chapter 2

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

pt xdt. To approximate this integral, we use repeated

application of Simpson’s rule given in Appendix B of the book:∫ a+2h

a

pt xdt ≈h

3[ pa x + 4 pa+h x + pa+2h x],

starting with a = 0 and choosing h = 0.25. We repeat and calculate additivelythe integral for consecutive intervals of length 2h, until a certain level of very smalltolerance. Here we choose h = 0.25 and our tolerance to be 10−50. The R code tocompute 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

Page 8: Survival Models Solution Chapter 2

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

Page 9: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.5

Clearly, F0(t) is the cdf of an Exponential with mean 1/λ. So T0 has an Exponential distribution.

(a) Since S0(t) = e−λt, we have

Sx(t) =S0(x+ t)

S0(x)=e−λ(x+t)

e−λx= e−λt.

Thus, we see that Tx also has the same Exponential distribution as T0.

(b) µx =−dS0(x)/dx

S0(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

ex =∞∑k=1

pk x =∞∑k=1

Sx(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 webecome 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 isexhibited by the Exponential distribution.

Prepared by E.A. Valdez page 1

Page 10: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.6

(a) px+3 = 1 − qx+3 = 1 − 0.02 = 0.98

(b) p2 x = px · px+1 = (0.99)(0.985) = 0.97515

(c) Since p3 x+1 = p2 x+1 · px+3, then p2 x+1 =p3 x+1

px+3

=0.95

0.98= 0.9693878

(d) p3 x = px · p2 x+1 = (0.99)(0.9693878) = 0.9596939

(e) 1|2qx = px · q2 x+1 = px(1 − p2 x+1) = 0.99(1 − 0.9693878) = 0.03030612

Prepared by E.A. Valdez page 1

Page 11: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.7

(a) S0(x) = 1− F0(x) =1

1 + x

(b) f0(x) =dF0(x)

dx=

1

(1 + x)2

(c) Sx(t) = pt x =S0(x + t)

S0(x)=

1 + x

1 + x + t= 1− t

1 + x + t

(d) p20 = S20(1) =21

22= 0.9545455

(e) 10|5q30 = p10 30 − p15 30 =31

41− 31

46= 0.08218452

Prepared by E.A. Valdez page 1

Page 12: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.8

One can easily verify that S0(x) = e−0.001x2, for x ≥ 0, is a legitimate survival function by

showing that (i) S0(0) = 1, (ii) limx→∞

S0(x) = 0, and (iii) S0(x) is non-increasing in x.

(a) f0(x) = −dS0(x)

dx= 0.002xe−0.001x

2

. One may recognize that this has the form of a density

function of a Weibull.

(b) µx =f0(x)

S0(x)=

0.002xe−0.001x2

e−0.001x2 = 0.002x. In this case, the force of mortality is linearly

increasing with age x.

Prepared by E.A. Valdez page 1

Page 13: Survival Models Solution Chapter 2

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

∂zdx+ f(b(z), z)

∂b(z)

∂z− f(a(z), z)

∂a(z)

∂z

Therefore, we have

d

dxpt x =

d

dxexp

(−∫ x+t

x

µsds

)= − exp

(−∫ x+t

x

µsds

)· ddx

∫ x+t

x

µsds

= − pt x(µx+t − µx)

= pt 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 expectd

dxpt x to be

non-positive. This implies that as we grow older with age, the rate of change of surviving foranother fixed t years decreases.

Prepared by E.A. Valdez page 1

Page 14: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.10

For Gompertz law, we have µx = Bcx so that

µ50

µ30

=0.000344

0.000130=

172

65= c20.

This gives us c = (172/65)1/20 and thus, we have

p10 40 = exp

{−∫ 10

0

µ40+sds

}= exp

{−Bc40

∫ 10

0

csds

}= exp

{− B

log(c)c40(c10 − 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

Page 15: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.11

(a) It is not difficult to show that under Makeham’s law, we have

S0(x) = exp

{∫ x

0

(A + Bcz)dz

}= exp

{−[Ax +

B

log(c)(cx − 1)

]}.

It follows therefore that

pt x = Sx(t) =S0(x + t)

S0(x)

=exp

{−[A(x + t) + B

log(c)(cx+t − 1)

]}exp

{−[Ax + B

log(c)(cx − 1)

]}= e−At− B

log(c)cx(ct−1) = stgc

x(ct−1)

where clearly s = e−A and g = e−B/ log(c).

(b) We use result of part (a) by noting that

log pt x = t log(s) + cx(ct − 1) log(g).

It therefore follows that

log p10 70 − log p10 60

log p10 60 − log p10 50

=10 log(s) + c70(c10 − 1) log(g) − 10 log(s) − c60(c10 − 1) log(g)

10 log(s) + c60(c10 − 1) log(g) − 10 log(s) − c50(c10 − 1) log(g)

=c60(c10 − 1)

c50(c10 − 1)= c10.

The result follows immediately by raising both sides to the power of 0.10. Such propertycan indeed be generalized as follows: fix x and t, the following can be similarly verified:

c =

[log pt x+2t − log pt x+t

log pt x+t − log pt x

]1/t

Prepared by E.A. Valdez page 1

Page 16: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.12

(a) For Makeham’s law, it can easily be verified that

px = exp

{−[A +

B

log(c)cx(c− 1)

]}.

The following R code produces a table of px 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

Page 17: Survival Models Solution Chapter 2

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

Page 18: Survival Models Solution Chapter 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

Page 19: Survival Models Solution Chapter 2

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 thedeferred probability

t|q70 = pt 70 − pt+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

Page 20: Survival Models Solution Chapter 2

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

Page 21: Survival Models Solution Chapter 2

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 ofdeath is 73.

(c) It can be shown that

pk 70 = exp

{−[Ak +

B

log(c)c70(ck − 1)

]}.

The following R code produces a table of pk 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 repeatedapplication 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

Page 22: Survival Models Solution Chapter 2

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

Page 23: Survival Models Solution Chapter 2

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 easyto verify that

p∗t x = exp

(−∫ t

0

µ∗x+sds

)= exp

(−2

∫ t

0

µx+sds

)=

[exp

(−∫ t

0

µx+sds

)]2= ( pt x)2 .

Note that because pt x ≤ 1, then p∗t x = ( pt x)2 ≤ pt x. Intuitively, survival of smokers areworse than non-smokers.

(b) The life expectancy for a 50-year-old non-smoker can be expressed as

e̊50 =

∫ ∞0

pt 50dt,

where pt 50 = exp{− B

log(c)c50(ct − 1)

}. On the other hand, the life expectancy for a 50-

year-old smoker can be found using

e̊∗50 =

∫ ∞0

( pt 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

Page 24: Survival Models Solution Chapter 2

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 lifeexpectancy between that of a non-smoker and a smoker.

(c) To calculate the variances, we use

Var[T50] =

∫ ∞0

t2 pt 50µ50+tdt− (̊e50)2

and

Var[T ∗50] =

∫ ∞0

2t2 ( pt 50)2 µ50+tdt− (̊e∗50)

2

where the integrals in each of the first term in the variance formula are approximatedusing 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

Page 25: Survival Models Solution Chapter 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

Page 26: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.14

(a) Starting with

e̊x =

∫ ∞0

pt xdt =

∫ 1

0

pt xdt+

∫ ∞1

pt xdt

≤ 1 +

∫ ∞1

pt xdt = 1 +

∫ ∞1

px · pt−1 x+1dt

≤ 1 +

∫ ∞1

pt−1 x+1dt = 1 +

∫ ∞0

ps x+1ds

= 1 + e̊x+1

The inequalities hold because we know that pt x ≤ 1 for all x and t.

A heuristic approach is to use the inequality Tx ≤ Tx+1 +1 and by taking the expectationof both sides, you get the desired result. Here, intuitively, a person age x who reaches tolive another year will live a longer life.

(b) Because we know that Tx ≥ bTxc = Kx, taking the expectation of both sides gives usE[Tx] ≥ E[Kx] and the result immediately follows.

(c) The difference between e̊x and ex is the additional average lifetime a person has in the yearof death. If we assume deaths uniformly occur between integral ages, an extra half-yearwould 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, thend

dxpt x ≤ 0. This leads us to

d

dxe̊x =

d

dx

∫ ∞0

pt xdt =

∫ ∞0

d

dxpt xdt ≤ 0.

Thus for forces of mortality that are non-increasing, then the average future lifetime willalso be non-increasing. However, we know that for human mortality pattern, the force ofmortality generally decreases at infancy so that this does not generally hold for all agesx.

Prepared by E.A. Valdez page 1

Page 27: Survival Models Solution Chapter 2

Suggested solutions to DHW textbook exercises

Exercise 2.15

(a) We know that

e̊x =

∫ ∞

0

ps xds =

∫ ∞

0

S0(x+ s)

S0(x)ds =

1

S0(x)

∫ ∞

0

S0(x+ s)ds.

Using a change of variable of integration t = x+ s, we find that

e̊x =1

S0(x)

∫ ∞

0

S0(x+ t)dt =1

S0(x)

∫ ∞

x

S0(t)dt

and the result follows. Now taking the derivative of both sides with respect to x, we find

d

dxe̊x =

−S0(x)S0(x) + f0(x)

∫ ∞

x

S0(t)dt

S0(x)2= −1 +

f0(x)

S0(x)·

∫ ∞

x

S0(t)dt

S0(x).

The result follows because we know that

µx =f0(x)

S0(x)

and

e̊x =1

S0(x)

∫ ∞

x

S0(t)dt.

Another approach to prove this is to use the result of Exercise 2.9:

d

dxe̊x =

∫ ∞

0

pt x(µx − µx+tdt = µx

∫ ∞

0

pt xdt−∫ ∞

0

pt xµx+tdt = µxe̊x − 1.

(b) If we let g(x) = x+ e̊x, then

d

dxg(x) = 1 +

d

dxe̊x = 1 + µxe̊x − 1 = µxe̊x > 0.

Thus, g is an increasing function of age x. This means that as you age, the higher youraverage age at death. Each year you survive is an addition to your average age at deathfor certain.

Prepared by E.A. Valdez page 1