Summation Algebra PDF
Summation Algebra PDF
Summation Algebra
In the next 3 chapters, we deal with the very basic results in summation
algebra, descriptive statistics, and matrix algebra that are prerequisites for
the study of SEM theory. You may be thoroughly familiar with this material,
in which case you may merely browse through it. However, it is my experience
that many students find a thorough review of these results worthwhile.
xi
The symbol X is the list name, or the name of the variable represented by
the numbers on the list. The symbol i is a subscript, or position indicator.
It indicates which number in the list, starting from the top, you are referring
to.
9
10 SUMMATION ALGEBRA
Student X Y
Smith 87 85
Chow 65 66
Benedetti 83 90
Abdul 92 97
For example, if the X list consists of the numbers 11, 3, 12, 7, 19 the
value of x3 would be 12, because this is the third number (counting from the
beginning) in the X list.
Single subscript notation extends naturally to a situation where there are
two or more lists. For example suppose a course has 4 students, and they take
two exams. The first exam could be given the variable name X, the second
Y , as in Table 2.1.
Using different variable names to stand for each list works well when there
are only a few lists, but it can be awkward for two reasons.
1. In some cases the number of lists can become large. This arises quite
frequently in some branches of psychology, when personality inventory
data are recorded. In such cases, there might be literally hundreds of
variables for each subject.
To combat the difficulties that arise when more than one list is being discussed,
it is often more convenient to use double subscript notation. In this notation,
data are presented in a rectangular array. The data are indicated with a single
variable name, and two subscripts, like this
xij
The first subscript refers to the row that the particular value is in, the second
subscript refers to the column. For example here
1 6 32
3 23 112
12 21 34
53 8 64
4 14 5
Solution. Go down to the second row and over to the third column to find
x23 = 112. Go down to the third row and stay in the first column to find x31 = 12.
We find the number 14 in the 5th row and the second column. Hence it is x52 .
Note that, when there are more than 9 elements in a row or column, this
notation can be ambiguous. Suppose, for example, you wanted the element
from the 11th row and the 2nd column of a 20 by 20 data array. If you write
x112 , it could mean the element in row 1 and column 12. How do you handle
this?
Oddly enough, you hardly ever see this question addressed in textbooks!
Obviously youve got to do something. Generally, anything goes in these kinds
of situations so long as it is very unlikely that anyone will be confused. We
have several options. One is to separate the subscripts with spaces, like this
x11 2
be already familiar with this notation from an undergraduate course, but you
may not be aware of its full potential. We shall begin with some simple ex-
amples, and work through to some that are more complex and challenging.
Many summation expressions involve just a single summation operator. They
have the following general form
N
X
xi
i=1
In the above expression, the i is the summation index, 1 is the start value, N
is the stop value. Summation notation works according to the following rules.
4. Keep repeating step 3 until the expression has been evaluated and added
for the stop value. At that point the evaluation is complete, and you
stop.
Example 2.2 Suppose our list has just 5 numbers, and they are 1,3,2,5,6. Evaluate
X
5
x2i
i=1
Solution. In this case, we begin by setting i equal to 1, and evaluating x21 . Since
x1 = 1, our first evaluation produces a value of 1. Next, we set i equal to 2, and
evaluate x22 , obtaining 9, which we add to the previous result of 1. We continue in
this manner, obtaining
12 + 32 + 22 + 52 + 62 = 75.
Example 2.3 Using the same numbers as in Example 2.3, evaluate the following
expression:
" #2
X
5
xi
i=1
Solution. In this case, we add up all the numbers, then square the result. We
obtain
[1 + 2 + 3 + 5 + 6]2 = 172 = 289
Many facts about the way lists of numbers behave can be derived using some
basic rules of summation algebra. These rules are simple yet powerful. In this
section, we develop these rules and employ them immediately to prove our
first (very simple) statistical result.
y
X
a = (y x + 1)a
i=x
This rule, which we will refer to as The First Constant Rule of Summation
Algebra, is used in many derivations to eliminate summation signs and make
an expression simpler. Note that, if the summation index runs from x to
y, the constant is added y x + 1 times, not y x times! For example,
if the summation index runs from 2 to 3, you go through 2 cycles, not 1.
Even experienced practitioners forget this on occasion, and assume that a
summation index running from x to y results in y x cycles. This off by
one error plagues computer programmers in a number of contexts. It is
unlikely that you have seen the First Constant Rule of Summation Algebra
stated in the form of Result 2.1. It is much more likely that you have seen
the following less general version which applies when the starting index value
is 1.
14 SUMMATION ALGEBRA
N
X
a = Na
i=1
One of the problems beginners experience with this rule and its application is
that the form of Result 2.2 is deceptively simple. The equation actually says
more than it appears to at first glance. This happens frequently in statistics,
and so we will examine the phenomenon carefully here. The most important
thing to realize is that the symbol a in Result 2.1 is a placeholder. It actually
stands for any expression, no matter how complicated, that does not vary as
a function of the summation index (i in this case). Any algebraic function
that does not contain an i or can be reduced to such an expression falls under
the rubric of Result 2.1. In our first example, the application of the rule is
straightforward, because the expression governed by the summation operator
is so simple that it is difficult not to notice that it is a constant.
Example 2.4 Use the first constant rule to reduce the following expression.
X
3
2= ?
i=2
Solution. In this case, we are adding the number 2 twice, so the answer is 4. We
can also solve by direct application of Result 2.1. This leads to
X
3
2 = (3 2 + 1) 2 = (2)2 = 4
i=2
X
N
(2xj 5)2 = ?
i=1
Solution. In this case, the expression is visually somewhat more complex. This
tends to obscure the fact that it is constant with respect to the summation index i.
However, the expression does not contain an i, so the First Constant Rule applies.
The expression reduces to
N (2xj 5)2
THE ALGEBRA OF SUMMATIONS 15
2x + 2y = 2 (x + y)
or
8w + 8x + 8y = 8 (w + x + y)
N
X N
X
axi = a xi
i=1 i=1
Again, the rule appears to be saying less than it actually is. At first glance, it
appears to be a rule about multiplication. You can move a factorable constant
outside of a summation operator. However, the term a could also stand for a
fraction, and so the rule also applies to factorable divisors in the summation
expression. The following two examples explore these applications of the rule.
Solution. In this case the term 6y can be factored from the expression governed
by the summation operator. Consequently, it may be moved outside the summation
sign as follows:
X
N
6y xi
i=1
1X
N
xi
2 i=1
16 SUMMATION ALGEBRA
Again, the rule might appear to be saying less at first glance than it is, since
the terms on the left may be either positive or negative. Hence Result 2.4
implies also that
XN N
X XN
(xi yi ) = xi yi
i=1 i=1 i=1
Definition 2.1 (The Sample Mean) The sample mean, or arithmetic average
of a list of N numbers is defined as
1 X
N
x = xi
N i=1
X dX
5 +2
4 +1
3 0
2 1
1 2
Theorem 2.1 (The Sum of Deviation Scores) For any list of N num-
bers, The sum of deviation scores is always zero. That is
N
X
[dx]i = 0
i=1
One of the two terms on the right involves summing an expression that
does not contain an i, and so the First Constant Rule (Result 2.1) applies.
The expression becomes
N
X N
X N
X
xi x = xi N x
i=1 i=1 i=1
Next we need to recall the definition of the sample mean (Definition 2.1).
Multiply both sides of the definition by N , and you find that
N
X
N x = xi
i=1
so we obtain
N
X N
X N
X
xi N x = xi xi = 0
i=1 i=1 i=1
So far, we have developed single and double subscript notation, and an algebra
of summations. We have proved a simple but important statistical result
using the notation and algebra. However, the algebra of summations has been
presented and developed with respect to summation expressions involving only
a single summation sign and a single subscript index. These examples are
useful, but they fail to convey the full power and complexity of summation
and subscript notation. In this section, we explore the use of summation
and subscript notation in more complex expressions, beginning with simple
expressions you probably saw in your undergraduate course, and working
through to more complicated expressions.
operators given in Chapter 2.3 actually cover the case of multiple summation
indices. However, there are many simplification strategies that we can employ
when examining summation expressions, so simply stating the mathematical
truth would be inadequate in this case. Consequently, after examining multi-
ple summation expressions from the strict mathematical standpoint, we will
go on to describe some of the simplification strategies you will find useful in
practice for interpreting statistical formulas that use summations.
Consider the following expression
3 X
X 3
xij
i=1 j=1
What does this expression mean? If we review the rules for evaluating
summation expressions in 2.3, we discover that these rules handle the situation
quite nicely. Rule 1 says that a summation operator governs everything to
its right. That means that, starting from the left of the expression, the first
summation operator, the one with i as its index, governs the entire sub-
expression to its right. To remind us of that, I will surround this expression
with large parentheses.
X 3 X 3
xij
i=1 j=1
while the summation index controlled by the first operator is held constant
at the value i = 1. We must, therefore, evaluate the expression
X 3 h i
x1j
j=1
20 SUMMATION ALGEBRA
This expression is a routine single summation expression, much like the ones
we have already evaluated. To evaluate it, we run the second summation index
j over the values from 1 to 3, each time evaluating the expression governed
by the second summation sign, and adding the result. We obtain
x11 + x12 + x13
Note that, to help you follow the logic of the summation operation, I have
deliberately left the brackets around the sub-expressions. At this point, we
have evaluated the entire sub-expression governed by the first summation
operator, so we are ready for the next step. Next, we set the index of the
first summation operator i to its next value. We set i = 2 and evaluate the
sub-expression governed by the first summation index again. At this point,
we are evaluating the expression
X3
x2j
j=1
This evaluates to
x21 + x22 + x23
and so at this point, the entire expression has been evaluated as
x11 + x12 + x13 + x21 + x22 + x23
If we continue the process for i = 3, we obtain
x11 + x12 + x13 + x21 + x22 + x23
+ x31 + x32 + x33
Both summation indices have reached their upper limits of 3, so the eval-
uation of the expression is now complete. To summarize, evaluation of ex-
pressions involving multiple summation signs involves the same rules as those
that govern evaluation of single summation signs. Each summation opera-
tor governs everything in the expression to its right, including all summation
signs.
i j
1 1
1 2
1 3
2 1
2 2
2 3
3 1
3 2
3 3
1. Consider each summation sign and record the range of subscript values
it allows. (In this case, the ranges are 1 i 3 and 1 j 3.)
22 SUMMATION ALGEBRA
2. Remove the summation signs from the expression (but leave appropri-
ate parentheses) to yield a new expression S. Call this the reduced
expression.
In other words, the summation expression is the sum of the versions of the
reduced expression produced by the Cartesian product of the ranges. In the
following example, we see how this approach works with the expression from
our double summation example .
X
3 X
3
xij
i=1 j=1
Solution. First create the reduced expression by installing the parentheses but
removing the summation signs. One obtains
( xij )
Now simply evaluate this expression for all combinations of integer subscript
values that satisfy 1 i 3 and 1 j 3. One obtains
x11 + x12 + x13
+ x21 + x22 + x23
+ x31 + x32 + x33
X
3 X
i
xij
i=1 j=1
Finally, we set i = 3 and step j through the values from 1 to i, or in this case from
1 to 3. Evaluating the expression, we end up with the final result
x11 + x21 + x22 + x31 + x32 + x33
For this expression, the intersection metaphor can provide us with con-
siderable insight. The expression is telling us to sum xij values for 1 i 3,
i.e., for all available values of i, and for values of j that run from 1 to the
current value of i, in other words for all values of j less than or equal to i.
If we remember that i is the row subscript and j the column subscript, it
becomes apparent that the notation is telling us to sum all the elements for
which the row number is greater than or equal to the column number.
Table 2.5 shows the matrix with the summed elements in boldface. The
elements in boldface are sometimes called the lower triangular elements of
the data array. They form a triangular shape.
X
3 X
j
xij
j=1 i=1
You should be able to verify for yourself that this expression sums the appropriate
values.
When you first examine the above solution, you may find yourself asking,
Isnt the ordering of the summation signs wrong? This example has a
surprising number of subtle lessons to teach us. In my experience, many
students find the solution to this example difficult to achieve, and the above
question is typical. After all, the i comes before j in the subscripting scheme.
Should not the summation signs follow the same order?
I often ask such students Where did you first get the idea that the sum-
mation indices have to follow a particular ordering? Many students have
this misconception. It apparently stems from the way students naturally in-
corporate mathematical ideas that are taught primarily by example. Many
students have only been exposed to examples where, i comes before j both
in the summation indices and in the subscripting system. Ultimately, they
form an abstraction, or mental set, that implicitly restricts the possibilities
of the notation for them. They see limitations where none exist. Along these
lines, there is another valid solution to the preceding problem. It is
3 X
X i
xji
i=1 j=1
Notice how changing the position of the j and the i subscripts has changed the
result. Again, many students will have difficulty seeing or understanding this
solution to the problem, because somewhere along the line they developed the
restrictive belief that the i subscript should always precede the j subscript.
Remember, it is the position of the subscript that determines whether it is
referring to a row or a column in a rectangular array. In this case, by switching
the position of the i and j, we made i refer to a column and j refer to a row.
Solution. The first solution that often comes to mind is something like the
following:
3 X
X i
xij
i=1 j=i
3
X
xii
i=1
If you failed to see this solution, it was probably because you were assuming,
implicitly at least, that the two symbols for subscripts of X had to be different.
We are so used to seeing symbols like xij that it is quite natural to adopt this
assumption after a while. Of course, this assumption is incorrect. These two
symbols are merely place-holders. They can, indeed, be functions of indices.
They need not be indices themselves, as we see in the next example.
4 4 5
3 5 23
6 1 7
Solution. The numbers in boldface occupy the only positions in the array
where the row subscript is exactly 1 greater than the column subscript. Hence,
one answer is
X3
xi,i1
i=2
Note how, in this case, one subscript is actually a function of the other.
write
X
xi
i
or even
X
X
Since you are summing all the elements of the X array, and this is usually
implicit in the context of the discussion, why add unnecessary visual compli-
cation? This simplified notation is seen frequently in textbooks.
In a similar vein, you will often see something like this
XX
xij
i j
instead of
N X
X N
xij
i=1 j=1
j
3 X
X
xij
j=1 i=1
to sum the upper triangular elements of an array. Many books will econo-
mize the notation by using a single summation sign, and placing below it an
inclusion rule for the set of i, j subscript pairs to be summed. The above
expression says, in effect, sum the elements for which j is greater than or
equal to i. The economized notation for saying the same thing is
X
xij
ji
BAR-DOT NOTATION 27
Notice how the expression says, in effect. Stay within the first row, and step
across the columns, summing as you go.
Suppose you wished to sum the elements in the third column. You would
use
X 3
xi3
i=1
Computing a row or column sum is an operation that is repeated many
times in routine Analysis of Variance calculations. Looking back at the two
preceding examples, we are struck by the visual inefficiency of basic summa-
tion notation for conveying this simple repetitive operation.
Definition 2.3 (Dot Notation) Given a rectangular data array with R rows
and C columns. We define
X
R
xj = xij
i=1
and
X
C
xi = xij
j=1
Dot notation is particularly easy to read, once you get the hang of it. For
example, the third row sum is x3 . The second column sum is x2 . What
28 SUMMATION ALGEBRA
makes dot notation particularly useful is the way that it generalizes effortlessly
to a situation that causes complications for summation notation, namely the
case of missing data.
Suppose this array represented 3 groups, with groups represented in columns.
There are three numbers in the first and third group, but only two numbers
in the second group. Suppose we wished to convey an operation that involved
computing the 3 column sums for these data. In this case, the simple notation
of Definition 2.3 that assumes there are R numbers in each column cannot be
used, because the number of numbers in a column is not a constant. Instead,
we need a notational device for conveying how many numbers there are in
each column. One common solution is to use the number Nj to stand for
the number of numbers in the jth column. In that case, we can still use the
notation xj to stand for the jth column sum. Here we simply revise the
definition as
Nj
X
xj = xij
i=1
With this revised definition, the dot notation achieves new flexibility. One
may use xj to stand for the jth column sum regardless of the number of
numbers in a particular column. It simply means the sum of however many
numbers there are in the column.
Dot notation generalizes to situations where there are more than two sub-
script indices. In these more complex situations, which we will deal with when
we begin discussing the Analysis of Variance, a dot in place of a subscript in-
dicates that all values of that subscript have been summed over.
Definition 2.4 (Bar Notation) If a bar is placed over a dot notation ex-
pression, it means divide by the number of numbers that were summed in the dot
PROBLEMS 29
expression. For example, if there are Nj numbers in the jth column, we have
Nj
1 X
xj = xij
Nj i=1
Bar dot notation can be used in situations where there are more or less
than two dimensions in the array. For example, suppose we have only one
list. The sum of the numbers is x , the mean of the numbers x . Suppose
you have a rectangular data array, and you wish to compute the mean of the
scores in the first column. Simply write x1
Solution.
3
1X
xi
3 i=1
Problems
The following data array is used for problems 2.1 2.8.
1 8 4 18
3 2 13 11
5 3 6 12
8 7 9 14
2
2.8 Compute (x2 )
2.9 Write a summation expression, using only one summation sign, that
will sum the elements in boldface in the following array
1 4 7
2 5 8
3 6 9