Fast Formulas #4: Geometric Series (One of the Tricks)

In Fast Formulas #3: Pool Average Life with CPR Prepayments, I presented Formula 3.1, a shortcut calculation for the average life of a loan pool under a constant prepayment assumption.  I mentioned that Formula 3.1 was derived by using “a couple of tricks.”  Cameron asked in a comment if I could explain the tricks.  In this post, I will explain one of the tricks, which is the foundation for many financial calculations.  I will give the full derivation of Formula 3.1 in a later post.

The trick also relates to a recent post about Matt Henderson’s mathematical animations.  Matt gave me permission to reproduce one of his animations.  I selected not his most dazzling work, but an example I could use for this discussion.  It is a clever demonstration that

1/4 + 1/16 + 1/64 + 1/256 + . . . = 1/3

Each new term always equals its predecessor multiplied by 1/4.  When a constant factor generates new terms in this way, we have a geometric series (in mathspeak, a series is a list that is added together, and a sequence is just a list).  Since the addition never stops in this case, it is an infinite geometric series.  We could write it as:

Q = q + q2 + q3 + . . .                                                                                                                   (4.1)

If q is between -1 and +1, then the terms will continue to get smaller and the series converges to some value Q.  But what is Q?  And how could we ever find the result of an endless addition?

It is actually very easy.  Consider qQ.  Multiplying every term of Q by q, we have

qQ = q2 + q3 + q4 +. . .

Notice that the terms Q and qQ are all the same, except that Q has the initial term q.  You could make Q from qQ by inserting a q at the front and shoving all the other terms one place to the right.  This is similar to Hilbert’s infinite hotel that could always accommodate a new guest even if it had no vacancies:  just move the old guest in Room 1 to Room 2, the one in Room 2 to Room 3, and so on.

Now subtract qQ from Q:

QqQ = q + (q2q2) + (q3q3) + . . . =  q

We’re almost done.  Since Q – qQ is (1 – qQ, we have

(1 – qQ = q

Q = q / (1 – q)                                                                                                                             (4.2)

With q = ¼ in Matt’s animation, we see that

Q = ¼ / ¾ = 1/3, as he showed.

Now suppose our series is merely finite, with n terms:

Q = q + q2 + q3 + . . . + qn-1 + qn                                                                                               (4.3)

As before, consider qQ

qQ = q2 + q3 + . . . + qn + qn+1

and subtract qQ from Q:

Q – qQ = q + (q2 – q2) + (q3 – q3) + . . .  + (qn – qn) – qn+1 = qqn+1

Since the qn+1 term appears in qQ but no in Q, it does not get cancelled out (this is like a finite hotel where not everyone can be accommodated).  So

(1 – q) Q = qqn+1

Q = (qqn+1)/(1 – q)                                                                                                                (4.4)

Formula 4.4, the shortcut for a finite geometric series, is one of the tricks I used to derive Formula 3.1.