• No results found

Sums and Differences

Continuous Sums: the Definite Integral

2.1 Sums and Differences

In this section, we need to recall some notation and properties related to summations. We shall also define the difference operator, and use it to derive some useful summation formulas.

Recall the sigma notation for summations.

Definition 2.1.1. Suppose that we have two integers m and n, where m ≤ n, we let [m..n]

denote the set of integers between, or equal to, m and n. We call such a set an integer interval.

Suppose we have a function f , whose domain includes [m..n]. Then, we write

n

X

k=m

f (k) for the summation, as k goes from m to n, of f (k). This means that

n

X

k=m

f (k) = f (m) + f (m + 1) + · · · + f (n − 1) + f (n).

In this context k is frequently referred to as the index of summation, and f (k) is frequently written as fk. The integer interval [m..n] is called the range of the index of summation.

For example,

3

X

k=−1

k2 = (−1)2+ 02+ 12+ 22+ 32 = 15,

or, as another example,

p(x) = a0+ a1x + · · · + anxn =

n

X

k=0

akxk,

where x0in the summation is to be interpreted as equaling 1, even if x = 0.

Note that the indexing variable k is a dummy variable; if we replaced it with an i or j, or

any other variable (which is not already present), the summation would not change, e.g.,

3

X

j=−1

j2 = (−1)2+ 02+ 12+ 22+ 32= 15,

Summations can be “split”. For instance, in the example above,

3

X

j=−1

j2 = (−1)2+ 02+ 12+ 22+ 32 =

(−1)2+ 02

+ 12+ 22+ 32

=

0

X

j=−1

j2 +

3

X

j=1

j2.

In general, we have

Proposition 2.1.2. (splitting summations) If m, n, and p are integers, with m ≤ n ≤ p, and f is a function whose domain includes the integer interval [m..p], then

p

X

k=m

fk =

n

X

k=m

fk +

p

X

k=n+1

fk,

where, if n = p, the last summation should be interpreted as being 0.

Looking once again at

3

X

j=−1

j2 = (−1)2+ 02+ 12+ 22+ 32,

we note that we can replace each term j2 by (j + 6) − 62

(which may seem like a silly thing to do, but it leads us to an important property); this means that we have the easy equality

(−1)2+ 02+ 12+ 22+ 32 = (6 − 7)2+ (7 − 7)2+ (8 − 7)2+ (9 − 7)2+ (10 − 7)2,

which equals

Proposition 2.1.3. (shifting indices) Suppose we have a function f , whose domain in-cludes the integer interval [m..n]. Let p be an integer.

Then, by making the substitution k = j + p, so that j = k − p, we obtain

Thus, you get the same sum if you add p to each of the bounds of the summation, and simulta-neously replace each occurrence of the index k by k minus p.

Consider now

More generally, the algebraic properties of real numbers (i.e., associativity, commutativity, and distributivity) immediately imply:

Proposition 2.1.4. (linearity of summation) If a and b are constants, and f and g are functions whose domain includes the integer interval [m..n], then

n

Example 2.1.5. The properties of summations described above may seem simple, but they allow us to derive formulas involving sums that really don’t look so obvious. Consider, for instance, the problem of “simplifying”

2

We would like to combine the two summations, using linearity; however, the ranges of the indices of summation would need to be the same, and they are not. We will fix this “problem”

in two different ways. Understand that the point of this example is not that you will necessarily agree that what we end up with is simpler than what we started with; the point is for you to understand the types of manipulations that we use.

First approach: We split the second summation, and have

2

Now we can use linearity on the first two of the three summations above to obtain

50

Second approach: We first shift the index in the second summation in Formula 2.1; we add 2 to each of the bounds and replace k by (k − 2) in the summation. We obtain

2

2

The range of the index of summation on the right above still does not match that of the summation on the left, but we can split off part of the sum

2

which does not look very similar to our answer from the first approach, but is nonetheless equally correct.

We now want to define notation related to differences.

Definition 2.1.6. Suppose that m and n are integers, and m < n, and suppose that we have a real function f , whose domain is [m..n]. Then, we define the finite difference function

∆f to be the function with domain [(m + 1)..n] given by

(∆f )(k) = f (k) − f (k − 1).

Remark 2.1.7. We have been very formal with our notation above. Typically, we write things like ∆k2 = k2− (k − 1)2= k2− (k2− 2k + 1) = 2k − 1, in place of writing that, if f (k) = k2, then (∆f )(k) = 2k − 1.

We should also remark that, in the notation [m..n], we mean to allow the cases where m = −∞ and/or n = ∞. To be precise, we mean that, if m and n are integers, then

[−∞..n] = {k | k is an integer, and k ≤ n},

[m..∞] = {k | k is an integer, and m ≤ k}, and [−∞..∞] is the entire set of integers.

