# One-Way Repeated Measures ANOVA

## Introduction

A one-way repeated measures ANOVA is used to determine whether or not there is a statistically significant difference between the means of three or more groups in which the same subjects show up in each group.

We use a one-way repeated measures ANOVA in two specific situations:

1. Measuring the mean scores of subjects during three or more time points. For example, you might want to measure the resting heart rate of subjects one month before they start a training program, during the middle of the training program, and one month after the training program to see if there is a significant difference in mean resting heart rate across these three time points.

Notice how the same subjects show up at each time point. We repeatedly measured the same subjects, hence the reason why we used a one-way repeated measures ANOVA.

2. Measuring the mean scores of subjects under three different conditions. For example, you might have subjects watch three different movies and rate each one based on how much they enjoyed it.

Again, the same subjects show up in each group, so we need to use a one-way repeated measures ANOVA to test for the difference in means across these three conditions.

## The Difference Between a One-Way ANOVA and a One-Way Repeated Measures ANOVA

In a typical one-way ANOVA, different subjects are used in each group. For example, we might ask subjects to rate three movies, just like in the example above, but we use different subjects to rate each movie:

In this case, we would conduct a typical one-way ANOVA to test for the difference between the mean ratings of the three movies.

In real life, the benefit of using the same subjects across multiple treatment condition is that it’s cheaper and faster for researchers to recruit and pay a smaller number of people to carry out an experiment since they can just obtain data from the same people multiple times.

Another benefit of this type of design, as we’ll later see, is that we’re able to attribute some of the variance in the data to the subjects themselves, which makes it easier to obtain a smaller p-value.

One potential drawback of this type of design is that subjects might get bored or tired if an experiment lasts too long, which could skew the results. For example, subjects might give lower movie ratings to the third movie they watch because they’re tired and ready to go home.

Now that we know the difference between a one-way repeated measures ANOVA and a regular one-way ANOVA, along with the pros and cons of this type of design, let’s walk through an example of how to conduct a one-way repeated measures ANOVA.

## Example of a One-Way Repeated Measures ANOVA

We recruit five subjects to participate in a training program. We measure their resting heart rate before participating in a training program, after participating for 4 months, and after participating for 8 months.

The following table shows the results:

We want to know whether there is a difference in resting heart rate at these three time points so we conduct a one-way repeated measures ANOVA using a .05 significance level to determine if there is a statistically significant difference between the mean resting heart rates at these three time points.

Here we will demonstrate how to conduct a one-way repeated measures ANOVA by hand and also by using a one-way ANOVA repeated measures calculator.

### One-Way Repeated Measures ANOVA by Hand

To conduct a one-way repeated measures ANOVA by hand, we follow the standard five steps for any hypothesis test:

Step 1. State the hypotheses.

The null hypothesis (H0): µ1 = µ2 = µ3 (the means are equal for each group)

The alternative hypothesis: (Ha): at least two means are significantly different

Step 2. Determine a significance level to use.

The problem tells us to use a .05 significance level.

Step 3. Make an ANOVA table and find the F statistic and corresponding  p-value.

To make an ANOVA table, we first find the mean of each row and column in our dataset, along with the overall mean:

Next, we need to find the “between” sum of squares, the “within” sum of squares, the “subject” sum of squares, and the “error” sum of squares:

SSbetween =  Sni(xix)2  where nis the number of subjects in each condition, xi is the mean score for each condition, and x is the overall mean.

SSbetween = 5[ (58.6 – 54.533)2 + (53.2 – 54.533)2 + (51.8 – 54.533)]= 128.93

SSwithinS(xi1x1)2  + S(xi2x2)2  + S(xi3x3)2 where xi1 is the score of the ith subject in group 1, xi2 is the score of the ith subject in group 2, etc.

SSwithin = (65 – 58.6)2 + (55 – 58.6)2 +(58 – 58.6)2 + (68 – 58.6)2 +(47 – 58.6)2 + (58 – 53.2)2 +(48 – 53.2)2 + (55 – 53.2)2 +(60 – 53.2)2 + (45 – 53.2)2 +(60 – 51.8)2 + (44 – 51.8)2 +(55 – 51.8)2 + (55 – 51.8)2 +(45 – 51.8)2 = 638.8

SSsubject = k * S(xix)2 where k = number of conditions, xi is the mean of subject i, and x is the overall mean.

SSsubject = 3[ (61 – 54.533)+ (49 – 54.533)+ (56 – 54.533)+ (61 – 54.533)+ (45.67 – 54.533)] = 584.89

SSerror = SSwithin – SSsubjects

SSerror = 638.8 – 584.89 = 53.91

Once we have these numbers, we simply need to fill in the ANOVA table, which looks like this:

Source SS df MS F P
Between SSbetween #groups -1 SSbetween / dfbetween MSbetween / MSerror p-value for Fdfbetween, dferror
Subject SSsubject #subjects – 1 SSsubject / dfsubject
Error SSerror (#subjects-1) * (#groups -1) SSerror / dferror

So, filling in our numbers we get:

Source SS df MS F P
Between 128.93 3 – 1 = 2 128.93 / 2 = 64.5 64.5 / 6.7 = 9.6 0.007
Subject 584.89 5 – 1 = 4 584.89 / 4 = 146.3
Error 53.91 4 * 2 = 8 53.91 / 8 = 6.7

Note: We got the p-value from using the F distribution calculator with numerator degrees of freedom = 2, denominator degrees of freedom = 8, and F-value = 9.6, which gives us a p-value of .99252. Then 1 – .99252 = .007.

Step 4. Reject or fail to reject the null hypothesis.

Since the p-value is less than our significance level of .05, we reject the null hypothesis.

Step 5. Interpret the results.

Since we rejected the null hypothesis, we have sufficient evidence to say that there is a statistically significant difference between the mean resting heart rates at two or more of the three time points.

### One-Way Repeated Measures ANOVA by Calculator

Instead of calculating all of these numbers by hand, we could just use a One-Way repeated measures ANOVA calculator. Using this calculator, we can simply enter the exam scores for each group and then hit the “Calculate” button:

Notice how these numbers match the numbers we calculated by hand.