# Orthogonal Comparisons and ANOVA

In the previous lesson, we learned that researchers use comparisons to address follow-up questions that are not answered by a standard, omnibus analysis of variance.

This lesson focuses on a special type of comparison, called an **orthogonal comparison**.

## What is a Comparison?

To be sure everyone is on the same page, let's review what we know about comparisons. A comparison is a weighted sum of mean scores. Mathematically, a comparison can be expressed as:

_{j}X

_{j}j=1

In addition, all comparisons are subject to the following constraint:

_{j}c

_{j}= 0

In the equations above, L is the value of the comparison, c_{j} is a coefficient (weight) for treatment *j*,
X_{j} is the mean score for treatment *j*,
n_{j} is the number of subjects assigned to treatment *j* , and
*k* is the number of treatment groups.

With balanced designs (i.e., designs in which sample size is constant across treatment groups), the necessary condition for a comparison reduces to:

Σ c_{j} = 0

## What is an Orthogonal Comparison?

Two comparisons (L_{1} and L_{2}) are orthogonal if the following is true:

Σ n_{j} c_{1j} c_{2j} = 0

where n_{j} is the sample size in treatment group *j*, c_{1j} is a coefficient for treatment *j* in comparison L_{1},
and c_{2j} is a coefficient for treatment *j* in comparison L_{2}.

With balanced designs (i.e., designs in which sample size is constant across treatment groups), the necessary condition for two comparisons to be orthogonal reduces to:

Σ c_{1j} c_{2j} = 0

For any experiment with three or more treatment groups, it is possible to define different sets of orthogonal comparisons.
However, each set of orthogonal comparisons can have a maximum of *k* - 1 comparisons,
where *k* is the number of treatment groups.

## Orthogonal Comparisons and Sums of Squares

The sum of squares for an orthogonal comparison is computed in the same way as the
sum of squares for an ordinary comparison.
When Σ n_{j}c_{j} = 0,
the sum of squares for a comparison can be computed from the following formula:

SS_{i} = ( Σ n_{j}c_{ij} X_{j} )^{2} / Σ n_{j}c^{2}_{ij}

where SS_{i} is the sum of squares for comparison L_{i} ,
n_{j} is the sample size in Group j ,
c_{ij} is the coefficient (weight) for level *j* in the formula for comparison L_{i},
and X_{j} is the mean score for Group j .

With a balanced design,
the sum of squares for a comparison ( L_{i} ) can be computed from a simpler formula:

SS_{i} = n * L_{i}^{2} / Σ c^{2}_{ij}

where SS_{i} is the sum of squares for comparison L_{i} ,
L_{i} is the value of the comparison, n is the sample size in each group,
and c_{ij} is the coefficient (weight) for level *j* in the formula for comparison L_{i}.

The sums of squares for a complete set of orthogonal comparisons (SS_{j}) are related to the
sum of squares for the treatment effect (SS_{T}) in a standard analysis of variance, as shown below:

_{T}=

_{j}

SS_{T} = SS_{1} + SS_{2} + ... + SS_{k-1}

A treatment effect with *k* levels has a maximum of *k* - 1 orthogonal comparisons.
There is an additive relationship between the sum of square for a treatment effect and
the sums of squares for *k* - 1 orthogonal comparisons. The sum of squares for the treatment effect is
equal to the sum of sums of squares for *k* - 1 orthogonal comparisons.

## Orthogonal Comparisons and Uncorrelated Data

When conducting multiple follow-up tests to supplement an omnibus analysis of variance, it is sometimes desirable to formulate hypotheses that can be tested using uncorrelated data from the experiment.

When the data used to test one hypothesis are uncorrelated with the data used to test another hypothesis, the hypothesis tests are independent. It is as if each hypothesis test were conducted using data from different experiments.

So, how do you distinguish hypotheses that can be tested using uncorrelated data from those that cannot? You look for orthogonal comparisons. Hypotheses represented by orthogonal comparisons use uncorrelated data (aka, nonoverlapping data) for significance tests. Hypotheses represented by nonorthogonal comparisons use correlated data (aka, overlapping data).

## Test Your Understanding

**Problem 1**

You are conducting a single-factor experiment with four treatment groups. Here are five comparisons relevant to that experiment:

- L
_{1}= X_{1}- X_{2} - L
_{2}= X_{2}- X_{3} - L
_{3}= X_{3}- X_{4} - L
_{4}= 0.5X_{1}+ 0.5X_{2}- 0.5X_{3}- 0.5X_{4} - L
_{5}= 0.5X_{1}- 0.5X_{2}+ 0.5X_{3}- 0.5X_{4}

In which of the following sets of comparisons are all three comparisons orthogonal? (Assume a balanced design; i.e., equal sample size in each group.)

(A) L_{1}, L_{2}, and L_{3}

