Analysis of Variance Using Matrix Algebra

 

Expressing variance as standard variance components is most meaningful. Variance expressed as extended variance components (sums of squares) facilitates the use of a spreadsheet for the computation of analysis of variance components. Variance in its expanded form, discussed in detail in this chapter, facilitates computation of variance within the context of matrix algebra.

 TotalPredicted Error
True Variance
Extended Variance
Expand Variance
Standard Variance1

 

Single Classification Analysis of Variance

Consider comparing the data vector of control or reference measurements Y0 = [1 2 3] with another data vector of experimental measurements Y1 = [2 4 3].

Regression on Categories

A parent vector X = [0 0 0 1 1 1] can be constructed to indicate the membership in either the control group (0) or experimental group (1), and vectors Y0 and Y1 can be catenated into vector Y [1 2 3 2 4 3]. The regression solution is

 

 

The above solution can be also presented in the tabular form as

 

Source of Variance

Variance Components

Standard Variance Components

Information

.25

.27

Error

.67

.73

Total

.92

1.00

 

Worksheet Method

In terms of 'sums of squares,' called here the extended variance components, the variance of the above data can be partitioned by using the Microsoft Excel as

 

 

and summarized in the tabular form as

 

Source of Variance

Extended Variance Components

Columns

1.5

Residual

4.0

Total

5.5

 

You can standardize the extended variance components by dividing them by the total, which for the example equals 5.5.

 

Source of Variance

Extended Variance Components

Standard Variance Components

Columns

1.5

.27

Residual

4.0

.73

Total

5.5

1.00

 

 

Using Matrix Algebra

Extract and convey information stored as variability between elements of data matrices.

Expanded Column Variance Component

Using the matrix algebra notation, you can obtain the column variance component as

 

 

which for the example equals

 

 

Subtracting matrices within the parentheses

 

 

and by triangulating the skew-symmetric matrix into the skew-positive matrix, squaring at the same time the skew-positive matrix elements

 

 

the expanded column variance component can be obtained as equal to 9.


Step-by-Step Illustrations

Expanded variance for columns can be conceptualized in terms of columnwise comparisons. There are two columns in the data set as shown below. 

 

 

bulletCompute Columnwise Differences

1. Column 1 vs. Column 1

Column1

Column1

Difference

 

1

  1

0

 

2

  2

0

 

3

  3

0

Sum

  

0

 

2. Column 1 vs. Column 2

Column1

Column2

Difference

 

1

3

-2

 

2

2

0

 

3

4

-1

Sum

  

-3

 

3. Column 2 vs. Column 1

Column2

Column1

Difference

 

3

1

2

 

2

2

0

 

4

3

1

Sum

  

3

 

4. Column 2 vs. Column 2 

Column2

Column2

Difference

 

3

3

0

 

2

2

0

 

4

4

0

Sum

  

0

 

5. Table of Columnwise Comparisons

 Column 1Column 2
Column 10-3
Column 230

 

Within the matrix algebra framework, the resulting table of columnwise comparisons can be expressed as



The matrix of columnwise differences is skew symmetric. This means that its elements, symmetric along the principal diagonal, have the same magnitude, but opposing signs. As this matrix is fully determined by its positive element, its negative element can be deleted.

 

bulletTriangulate the matrix of columnwise differences by changing the negative elements of a skew symmetric matrix into zero elements.

 

 

bulletSquare and sum the matrix elements. 

The expanded variance for columns equals 9.

 

Expanded Total Variance

The total expanded variance component can be calculated either as n times the extended variance component, for the example as 6(5.5) which equals 33.0, or, by using matrix algebra, as

 

 

where T is the decomposed data matrix X. For the example,

 

 

Subtracting data vectors within the parentheses

 

 

and by triangulating the skew-symmetric matrix into the skew-positive matrix

 

 

the expanded total variance component can be computed by summing the squared elements of the skew-symmetric matrix as equal to 33.0. The expanded variance components can be summarized in the tabular form as

   

Source of Variance

Expanded Variance Components

Columns

9

Residual

24

Total

33

 

As in the case of the other non-standard variance components, you can standardize the expanded variance components by dividing each expanded variance component by the total, for the example, by 33.

 

Source of Variance

Expanded Variance Components

Standard Variance Components

Columns

9

.27

Residual

24

.73

Total

33

1.00

 

 

Double Classification Analysis of Variance

Using the extended variance components, the variance of the data for our example can be partitioned by using the Microsoft Excel spreadsheet as

 

 

In tabular representation, 

 

Source of Variance

Extended Variance Components

Standard Variance Components

Columns

1.5

.27

Rows

3.0

.55

Residual

1.0

.18

Total

5.5

1.00

 

In the above table, division by the total (5.5) standardized the extended variance components. To compute the variance components, decompose the data matrix into vector T [1 2 3 3 2 4] first. Next, compute the total variance, which is equal to .92. Third, multiply the standard variance components by .92. 

 

Source of Variance

Extended Variance Components

Standard Variance Components

Variance Components

Columns

1.5

.27

.25

Rows

3.0

.55

.50

Residual

1.0

.18

.17

Total

5.5

1.00

.92

 

Expanded Row Variance Component

In matrix algebra notation, the variance component for the rows of the data matrix can be conceptualized as

 

 

For the example,

 

 

Subtracting matrices within the parentheses

 

 

and by triangulating the skew-symmetric matrix into the skew-positive matrix

 

 

the expanded row variance component can be computed by summing the squared elements of the skew-positive matrix as equal to 18.

Step-by-Step Illustrations

Expanded variance for rows can be conceptualized in terms of rowwise comparisons. There are three rows in the data set as shown below.



bulletCompute rowwise differences.

1. Row 1 vs. Row 1

Row1

Row1

Difference

 

1

  1

0

 

3

 3

0

Sum

  

0

 

2. Row 1 vs. Row 2

Row1

Row2

Difference

 

1

2

-1

 

3

2

1

Sum

  

0

 

3. Row 1 vs. Row 3