Loading required namespace: cubature
Chap 51 Exercises
Exercise 1 The Powerball is a weekly lottery famous for its outsized payoff. For instance, for the week of April 7, 2021, the jackpot payout was officially described as $43,000,000. But they don’t really mean this.
After withholding taxes, the supposed $43,000,000 amounts to $17,161,778 as a one time cash payment, or, alternatively, 30 annual payments of $873,711. (The tax numbers are for Colorado.) We want to find the discount rate that is implicit in the equating of $17M now with 30 payments of $875,000.
Discounted at a continuously compounded rate of
- Calculate this definite integral symbolically to find a formula for NPV
.
- Using Active R chunk 1, implement the function NPV
in R.
- Solve for
that gives NPV .
- Translate the continuously compounded interest rate
into the corresponding 1-year compounded interest rate .
There is a joke that makes sense only to the financially savvy: When the Powerball claims a $1 million payout, they mean $1 per year over a million years. We can do this calculation using the symbolic formula for NPV(t) but replacing the $875,000 with $1 and the 30 years upper limit of the integral with 1,000,000 years.
- Set the discount rate to the
you found in step (3) and calculate the net present value of $1 per year for a million years.
Exercise 2 In this exercise, you will calculate the net present value of the social security payments for a woman retiring at age 70. We will assume that benefits are paid at a rate of $24,000 per year.
The R/mosaic commands in Active R chunk 2 will construct a function, survive(age)
that gives the proportion of people alive at age 70 who will survive to an older age. (This is estimated from the Social Security mortality tables for 2014.)
For a person living to age 100, the net present value at age 70 of the
- Benefit payments stop when a beneficiary dies. Of course, it is not known ahead of time when a retiree will die, but the
survive(age)
function gives a probability of surviving to any given age.
Modify the integral to incorporate the survival probability into the net present value calculation. That is, calculate the expectation value of the net present value.
- Is
survive(age)
a probability density function? Explain why or why not.
Exercise 3 We have records of large earthquakes going back 1000’s of years, at least in those parts of the world that kept written records. In regions with mainly oral traditions, stories of historical earthquakes are treated with skepticism.
For instance, in California written records reach about 400 years into the past. Anticipating a future earthquakes is an everyday matter in California and governments in seismically active zones have prepared by means of building codes and emergency precautions. A bit further up the US West Coast, in the Cascadia region of Oregon, there is a shorter written record and, until the last 30-40 years, little realization that the area has been subject to profoundly powerful earthquakes called “great quakes.” There are great quakes in living memory: the 2004 Boxing Day earthquake centered on Sumatra that led to the deaths of hundreds of thousands of people, and the 2011 Tohoku earthquake in Japan that killed tens of thousands and led to the meltdown of nuclear power plants in Fukashima. Both of these were magnitude 9.1. Even larger were the 1964 9.2 magnitude quake in southern Alaska and the magnitude 9.5 Valdivia earthquake in Chile in 1960. The local magnitude scale is logarithmic, so a 9.5 magnitude quake releases about 3 times the energy of a 9.1 magnitude quake.
This exercise explores a model to inform the extent to which it is worth preparing for such quakes to prevent material damage. The risk to life is another important matter. But feasible investments in the build environment can minimize the direct impact of earthquakes to human life. Tsunamis generated by quakes are another matter, for which the only effective mitigating precautions are the development of evacuation routes and procedures and relocation of building away from the affected zone.
Let’s imagine a situation in which $100 spent in precautions such as strengthening building construction would generate $1000 in savings in the event of a major earthquake. (This ratio is made up for demonstration purposes, but you can easily substitute a better substantiated estimate.) From a societal point of view, many people would see the investment as worthwhile. But we will take a more technical point of view that incorporates two factors:
- The $100 is to be spent today, while the $1000 savings will occur in the future. This can be handled by simple discounting.
- The time until the earthquake is unknown, although reasonable probability models are available.
The time of the last great Cascadia Zone earthquake is known with surprising precision: January 26, 1700. Before this, dates are estimated from geologic evidence. The figure shows the known history of Cascadia Zone earthquakes. Source

