You are on page 1of 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(160/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: veried 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 veried 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: Dene 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 Makehams 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 dier 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 dierent 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 dierent 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 dierent 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 dierent 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 Simpsons 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 dierent 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 dierentiating 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 xed 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 dicult to show that under Makehams 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: x x and t, the following can be similarly veried:
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 Makehams law, it can easily be veried 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 nd 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 dierent 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 Simpsons 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

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 dierence between these two life expectancies is given below
(integrals are approximated using repeated Simpsons 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 dierence 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 rst term in the variance formula are approximated
using repeated Simpsons 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
t1 x+1
dt
1 +


1
p
t1 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 dierence betweene
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 nd 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 nd
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

You might also like