Finally, in Definition 2.1.6, if m = −∞, then the m + 1 which appears in the domain of ∆f should also be taken to equal −∞.

Like summations, the finite difference operator is linear.

Proposition 2.1.8. (linearity of differences) If a and b are constants, and f and g are functions whose domain is [m..n], then

∆ af (k) + bg(k)

= a ∆f (k) + b ∆g(k).

Despite the fact that it is trivial to prove, the following result turns out to be very useful.

Proposition 2.1.9. (telescoping sums) Suppose that m and n are integers, and m < n.

If f is a real function, whose domain is [m..n], then

n

X

k=m+1

∆f (k) = f (n) − f (m).

Proof. A rigorous proof would use mathematical induction. However, it is easy to see why this is true.

n

X

k=m+1

∆f (k) =

f (m + 1) − f (m)

+ f (m + 2) − f (m + 1)

+ f (m + 3) − f (m + 2) + . . . . . . + f (n − 2) − f (n − 3)

+ f (n − 1) − f (n − 2)

+ f (n) − f (n − 1).

Note that every term, except f (n) and f (m), occurs once with a plus sign and once with a minus sign. Thus, all those intermediate terms “collapse” to 0. The result follows.

Proposition 2.1.10. Suppose that b is a constant. We have the following formulas for finite differences:

1. ∆k = 1;

2. ∆k2= 2k − 1;

3. ∆k3= 3k2− 3k + 1; and 4. ∆bk+1= bk(b − 1).

Proof. These are all easy computations. For instance,

∆k3 = k3− (k − 1)3 = k3− (k3− 3k2+ 3k − 1) = 3k2− 3k + 1.

We leave the proofs of the remaining items as exercises.

Corollary 2.1.11. Suppose that b is a constant. We have the following formulas for finite differences:

1.

k = ∆ k(k + 1) 2



; 2.

k2 = ∆ k(k + 1)(2k + 1) 6



; and 3. if b 6= 1,

bk = ∆ bk+1 b − 1

 .

Consequently, a. if n ≥ 1,

n

X

k=1

k = n(n + 1)

2 ;

b. if n ≥ 1,

n

X

k=1

k2 = n(n + 1)(2n + 1)

6 ; and

c. if n ≥ 0 and b 6= 1, then

n

X

k=0

bk = bn+1− 1 b − 1 , provided that b0 is interpreted as equaling 1 when b = 0.

Proof. Items (a), (b), and (c) follow immediately from Items (1), (2), and (3), respectively, by applying Proposition 2.1.9. We shall prove Items (1), (2), and (3).

From Proposition 2.1.10, we have

∆k2 = 2k − ∆k,

and so, by the linearity of finite differences,

k = 1

2 · ∆(k2+ k) = ∆ k(k + 1) 2

 .

From Proposition 2.1.10 and Item (1), we have

∆k3 = 3k2 − 3 ∆ k(k + 1) 2



+ ∆k.

Therefore, linearity gives us

k2 = ∆ 1 3·

k3+3k(k + 1) 2 − k

= ∆ 2k3+ 3k(k + 1) − 2k 6



=

∆ k(k + 1)(2k + 1) 6

 .

Finally, Proposition 2.1.10 and linearity immediately yield Item 3.

We should remark that the summationPn

k=0bk that appears in Item (c) of Corollary 2.1.11 is one which will be very important to us in Chapter 4 and Chapter 5; it is called a geometric sum.

10.

Evaluate the sums by reindexing.

11.

Prove the following statements of Proposition 2.1.10

14. ∆k = 1.

15. ∆k2= 2k − 1.

16. ∆bk+1= bk(b − 1).

Calculate ∆f (k) for the following functions.

17. f (k) = 5k

26. Is the following statement true? Assume f and g are differentiable functions.

Prove or give a counterexample.

27. What is

100

X

k=1

1

k(k + 1)? Hint: use partial fractions and find a telescoping sum.

28. What is

30. Suppose that f is a differentiable function. Prove that there exist numbers ciin each open interval (i − 1, i), for i = 1, 2, 3, such that f (3) − f (0) = f0(c1) + f0(c2) + f0(c3).

31. Recall that the average of n numbers is given by the formula:

¯

The sample standard deviation of a data set, s, measures how spread out a data set is. For example, if A = {84, 84, 84} and B = {80, 84, 88}, then the sample standard deviation of B will be larger than the sample standard deviation of A since there the points of B are more dispersed than those in set A. The sample standard deviation of a set with n data points is

The units of s are the same as those of the data.

32. A Calculus test is given to two sections of students. The grades of the students in section A are {85, 65, 73, 40, 64, 90} and the grades of the students in section B are {84, 90, 96, 88, 100}.

What are sA and sB?

33. Suppose that the week-to-week changes in a stock’s price, in dollars per share, over a six week period are: {+2.5, +4, −7, 0, +3}. What is s for this set? The standard deviation of a stock’s price measures the volatility of the stock.