A standard model for the interval between earthquakes of a given magnitude is the exponential distribution. For the great quakes in the Cascadia Zone, the average interval between consecutive quakes is about 300 years and the corresponding exponential probability distribution is
As shown by the definite integral already coded in Active R chunk 3, the total probability of an earthquake at some point in the future is, according to the model, 100%. So this is a model of when an earthquake will occur, not whether one will occur.
Almost everyone who meets the exponential probability model is surprised that the density is highest at time
- By using the appropriate definite integral, find the probability for earthquakes separated on average by 300 years (this essentially means using the provided model in the code) that the actual interval from the last quake will be less than 30 years. Which percentage is closest?
question id: kangaroo-find-magnet-1
- Similarly to the previous question, find the probability that the actual interval from the last quake will be more than 500 years. (Hint: Be thoughful about what the limits of integration will be.)
question id: kangaroo-find-magnet-2
An astounding and counter-intuitive aspect of the exponential model is that the same probability density describes the time from now to the eventual earthquake. In other words, it does not matter how long it has been since the last earthquake.
Now let’s put together our model of the net present value of an expenditure on earthquake preparedness. As you recall, the net present value of
Of course
For continuous probability densities (such as the exponential earthquake interval model) an expectation value is the definite integral over all possibilities of the probability density times the eventual outcome.
- Using the information presented above about the probability density function and the net present value, which of the following is appropriate for calculation of the net present value of $10 spent today for earthquake preparedness?
question id: kangaroo-find-magnet-3
The integral gives only the net present value of the eventual benefit of earthquake preparedness. If this is larger than today’s expenditure, the expenditure is economically worthwhile.
- What is the numerical value (in dollars) of the correct integral from the previous question?
question id: kangaroo-find-magnet-4
WHAT SHOULD THE DISCOUNT RATE BE IF YOU BELIEVE THE SAFETY MEASURES ARE WORTHWHILE?
We used an average time between earthquakes of 300 years, as seem appropriate for the Cascadia Zone earthquake history. The net present value of the eventual reduction in damages was small, too small to justify the expenditure on economic grounds.
Modify the code in the above sandbox to perform the calculation for different earthquakes, say with an average interval of 50 years or 100 years.
5. What's the longest average interval that generates a net present value of the damage reduction of $\$10$, enough to justify the expenditure? Pick the closest one. (Hint: You can try out expectation value integral using the average intervals given as choices in place of the 300-year interval originally used.)
```{mcq}
#| label: kangaroo-find-magnet-5
#| show_hints: true
1. 25 years
2. 50 years [ correct hint: right-o ]
3. 100 years
4. 150 years
```
WARNING. You should not come away from this exercise with the idea that
When it comes to groups of people, the appropriate discount rate becomes a matter of opinion and disagreement. In particular, there is a concept called the “social discount rate”. Regretably, there is no clear basis for picking this other than to put it in the range 0 to about 7%. Net present value is therefore a dubious criterion for making decisions whose impact will be felt in the long term, over generations. This is the case, for instance, with global warmi
Activities
Exercise 4 The mathematician’s preferred format for discounting functions is
Derive an expression for
Use the computer to confirm your expression by plotting out both
Exercise 5 One common measure of quality of life is “life expectancy at birth.” A measure of the availability of health care is the number of physicians per 1000 people.
The question we will examine is whether life expectancy is a function of the availability of health care and, if so, what kind of function it is.
The data frame LifeExpectancyPhysicians
contains the official 2010 figures from many countries for life expectancy and the number of physicians per 1000 population.
Graph LifeExpectancy
versus Physicians
. Use linear axes, semi-log axes, or log-log axes to determine a reasonable functional form. (Recall that giving scale_y_log10()
as an argument to gf_refine()
will set the y axis on a log scale, and similarly for the x axis.)
Using fitModel()
, your instructor found the following model of life-expectancy (which we will call L, in years) as a function of physicians-per-1000 people. (we will call this “doctor-density” for short, so D.)
The instructor’s model is:
- What kind of function is the instructor’s proposed model?
linear
exponential
power-law
sigmoid
question id: available-health-care-1
- According to the instructor’s model, what’s the life expectancy when there are no physicians at all?
0 years
35 years
50 years
70 years
100 years
115 years
question id: available-health-care-2
- According to the instructor’s model, would be the life expectancy if every person in the world were a physician? (Hint: Translate this into physicians/1000-people.)
0 years
35 years
50 years
70 years
100 years
110 years+
question id: available-health-care-3
It could be argued that the doctor-density should be a function of life expectancy rather than the other way around. (All those seniors consume a lot of medical care.)
- Which of these models agrees reasonably well with the data? (Hint: You can plot the model over the data.)
question id: available-health-care-4
The question now is whether the function
to compare them, we have to make both of them functions of the same input. Let’s say we take
Using algebra, confirm that
- Which model,
or is a better match to the data when ?
They are the same function.
question id: available-health-care-5
Complex social phenomena, like life expectancy, are … Well, complex. Life expectancy depends on many factors other than health care: nutrition, war, automobile safety, etc.
Notice from the data that the countries with the highest life expectancies are those where