Deartment of Mathematics Ma 3/03 KC Border Introduction to Probability and Statistics Winter 209 Sulement : Series fun, or some sums Comuting the mean and variance of discrete distributions often involves summing infinite series. That was the most difficult and my least favorite toic in my calculus course. Here are a few useful derivations. They aren t always clever, but they tend to follow an obvious attern, which means that even non-clever eole like me may have a hoe of re-deriving them. For a ustification of some of the oerations on infinite series of functions used, see Aostol [, Chater ]. S. Geometric series You already know this series. I am including it for the sake of comleteness. Let 0 < <. k n+ k n+ k k () (2) (3) (4) Proof : It is enough to rove (), so let x + + + n. Then simly exanding ()x yields ()x ()( + + + n ) n+, from which () follows. S.2 A weighted geometric sum S.2. Proosition For 0 < <, k k () 2. (5) It may not seem very Caltech-like to ut down cleverness. Many of you are very clever, and that is good. But relying on cleverness has a downside. My favorite comments on why one should avoid clever solutions is from the rogrammer Mark Jason Dominus in his brilliant Higher Order PERL [2,. 229]: These three tactics are resented in increasing order of cleverness. Such cleverness should be used only when necessary, since it requires a corresonding alication of cleverness on the art of the maintenance rogrammer eight weeks later, and such cleverness may not be available. KC Border v. 209.0.20::8.52
KC Border Some sums S 2 The elementary aroach: To rove (5), first fix n and let Then ()x exands to Dividing both sides by gives x + 2 2 + 3 3 + + n n ()x + 2 2 + 3 3 + + n n k k. 2 2 3 (n ) n n n+ + 2 + 3 + + n n n+ n+ n n+ by (2). k k x n+ () 2 n n+, and letting n gives as desired. k k () 2, Generating function aroach to (5): Let f() /(). For 0 < <, by (3): Differentiating term-by-term we have So multilying both sides by gives (5). f() + + 2 + () 2 f () 0 + + 2 + 3 2 + ( + 2 2 + 3 3 + ) S.3 Exected value of a geometric random variable A geometric random variable is the eoch of the first success in a sequence of indeendent reetitions of a Bernoulli trial with robability of success. (It is also a secial case of the negative binomial distribution. The mf is given by P (X k) () k, k, 2,... Rewriting () k ()k, we see that (3) imlies these robabilities sum to. To lighten the notation, let q. I claim the exectation is E X k() k. (6) v. 209.0.20::8.52 KC Border
KC Border Some sums S 3 For examle, the exected length of the St. Petersburg game (toss a coin until the first Tails) has /2, so the exected length is /(/2) 2. Proof : To rove (6), rewrite (5) by relacing with q to get kq k q ( q) 2. Multilying both sides by ( q)/q gives Now let q to get (6). k( q)q k q. S.4 An inverse exectation I claim that for a geometric X as above, E X k ()k ln ( ). (7) Proof rovided the wise TA Victor Kasatkin: Let f(q) It is analytic for q <. So for q < we may comute the derivative term-by-term: Now, f(0) 0, and thus In other words, f(q) 0 q k k. f (q) q k q q. q k k q 0 f (t) dt q 0 dt ln( q). t ( ) f(q) ln( q) ln. q Now multily both sdes by /q and relace q by to get (7) S.5 Variance of the geometric distribution If X is a geometric random variable, we can comute its variance (and higher moments). Recall that Var X E(X 2 ) (E X) 2. So let us first comute x k 2 q k. KC Border v. 209.0.20::8.52
KC Border Some sums S 4 Because of the constant of normalization, E(X 2 ) q q x. So write ( q)x k 2 q k q k 2 q k k 2 q k k 2 q k+ k 2 q k k 2 q k+ k 2 q k (k ) 2 q k ( k 2 (k ) 2) q k (2k )q k q 2 ( q) 2 q q q( + q) ( q) 2, where the last line follows from (5) and (4). The variance can now be comuted as ( q)x/q (/) 2, or Var X () 2 (8) S.6 Sums related to higher geometric moments The calculation of the variance suggested a recursive way of comuting the following series: S(n) k n q k. I don t have a lot of use for this beyond n 2, but I thought I d write it down before I forgot it. Start by writing ( q)s(n + ) k n q k k n q k+ k n q k k n q k+ k n q k (k ) n q k ( k n (k ) n) q k n ( ) n k ( ) n q k, v. 209.0.20::8.52 KC Border
KC Border Some sums S 5 where the last line is ust the Binomial Theorem. Now rearrange the terms to get or We already know that n ( q)s(n + ) n ( ) n ( ) n S(), S(n + ) q n S(0) ( ) n k ( ) n q k ( ) n ( ) n S(). q q, so with enough atience (or Mathematica) we find S(n) for any nonnegative integer n. According to Mathematica, the function S(n, q) k n q k is known as the PolyLog[-n,q] function, which can be exressed in terms of an integral over the interval [0, ]. S.7 The Taylor series for the exonential Aostol [,. 436] roves that the Taylor series for the exonential function yields the following identity. For each real number x, e x x k k!. (9) Consider the function g(x) e x. Its n th derivative is given by g (n) (x) e x, so g (n) (0) for every n, and the infinite Taylor s series exansion of g around zero is So g(x) g(0) + k! g(k) (0)(x 0) k + e x x k k!. n x k k!. S.8 Series for the logarithm When a function has reresentation asa ower series on an interval, then its indefinite integral and derivative may be found by differentiating term by term. See Theorems.8 and.9 in Aostol [,. 432]. Equation (3) tells us that the function f defined by the geometric series f() + + 2 + + n + KC Border v. 209.0.20::8.52
KC Border Some sums S 6 for <. Relacing by gives + 2 3 + + ( ) n n + +. (0) Since /( + ) d ln( + ), integrating (0) term-by-term gives for <, 2 2 + 3 3 4 4 + ( )n x n+ + ln( + ) () n + S.9 A Fun Fibonacci Sum The Fibonacci sequence is defined by the difference equation or recurrence relation with initial conditions + 2 (n > ), F 0 0, F. It can be used to define a robability distribution because To see this, observe that n 2 n+ F 4 + F 2 8 + 4 + 8 + n3 4 + 8 + n2 n3 4 + 8 + ( 4 + 8 + 2 4 + 3 4 from which it follows that Bibliograhy n n n. (2) 2n+ 2 n+ regrou 2 n+ + 2 2 n+ recursion relation n n3 F n 2 n+2 + n n 2 n+2 F 8 2 n+ F 8 + 4 2 n+3 shift indices ) + 2 n+3 regrou n n 2 n+ factor, simlify 2n+. 2n+ [] T. M. Aostol. 967. Calculus, Volume I: One-variable calculus with an introduction to linear algebra, 2d. ed. New York: John Wiley & Sons. [2] M. J. Dominus. 2005. Higher order PERL: Transforming rograms with rograms. Amsterdam: Morgan Kaufmann. v. 209.0.20::8.52 KC Border