SigmaField
Mathematical Foundations for Quant Finance
0 of 256 lessons
      1. 1.5.1 SequencesConcept · 25 min
      2. 1.5.2 Arithmetic and geometric seriesConcept · 20 min
      3. 1.5.3 Infinite series and when they convergeConcept · 25 min
      4. 1.5.4 Practice set: seriesPractice set · 20 min
      5. 1.5.5 Case study: annuities, perpetuities and bond pricesCase study · 35 min

Level 1, Precalculus 1.5 Sequences and series Lesson 2 of 5

ConceptLesson 1.5.2 in Level 1, Precalculus. About 20 minutes.

Arithmetic and geometric series

Series and partial sums

A series adds up the terms of a sequence. The sum of the first nn terms is the partial sum SnS_n. It has the same units as the terms: a sum of dollars is in dollars.

Sn=a1+a2+⋯+an=∑k=1nakS_n = a_1 + a_2 + \cdots + a_n = \sum_{k=1}^{n} a_k

For the terms 3, 7, 11, 15, the partial sums are S1=3S_1 = 3, S2=10S_2 = 10, S3=21S_3 = 21 and S4=36S_4 = 36. The partial sums form a sequence of their own.

That sequence has a recursive rule (lesson 1.5.1): each partial sum is the one before plus the next term. Running it backwards recovers any term from two partial sums.

Rule: Partial sums

Sn=Sn−1+anan=Sn−Sn−1\begin{gathered} S_n = S_{n-1} + a_n \\ a_n = S_n - S_{n-1} \end{gathered}

Start from S0=0S_0 = 0, the empty sum of lesson 0.2.2. From the partial sums above, a4=S4−S3=36−21=15a_4 = S_4 - S_3 = 36 - 21 = 15.

Try it

np.cumsum ("cumulative sum") returns every partial sum at once: the running total after each term.

The last line recovers the fourth term from two partial sums. Python counts from 0, so S4S_4 is partial[3].

⌘/Ctrl + Enter runs the cell

Arithmetic series

Add the whole numbers from 1 to 100. Pair the first with the last, 1+1001 + 100, then the second with the second-last, 2+992 + 99. Every pair makes 101, and there are 50 pairs, so the total is 5050.

The pairing works for every arithmetic sequence, because each step up from the front matches a step down from the back. Write the sum twice, once backwards, and every column holds the first term plus the last.

Two copies of 3+7+11+15+193 + 7 + 11 + 15 + 19, one upside down on the other. Every column holds 3+19=223 + 19 = 22, so the sum is 5×222=55\frac{5 \times 22}{2} = 55.

Rule: Arithmetic series

Sn=n (a1+an)2=n2(2a1+(n−1) d)\begin{gathered} S_n = \frac{n\,(a_1 + a_n)}{2} \\ = \frac{n}{2}\big(2a_1 + (n - 1)\,d\big) \end{gathered}

The number of terms times the average of the first and last. The second form uses an=a1+(n−1)da_n = a_1 + (n - 1)d from lesson 1.5.1, for when you know dd but not the last term.

Before using the formula, count the terms. From a1a_1 to ana_n in steps of dd there are an−a1d+1\frac{a_n - a_1}{d} + 1 terms. So 3+7+⋯+793 + 7 + \cdots + 79 has 79−34+1=20\frac{79 - 3}{4} + 1 = 20 terms, and its sum is 20×(3+79)2=820\frac{20 \times (3 + 79)}{2} = 820.

A table and the algebra

For 3, 7, 11, …, the nn-th term is 4n−14n - 1, so the formula gives Sn=n(3+4n−1)2=n(2n+1)S_n = \frac{n(3 + 4n - 1)}{2} = n(2n + 1).

nn1234520
SnS_n, added up310213655820
n(2n+1)n(2n + 1)310213655820

A negative difference

The formula does not care about signs. 40+34+28+⋯+(−20)40 + 34 + 28 + \cdots + (-20) has −20−40−6+1=11\frac{-20 - 40}{-6} + 1 = 11 terms and sums to 11×(40−20)2=110\frac{11 \times (40 - 20)}{2} = 110. When the first and last terms cancel, as in 15+9+3−3−9−1515 + 9 + 3 - 3 - 9 - 15, the sum is 0.

