Series
A series is the sum of the terms of a sequence. Series let us add up infinitely many contributions in closed form — the trick behind expected values of count distributions and many probability generating functions.
Partial sums
Given a sequence , the -th partial sum is . An infinite series converges to if as ; otherwise it diverges.
Arithmetic series
With first term and common difference , the terms are and the finite sum is
Geometric series
With ratio , the terms are . When the infinite series converges:
Power series
A power series defines a function on its interval of convergence. The key example is
Note the harmonic series diverges, even though its terms shrink to — small terms are not enough for convergence.
Worked example
Let , . The infinite geometric series is
The partial sum to terms is , already very close to .
Computing it
R
r <- 0.5; a <- 1; n <- 10
partial <- sum(a * r^(0:(n - 1))) # 1.998047
closed <- a / (1 - r) # 2
c(partial, closed)
Python
r, a, n = 0.5, 1, 10
partial = sum(a * r**k for k in range(n)) # 1.998046875
closed = a / (1 - r) # 2.0
print(partial, closed)
1.998046875 2.0
Julia
r, a, n = 0.5, 1, 10
partial = sum(a * r^k for k in 0:(n - 1)) # 1.998046875
closed = a / (1 - r) # 2.0
partial, closed
Why it matters for statistics
Geometric series give the mean of the geometric distribution and normalize infinite discrete distributions. Power series underlie moment and probability generating functions, and Taylor series (a special power series) drive approximations like the delta method. Recognizing when a series converges tells you whether an expectation is even finite.