34. The recorded annual rainfall, in inches, for a city over a five year span is {23, 47, 35, 42, 29}.

What is the sample standard deviation?

35. We define the sample variance to be the square of the sample standard deviation:

s2= Pn

i=1(xi− ¯x)2 n − 1 .

Prove the following useful alternative formula:

s2= P x2i − (1/n) (P xi)2

(n − 1) .

All sums are taken from 1 to n where n is the number of items in the data set.

Oftentimes statistics are used to measure the relationship between two variables.

For example, researchers could be interested in the relationship between drug dosage and cancer cell counts. Basketball executives may be interested in the relationship between a team’s free throw percentage, and the team’s overall win-ning percentage. The linear correlation coefficient, r, quantifies the relationship.

Specifically, r helps answer the question: to what extant are the two variables lin-early related? r is always between −1 and +1. If r is close to +1 (resp. −1), then a strong positive (resp. negative) linear relationship exists between the variables in the sense that as one variable increases, the second variable tends to increase (resp. decrease) proportionally. If xi and yi are two data sets with means ¯x and ¯y and standard deviations sx and sy, then r is given by:

r = Pn

i=1(xi− ¯x)(yi− ¯y) (n − 1)sxsy

.

36. Suppose you work for a large retail store and your manager asks you study the

rela-tionship between revenue (sales) and the unemployment rate. Assume you assemble the unemployment rates and sales over the last six months in the table below.

Unemp (%) Sales ($)

5 50350

7 37570

8 33140

9 25550

8 38750

5 55450

Let x be the unemployment rate and y the sales.

a. What is ¯x?

b. What is ¯y?

c. What is sx? d. What is sy? e. What is r?

37. Prove the following useful formula for the numerator of the formula for r:

X(xi− ¯x)(yi− ¯y) =X xiyi

− 1 n

XxiX yi.

38. Another common question in statistics is, What is the line that best fits the data? As-suming you believe that two variables have a linear relationship, you’d like to know the what line in the form ˆy = mx + b appears to best describe the data. Here we use a ’hat’

to emphasize that the output of the above formula is a predicted value, as opposed to an actual value. In classical linear regression, formulas for the parameters m and b are:

m = Pn

i=1(xi− ¯x)(yi− ¯y) Pn

i=1(x − ¯x)2 b = ¯y − m¯x.

a. Use these formulas to calculate the regression line of the above data.

b. What sales does the line predict for an unemployment rate of 6%?

Linear Regression FAQ

You probably have three good questions now:

Q In what sense is this the line of best fit?

A The line of best fit should be ’close’ to the data. We quantify closeness by the square of the difference between the predicted and actual data. More specifically, the quantity X(ˆy − y)2is minimized.

Q Where do the formulas for m and b come from?

A We find m and b by minimizing the function:

f (m, b) =X

(ˆy − y)2=X

(mx + b − y)2.

This is an elementary exercise in multivariable Calculus. In single variable Calculus, we find minima of a function by locating points where the derivative is zero. This procedure has a natural analog in higher dimensions.

Q When is it appropriate to use linear regression?

A There are several very important technical assumptions lurking behind linear regression that are seldom checked. One of these assumptions is that the data should be normally distributed about its mean at each y value. Many important economic models, including the Capital Asset Pricing Model and the Nobel Prize winning Black-Scholes option pricing method rely on the normality assumption. The extremely non-normal market fluctuations sparked by the burst of the housing market bubble in 2008-2009 has caused many people to question the validity of the normality assumption.

Exercises 39 - 43 are based on the lyrics of the song The Twelve Days of Christ-mas. You may find it helpful to have the lyrics in hand.

39. Let f (m) be the total number of gifts received on the mth day. On the third day of Christmas, for example, a total of six gifts are given. Three french hens, two turtle doves, and a partridge in a pair tree. Write a formula for f (m) using summation notation.

40. What is f (12)?

41. The cumulative number of gifts received after m days, call this function F (m), is also growing. By the end of the third day, for example, 10 gifts have been received: 6 from the 3rd day, 3 from the 2nd day and 1 from the 1st day. Express F (m) using summation notation.

42. What is F (12)?

43. Research the terms triangular numbers and tetrahedral numbers on the internet. How do these terms relate to these exercises?

44. By how much does ln 2 differ from

4

X

n=1

(−1)n−1

n ? Does the summation get closer to ln 2 if the upper limit is changed from 4 to 5?

45. Let An = Hint: combine the sums immediately rather than dealing with each one individually.

The Fibonacci sequence is defined recursively. Set F0 = 0, F1 = 1 and, for k ≥ 2, Fk= Fk−1+ Fk−2. This gives a sequence {0, 1, 1, 2, 3, 5, 8, ...}. Prove the following facts about the Fibonacci sequence.

46. ∆Fk = Fk−2.