Try it

Lines 1, 2 and 4 add a series directly and with the formula, and each pair agrees. Line 3 is the table's last row; line 5 is the sum that cancels.

range(40, -21, -6) counts down in steps of 6 and stops before −21-21, so it ends at −20-20.

⌘/Ctrl + Enter runs the cell

Geometric series

Take S=1+2+4+8+16S = 1 + 2 + 4 + 8 + 16, which is 31. Doubling every term gives 2S=2+4+8+16+322S = 2 + 4 + 8 + 16 + 32. The two lists share four terms, so subtracting one from the other leaves only the ends.

Multiplying by the ratio shifts the terms one place along. The matched terms cancel, so 2S−S=32−12S - S = 32 - 1 and S=31S = 31.

The same shift works for any ratio rr. With first term aa and nn terms, rSrS and SS share all but two terms, so S−rS=a−arnS - rS = a - ar^n. Dividing by 1−r1 - r gives the formula.

Lesson PG3.2 in the Proof Gym proves it for every nn, and shows why it needs r≠1r \ne 1.

Rule: Geometric series

Sn=a+ar+⋯+arn−1=a 1−rn1−r(r≠1)\begin{gathered} S_n = a + ar + \cdots + ar^{n-1} \\ = a\,\frac{1 - r^n}{1 - r} \qquad (r \neq 1) \end{gathered}

aa is the first term, rr the ratio and nn the number of terms. When r>1r > 1, the same thing written as arn−1r−1a\frac{r^n - 1}{r - 1} keeps both top and bottom positive.

For 5+10+20+⋯5 + 10 + 20 + \cdots with 10 terms, a=5a = 5 and r=2r = 2, so S10=5×210−12−1=5115S_{10} = 5 \times \frac{2^{10} - 1}{2 - 1} = 5115. For 12+14+⋯+11024\frac{1}{2} + \frac{1}{4} + \cdots + \frac{1}{1024}, also 10 terms, the sum is 12×1−(1/2)101−1/2=10231024\frac{1}{2} \times \frac{1 - (1/2)^{10}}{1 - 1/2} = \frac{1023}{1024}, just under 1.

A table and the algebra

For 3+6+12+⋯3 + 6 + 12 + \cdots, a=3a = 3 and r=2r = 2, so the formula gives Sn=3(2n−1)S_n = 3(2^n - 1).

nn123456
SnS_n, added up39214593189
3(2n−1)3(2^n - 1)39214593189

With ratio 2, each new term beats all the earlier terms put together: the fourth term, 24, is more than S3=21S_3 = 21. That is why doubling sums run away.

Every ratio

  • rr above 1. The terms grow and the sums run away, as 5115 and 189 above.
  • rr between 0 and 1. The terms shrink and the partial sums creep up towards a ceiling, as 10231024\frac{1023}{1024} above. Lesson 1.5.3 finds the ceiling.
  • rr negative. The terms alternate, and so do the steps of the partial sums. For 1−2+4−8+161 - 2 + 4 - 8 + 16, the partial sums are 1,−1,3,−5,111, -1, 3, -5, 11. The formula still works, with brackets: 1−(−2)51−(−2)=333=11\frac{1 - (-2)^5}{1 - (-2)} = \frac{33}{3} = 11.
  • r=−1r = -1. 1−1+1−1+⋯1 - 1 + 1 - 1 + \cdots has partial sums 1,0,1,01, 0, 1, 0. The formula gives 1−(−1)n2\frac{1 - (-1)^n}{2}: 1 for odd nn, 0 for even nn.
  • r=1r = 1. The formula would divide by zero. Every term is aa, so Sn=naS_n = na: the sum of a constant from lesson 0.2.2.

Try it

geometric is the rule above, with a separate branch for r=1r = 1. Lines 1, 2, 4 and 5 compare it with a direct sum; line 3 is the table's added-up row.

The direct sums of whole numbers print as whole numbers; the formula divides, so it prints decimals like 5115.0.

⌘/Ctrl + Enter runs the cell

Reading a sum in Σ\Sigma notation

A sum in Σ\Sigma notation (lesson 0.2.2) hides the three numbers the geometric formula needs. Read them off before you use it.

  1. The first term: put the lowest index into the term.
  2. The ratio: what each step multiplies by.
  3. The number of terms: top limit minus bottom limit, plus 1.

