Module #4, Interactive Exercise #2 ANOVA with the same data

If you have a copy of this page, proceed to the applet. If you do not have a copy, print this page before proceeding to the applet.   

This problem uses the data below (same data as in Exercise 1). These data are for a two-group example where our goal is to compare the means between Group 1 and Group 2. For this exercise, you will complete several calculations and observe how the values you calculate relate to the values provided by the applet. The paper and pencil section below steps you through calculation of each value. Answers are provided for most problems here.

Set up the applet:  From the ‘Select a Lesson:’ menu in the lower right hand corner of the applet, choose ‘Regression.’ Remove the checks from all boxes. Do not click any of the points on the applet or move points – this will create a distribution that does not match your calculations.

X = 1 represents scores for group #1, X = 2 represents scores for group #2.

Case

X

Y

  1

1

2

  2

1

6

  3

2

5

  4

2

7

 a. Means. For the data calculate the means for Group 1 (the mean of the two Y scores for cases with X = 1), Group 2 (the mean of the two Y scores for cases with X = 2), and an overall mean for Y (mean of all four Y scores).

 Mean for Group 1( ) ______

 Mean for Group 2 ( ) ______

 Grand Mean for Y ( ) ______

SS Total (Total Variance)

SS total is the sum of squared deviations of observed Y scores from the mean of Y.

b. To calculate SS Total, take each value of Y, subtract the overall mean, and square the result, then sum all of the values in the column. A general formula for SS Total is . For these data the mean of Y is 5. For the first case, the squared deviation from the mean is 9. Calculate the values for the last three cases, and sum the values for all four cases in the last column to get SS Total.

Case

  X

   Y

  1

1

2

2-5 = -3

(-3)2 = 9

  2

1

6

 

 

  3

2

5

 

 

  4

2

7

 

 

 

 

 

 

Σ =

c. Now in the applet, place a check mark in the boxes titled Show SS Total and Show Mean of Y and remove all other checks.  The [note that there are only three, because one is zero] vertical black lines represent the deviations of each case from the mean of Y. Verify the correspondence of the length of these lines with the values in the table for the column . Which case has the largest deviation from the mean? 

The largest deviation from the mean is _____ for Case ___.

Hint: Look at the graph in the applet and at your calculations in the table.

d. Now calculate the sum of the squared deviations from the mean . You can do this by adding the values in the column headed .

 = SS Total = ________.   In the applet, SS for Total = ________.

Do these values match? If not, check your calculations against the answers found in the final section of this handout.

 

e. Compare your SS Total calculated in the ANOVA section to the SS Total calculated in the regression section? Are they the same value?

 

SS Between Groups

SS Between Group is the part of the SS total that CAN be explained by group differences. This corresponds to the sum of squared deviations of the group mean from the overall mean.

f. Calculations. Complete the calculations below using the group means from above and the overall mean (5).

Case

X

Y

 

  1

1

2

4

4-5 = -1

(1)2 = 1

  2

1

6

 

 

 

  3

2

5

 

 

 

  4

2

7

 

 

 

 

 

 

 

 

Σ =

 g. Sum the values in the column headed . Which SS value from the ANOVA section of the applet corresponds to your calculated value, is it SS Predicted or SS Error? (Note: If neither, check your calculations).

 

= SS Between = ________. 

 Which SS value does this correspond to from Exercise #1 (SS Total, SS Regression, or SS Error)? _________

 h. Now place a check mark in the boxes titled Show SS Predicted and Show Regression Line, and remove checks from all other boxes. Deviations predicted values from the mean of Y on the regression line are shown in blue.

 

Where does the regression line intersect X = 1? Another way to think of this is what is the predicted value for Y when X = 1. (Hint for Group 1 it should be a whole number between 2 and 6).

 Enter the value here ___________

 Which Y' value from Exercise #1 does this correspond to?  Y' = ______ for X = _________

 Where does the regression line intersect X = 2?

 Enter the value here ___________

 Which Y' value from Exercise #1 does this correspond to?  Y' = ______ for X = _________

 What is the relationship between group means in ANOVA ( ) and predicted scores in Regression (Y')?

 

SS Within Groups

The sum of squares within groups is the sum of squared deviations of observed Y scores from the mean of their group. This is an indication of the deviations from the group average. This is called the within group variance as it refers to the amount of deviation within each group (deviation from group’s mean).  SS Within Groups is the part of SS Total that CANNOT be explained by ANOVA.

i. Calculations. First, calculate the group mean for each group (often noted as  with  used to represent the first group used to represent the second group). To get the group mean, take the average of scores for each group (i.e., for the X = 1 group and X = 2 group separately). Complete the calculations below.

Case

X

Y

(Group Mean)

  1

1

2

4

2-4 = -2

(-2)2 = 4

  2

1

6

 

 

 

  3

2

5

6

(5-6) = -1

(-1)2 = 1

  4

2

7

 

 

 

 

 

 

 

 

Σ =

j. Now place a check mark in the boxes titled Show SS error, and remove checks from all other boxes. Deviations of the observed points from their predicted values on the regression line are shown in red.

The largest deviations are for Cases ____, and the size of the deviation is ______.

The smallest deviations are for Cases ____, and the size of the deviation is ______.

 

k. Sum the values in the column marked . Which SS value from the ANOVA section of the applet corresponds to your calculated value, is it SS Predicted or SS Error? (Note: If neither check your calculations).

 

= SS Within = ________. 

Which SS value does this correspond to from Exercise #1 (SS Total, SS Regression, or SS Error)? _________

 

Calculation of F

l.  Calculate F using your SS values.  

 

First, you will need to calculation the Degrees of Freedom Between and Within

DF Between Groups = # Groups – 1 = __________

DF Within Groups = # People (or cases) - # of Groups  = _________

F = [SS Between Groups/DF Between Groups] / [SS Within Groups/DF Within Groups]  = _______/ _________ = ____________.  (Note: this is often expressed as MS Between / MS Within)

m. What does the applet report for F? ____________

Note that SS Total = SS Between Groups + SS Within Groups.  (14 = 4 + 10). Thus, with ANOVA, we split SS Total into two parts, SS Between Groups and SS Within Groups. We can compute the proportion of SS Total that is in SS Between.  In terms of sums of squares, this is the ratio of SS Between to SS Total. This value is termed eta-squared (η2).

n. Calculation of Eta-Squared (not given in applet) = [SS Between / SS Total]  ________

Which value from Exercise #1 does η2 correspond to? _________________

Go to the applet