(B) L_{1}, L_{2}, and L_{4}

(C) L_{1}, L_{2}, and L_{5}

(D) L_{1}, L_{3}, and L_{4}

(E) L_{1}, L_{3}, and L_{5}

**Solution**

The correct answer is (D). With a balanced design, the necessary condition for two comparisons to be orthogonal is:

Σ c_{1j} c_{2j} = 0

The table below shows weights (c_{j}) for each comparison:

Comparison | c_{1} |
c_{2} |
c_{3} |
c_{4} |
---|---|---|---|---|

L_{1} |
1 | -1 | 0 | 0 |

L_{2} |
0 | 1 | -1 | 0 |

L_{3} |
0 | 0 | 1 | -1 |

L_{4} |
0.5 | 0.5 | -0.5 | -0.5 |

L_{5} |
0.5 | -0.5 | 0.5 | -0.5 |

From the table, it is evident that the necessary condition for orthogonality is satisfied for the set of comparisons composed of L_{1}, L_{3}, and L_{4}.
That is,

Σ c_{1j} c_{3j} = (1)(0) + (-1)(0) + (0)(1) + (0)(-1) = 0

Σ c_{1j} c_{4j} = (1)(0.5) + (-1)(0.5) + (0)(-0.5) + (0)(-0.5) = 0

Σ c_{3j} c_{4j} = (0)(0.5) + (0)(0.5) + (1)(-0.5) + (1)(-0.5) = 0

The necessary condition for orthogonality is not satisfied for any of the other sets of comparisons.
For example, comparisons L_{1} and L_{2} are not orthogonal because:

Σ c_{1j} c_{2j} = (1)(0) + (-1)(1) + (0)(-1) + (0)(0) = -1

Because Σ c_{1j} c_{2j} is not equal to zero,
we know that L_{1} and L_{2} are not orthogonal; so options A, B, and C cannot be correct answers to this problem.

Similarly, comparisons L_{1} and L_{5} are not orthogonal because:

Σ c_{1j} c_{5j} = (1)(0.5) + (-1)(-0.5) + (0)(0.5) + (0)(-0.5) = 1

Because Σ c_{1j} c_{5j} is not equal to zero, option E cannot be a correct answer to this problem.

**Problem 2**

You are conducting a single-factor experiment with three treatment groups, equal sample sizes in each group. And you are interested in three comparisons:

- L
_{1}= X_{1}- X_{2} - L
_{2}= X_{2}- X_{3} - L
_{3}= X_{1}- 0.5X_{2}- 0.5X_{3}

The sum of squares for each comparison is shown below:

SS_{1} |
SS_{2} |
SS_{3} |
---|---|---|

10 | 20 | 30 |

What is the sum of squares for the treatment effect in this experiment?

(A) 20

(B) 30

(C) 40

(D) 50

(E) 60

**Solution**

The correct answer is (D). Here's the logic for solving this problem:

- There is an additive relationship between the sum of squares for a treatment effect and
the sums of squares for
*k*- 1 orthogonal comparisons. That is,SS

where SS_{T}= SS_{1}+ SS_{2}+ ... + SS_{k-1}_{T}is the sum of squares for the treatment effect, SS_{i}is the sum of squares for comparison*i*, and*k*is the number of treatment groups in the experiment. - This experiment has three treatment groups; thus,
*k*= 3. - If we can identify
*k*- 1 orthogonal comparisons, we can use the formula above to compute the sum of squares for the treatment effect.

With a balanced design, the necessary condition for two comparisons to be orthogonal is:

Σ c_{1j} c_{2j} = 0

The table below shows weights (c_{j}) for all three comparisons:

Comparison | c_{1} |
c_{2} |
c_{3} |
---|---|---|---|

L_{1} |
1 | -1 | 0 |

L_{2} |
0 | 1 | -1 |

L_{3} |
1 | -0.5 | -0.5 |

Comparisons L_{1} and L_{2} are not orthogonal because
Σ c_{1j} c_{2j} ≠ 0.
Similarly, comparisons L_{1} and L_{3} are not orthogonal because
Σ c_{1j} c_{3j} ≠ 0.

Σ c_{1j} c_{2j} = (1)(0) + (-1)(1) + (0)(-1) = -1

Σ c_{1j} c_{3j} = (1)(1) + (-1)(-0.5) + (0)(-0.5) = 1.5

However, comparisons L_{2} and L_{2} are orthogonal because
Σ c_{2j} c_{3j} = 0, as shown below:

Σ c_{2j} c_{3j} = (0)(1) + (1)(-0.5) + (-1)(-0.5) = 0

Because comparisons L_{2} and L_{3} represent *k* - 1 orthogonal comparisons. we can apply the formula below
to compute the sum of squares for the treatment effect:

SS_{T} = SS_{2} + SS_{3}

SS_{T} = 20 + 30 = 50