∑k=162⋅3k\sum_{k=1}^{6} 2 \cdot 3^k starts at k=1k = 1, so its first term is 2×3=62 \times 3 = 6, not 2. The ratio is 3 and there are 6−1+1=66 - 1 + 1 = 6 terms, so the sum is 6×36−13−1=21846 \times \frac{3^6 - 1}{3 - 1} = 2184.

∑k=310(12)k\sum_{k=3}^{10} \left(\frac{1}{2}\right)^k has first term 18\frac{1}{8}, ratio 12\frac{1}{2} and 10−3+1=810 - 3 + 1 = 8 terms. Its sum is 18×1−(1/2)81−1/2=2551024\frac{1}{8} \times \frac{1 - (1/2)^8}{1 - 1/2} = \frac{255}{1024}, about 0.249.

The same reading works for arithmetic sums: ∑k=120(4k−1)\sum_{k=1}^{20} (4k - 1) is 3+7+⋯+793 + 7 + \cdots + 79 again, 820.

Try it

range(m, n + 1) runs the index from mm to nn, both included, as in lesson 0.2.2.

Each line prints the direct sum and the formula with the first term, ratio and count read off.

⌘/Ctrl + Enter runs the cell

Lesson 1.5.3 lets the number of terms grow without end, and case study 1.5.5 prices a run of equal payments as a geometric series.

Common mistakes

  1. Count the terms. ∑k=mn\sum_{k=m}^{n} has n−m+1n - m + 1 terms, and 3+7+⋯+793 + 7 + \cdots + 79 has 79−34+1=20\frac{79 - 3}{4} + 1 = 20, not 19.
  2. The formula's aa is the first term actually added. For ∑k=162⋅3k\sum_{k=1}^{6} 2 \cdot 3^k it is 6, not 2.
  3. Ratio 1 needs its own rule. The geometric formula divides by zero; use nana.
  4. Bracket a negative ratio. (−2)5=−32(-2)^5 = -32, and 1−(−2)=31 - (-2) = 3.
  5. Keep the two forms whole. a1−rn1−ra\frac{1 - r^n}{1 - r} and arn−1r−1a\frac{r^n - 1}{r - 1} are equal; a1−rnr−1a\frac{1 - r^n}{r - 1} has the wrong sign.
  6. The arithmetic formula needs the last term. If you only know dd, use n2(2a1+(n−1)d)\frac{n}{2}(2a_1 + (n - 1)d).

Series

0 of 12 correct

  1. 1.
  2. 2.
  3. 3.
  4. 4.
  5. 5.
  6. 6.
  7. 7.
  8. 8.
  9. 9.
  10. 10.
  11. 11.
  12. 12.
How to type answers
  • Powers with ^: x^7, 2^(1/3), a^-2.
  • Multiply with * or by writing side by side: 3x^2, 2(x+1).
  • ln(x) is the natural log, log(x, 2) is log base 2, e is Euler's number, sqrt(x) is a square root.
  • sin(x), cos(x) and tan(x) take radians; write pi for π and sin(x)^2 for sin²x.
  • Your first answer to each question is saved: it counts towards your score and brings the question back for review.
  • Exact answers like ln(20)/ln(3) are best. Decimals need about 4 significant figures.

Summary card

  • A series adds the terms of a sequence. The partial sum SnS_n adds the first nn; Sn=Sn−1+anS_n = S_{n-1} + a_n and an=Sn−Sn−1a_n = S_n - S_{n-1}.
  • Arithmetic: Sn=n(a1+an)2S_n = \frac{n(a_1 + a_n)}{2}, the count times the average of the ends. Count the terms first: an−a1d+1\frac{a_n - a_1}{d} + 1.
  • Geometric: Sn=a1−rn1−rS_n = a\frac{1 - r^n}{1 - r} for nn terms starting at aa, when r≠1r \neq 1; Sn=naS_n = na when r=1r = 1. It works for negative rr too.
  • From Σ\Sigma notation, read off the first term, the ratio and the count (n−m+1n - m + 1) before using a formula.

Free further reading

Optional. This lesson covers what you need; these add more examples and practice. All are free to read.