motivated by email from George L.
Here's the problem:
 I want to provide a pension of $1.00 per year to Sam, every year until Sam drops dead.
 Today, I have $A in my bank account, invested at r%.
 I ask: "How large should A be so that I will have enough to pay Sam, until he dies?"
If Sam is still living after, say, 7 years then I'd be paying him that $1.00 seven years from now.
Of course, if the $1.00 were indexed to, say i% inflation, I'd have to pay Sam $1.00 (1+i)^{7}.
I then need (1+i)^{7}/(1+r)^{7} today
in order to pay Sam $1.00 plus seven years of inflation ... seven years from now.
To estimate the required value of A we do this:
 Assume that I have N such Sams and I pay each of them until they drop dead.
 If, after 1 year, N_{1} are still alive then I'd have to pay $N_{1}(1+i) which means I should have N_{1}(1+i)/(1+r) today in my bank account
 If, after 2 years, N_{2} are still alive then I'd have to pay $N_{2}(1+i)^{2} which means I should have N_{2}(1+i)^{2}/(1+r)^{2} today
 If, after 3 years, N_{3} are still alive then I'd have to pay $N_{3}(1+i)^{3} which means I should have N_{3}(1+i)^{3}/(1+r)^{3} today
 etc. etc.
>Yeah, so?
So the amount I'd need, for N people like Sam, is
N_{1}(1+i)/(1+r) + N_{2}(1+i)^{2}/(1+r)^{2} + N_{3}(1+i)^{3}/(1+r)^{3} + ...
So, for just one person (namely Sam) I divide by N and get:
A = (N_{1}/N)(1+i)/(1+r) + (N_{2}/N)(1+i)^{2}/(1+r)^{2} + (N_{3}/N)(1+i)^{3}/(1+r)^{3} + ...
We now recognize things like p(k) = N_{k}/N as the fraction of people (like Sam) who are expected to survive for k years.
That'd give:
A = Σ p(k) {(1+i)/ (1+r)}^{k}
where p(k) is the probability of surviving to year k.

Note:
We can replace (1+r) / (1+i) with 1+R where R = (ri)/(1+i) is the inflationadjusted (or "real") return.
>What's that p(k)?
For Sam, it might look like Figure 1. Note that the values of p(k) decrease rapidly to zero so the infinite sum
indicated above will turn out to be finite.
>Huh?
What's the probability of your living another 100 years or more?
>So p(100) = 0, eh?
Yeah, and p(101)=0 and p(102)=0 and so on.
 Figure 1

Of course, the chart in Figure 1 will depend upon Sam's age, whether or not he's married, whether he smokes, whether he ...
>And sex?
Beg pardon?
Uh ... yes, it'd be different for females  and we'd need to have these probabilities for each population type  smokers, married types, etc..
However, if we had the Life Expectancies for people at various ages, we could estimate these numbers. For this, we might use
the magic formula described here, namely:
Probability that an nyearold will survive for k years is
* p(n,k) =
where m and c are constants 
>Mamma mia! Will you have a spreadsheet to do all this stuff?
I'm workin' on it, but ...
>One other thing. What if Sam wanted more than a $1.00 pension?
If Sam wanted $50,000 and (for Sam) A turns out to be 15, then we'd need 15*50,000 = $750,000 in the bank to pay for Sam's annual pension.
If I were in the Life Insurance business I'd charge Sam $750,000 and promise him a lifetime income of $50K per year.
>Until he drops dead.
Well, yes. But if Sam is married and wants his wife to receive that pension until she dies, I can do that, too.
>With different p(k), right?
Right, and for our various estimates (using the magic equation *)
we can fiddle with m and c.
By the way, when I shopped for my own life annuity I was interested to see what my payments would be
... as a percentage of the premium I had to pay.
For Sam, if he got $1.00 per year and had to pay A = $15 for this annuity, then that percentage is 1/15 = 0.067 or 6.7%.
If he got $50K and the premium was $750K the ratio is still 1/15 or 6.7%.
>So it's just 1/A, right?
Yes.
>So where's the spreadsheet?
It'll look like this:
You can try various values for m and c and various ages n and you can even set some range of ages
(say from 55 to 70), click a button and get a chart of the Funds Required for a $1.00 annual pension
(that's the middle chart) and a chart of the Annuity rate
(that's 100/A, the right chart).
>Sounds like fun!
Doesn't it?
