[Home]  [Syllabus]  [Statnotes]  [Links]  [Lab]  [Instructor]  [Home]

Oneway Analysis of Variance Example

Notes This example is from the SPSS 7.5 "Applications Guide" example for file "gss 93 subset.sav". The dependent is "age." The factor (independent) is "polviews," which is a 7-point Likert scale from "Extremely liberal" to "extremely conservative."

To obtain this output:

  1. File, Open, point to gss 93 subset.sav.
  2. Statistics, Compare means, One-Way ANOVA
  3. In the ANOVA dialog box, select "age" as the "dependent", and select "polviews" as the "factor."
  4. Click on Options and check "Descriptive" and "Homogeneity-of-variance."
  5. When the output comes up, go to the "Descriptives" table. Click on the table to select it. Right-click to get the context menu and select SPSS Pivot Table Object, Open, Pivot, Transpose Rows and Columns.
Comments in blue are by the instructor and are not part of SPSS output.

Output Created 20 Feb 98 08:58:49
Comments
Input Data Y:\PC\spss95\GSS93 subset.sav
Filter <none>
Weight <none>
Split File <none>
N of Rows in Working Data File 1500
Missing Value Handling Definition of Missing User-defined missing values are treated as missing.
Cases Used Statistics for each analysis are based on cases with no missing data for any variable in the analysis.
Syntax ONEWAY
age BY polviews
/STATISTICS DESCRIPTIVES HOMOGENEITY
/MISSING ANALYSIS .
Resources Elapsed Time 0:00:00.93

Descriptives

Age of Respondent
Think of Self as Liberal or Conservative
Extremely liberal Liberal Slightly liberal Moderate Slightly conservative Conservative Extremely conservative Total
N 30 162 192 527 247 240 40 1438
Mean 39.07 45.27 42.06 45.53 44.43 50.76 54.55 45.84
Std. Deviation 15.94 15.90 16.38 17.38 16.63 18.23 17.50 17.32
Std. Error 2.91 1.25 1.18 .76 1.06 1.18 2.77 .46
95% Confidence Interval for Mean Lower Bound 33.12 42.80 39.73 44.05 42.35 48.44 48.95 44.94
Upper Bound 45.02 47.74 44.39 47.02 46.52 53.08 60.15 46.74
Minimum 18 19 19 18 18 18 22 18
Maximum 80 86 89 89 87 89 86 89

Test of Homogeneity of Variances

Levene's test of homogeneity of variance is computed by SPSS to test the ANOVA assumption that each group (category) of the independent)(s) has the same variance. If the Levene statistic is significant at the .05 level or better, the researcher rejects the null hypothesis that the groups have equal variances. Because the Levene statistic is significant at the .05 level in this case, the researcher concludes that the seven groups formed by polviews are not homogenous in variances, violating an assumption of ANOVA. If the researcher is using the .01 level, the null hopothesis of equal variances is not rejected. Note, however, that failure to meet the assumption of homogeneity of variances is not fatal to ANOVA, which is relatively robust, particularly when groups are of equal sample size. In this case, the table above shows the groups have wildly different n's, however.


Levene Statistic df1 df2 Sig.
Age of Respondent 2.348 6 1431 .029

ANOVA

The "Sig." column gives the probability (p) value of the F test. Since the p value is very highly significant, the researcher concludes that age does make a difference in polviews. To put it another way, there is less than p probability that one would find the mean ages for the seven polviews categories would differ as much as observed just by chance.


Sum of Squares df Mean Square F Sig.
Age of Respondent Between Groups 13556.868 6 2259.478 7.743 .000
Within Groups 417590.345 1431 291.817

Total 431147.213 1437




Pairwise Multiple Comparisons and Range Tests

The F test tells us polviews is significantly related to age due to differences in the mean and variance of age in the seven categories of polviews. However, it does not tell us about structural differences among the seven categories. This is revealed by pairwise multiple comparisons and range tests.

To get the pairwise comparisons and range tests, go back to the Statistics, Compare Means, One-Way ANOVA dialog box. Click on Post Hoc and check the Bonferroni and Tukey('s honestly significant difference) boxes.

Post Hoc Tests

The Bonferroni multiple comparisons table is below. Look in the "Mean Difference" column and note that some of the differences have asterisks, to indicate which are significant at the .05 level or better. For instance, the first such coefficient is -11.70, indicating that mean age is significantly different between the "Extremely liberal" and the "Conservative" Category. (Note the flip coefficient, +11.70, appears later for the difference of "Conservative" from "Extremely liberal." This is the same thing.) Looking down the list, we see that most of the significant differences in age concern the fact that those who are "Conservative" and "Extremely conservative" are older individuals. Though the ANOVA F test concluded that age is related to polviews, this does not mean age makes an equal difference for every category of polviews. The connection is concentrated in the relation of higher age in relation to "Conservative" and "Extremely conservative" polviews. That is, these two groups differ from all the others.
Multiple Comparisons (Bonferroni Output)
Dependent Variable: Age of Respondent

Mean Difference (I-J) Std. Error Sig. 95% Confidence Interval

(I) Think of Self as Liberal or Conservative (J) Think of Self as Liberal or Conservative


Lower Bound Upper Bound
Tukey HSD Extremely liberal Liberal -6.20 3.395 .529 -16.22 3.81
Slightly liberal -3.00 3.354 .974 -12.88 6.89
Moderate -6.47 3.206 .404 -15.92 2.99
Slightly conservative -5.37 3.303 .666 -15.10 4.37
Conservative -11.70(*) 3.308 .007 -21.45 -1.94
Extremely conservative -15.48(*) 4.126 .003 -27.65 -3.32
Liberal Extremely liberal 6.20 3.395 .529 -3.81 16.22
Slightly liberal 3.21 1.822 .575 -2.16 8.58
Moderate -.26 1.535 1.000 -4.79 4.26
Slightly conservative .84 1.727 .999 -4.25 5.93
Conservative -5.49(*) 1.737 .026 -10.61 -.37
Extremely conservative -9.28(*) 3.016 .034 -18.17 -.39
Slightly liberal Extremely liberal 3.00 3.354 .974 -6.89 12.88
Liberal -3.21 1.822 .575 -8.58 2.16
Moderate -3.47 1.440 .194 -7.72 .77
Slightly conservative -2.37 1.644 .779 -7.22 2.48
Conservative -8.70(*) 1.654 .000 -13.58 -3.82
Extremely conservative -12.49(*) 2.969 .001 -21.24 -3.73
Moderate Extremely liberal 6.47 3.206 .404 -2.99 15.92
Liberal .26 1.535 1.000 -4.26 4.79
Slightly liberal 3.47 1.440 .194 -.77 7.72
Slightly conservative 1.10 1.317 .981 -2.78 4.98
Conservative -5.23(*) 1.330 .002 -9.15 -1.31
Extremely conservative -9.02(*) 2.802 .022 -17.28 -.76
Slightly conservative Extremely liberal 5.37 3.303 .666 -4.37 15.10
Liberal -.84 1.727 .999 -5.93 4.25
Slightly liberal 2.37 1.644 .779 -2.48 7.22
Moderate -1.10 1.317 .981 -4.98 2.78
Conservative -6.33(*) 1.548 .001 -10.89 -1.76
Extremely conservative -10.12(*) 2.912 .009 -18.70 -1.53
Conservative Extremely liberal 11.70(*) 3.308 .007 1.94 21.45
Liberal 5.49(*) 1.737 .026 .37 10.61
Slightly liberal 8.70(*) 1.654 .000 3.82 13.58
Moderate 5.23(*) 1.330 .002 1.31 9.15
Slightly conservative 6.33(*) 1.548 .001 1.76 10.89
Extremely conservative -3.79 2.917 .853 -12.39 4.81
Extremely conservative Extremely liberal 15.48(*) 4.126 .003 3.32 27.65
Liberal 9.28(*) 3.016 .034 .39 18.17
Slightly liberal 12.49(*) 2.969 .001 3.73 21.24
Moderate 9.02(*) 2.802 .022 .76 17.28
Slightly conservative 10.12(*) 2.912 .009 1.53 18.70
Conservative 3.79 2.917 .853 -4.81 12.39
Bonferroni Extremely liberal Liberal -6.20 3.395 1.000 -16.54 4.13
Slightly liberal -3.00 3.354 1.000 -13.20 7.21
Moderate -6.47 3.206 .922 -16.23 3.29
Slightly conservative -5.37 3.303 1.000 -15.42 4.69
Conservative -11.70(*) 3.308 .009 -21.76 -1.63
Extremely conservative -15.48(*) 4.126 .004 -28.04 -2.93
Liberal Extremely liberal 6.20 3.395 1.000 -4.13 16.54
Slightly liberal 3.21 1.822 1.000 -2.34 8.76
Moderate -.26 1.535 1.000 -4.93 4.41
Slightly conservative .84 1.727 1.000 -4.42 6.09
Conservative -5.49(*) 1.737 .034 -10.78 -.20
Extremely conservative -9.28(*) 3.016 .045 -18.46 -9.89E-02
Slightly liberal Extremely liberal 3.00 3.354 1.000 -7.21 13.20
Liberal -3.21 1.822 1.000 -8.76 2.34
Moderate -3.47 1.440 .337 -7.85 .91
Slightly conservative -2.37 1.644 1.000 -7.37 2.63
Conservative -8.70(*) 1.654 .000 -13.73 -3.67
Extremely conservative -12.49(*) 2.969 .001 -21.52 -3.45
Moderate Extremely liberal 6.47 3.206 .922 -3.29 16.23
Liberal .26 1.535 1.000 -4.41 4.93
Slightly liberal 3.47 1.440 .337 -.91 7.85
Slightly conservative 1.10 1.317 1.000 -2.91 5.11
Conservative -5.23(*) 1.330 .002 -9.28 -1.18
Extremely conservative -9.02(*) 2.802 .028 -17.54 -.49
Slightly conservative Extremely liberal 5.37 3.303 1.000 -4.69 15.42
Liberal -.84 1.727 1.000 -6.09 4.42
Slightly liberal 2.37 1.644 1.000 -2.63 7.37
Moderate -1.10 1.317 1.000 -5.11 2.91
Conservative -6.33(*) 1.548 .001 -11.04 -1.62
Extremely conservative -10.12(*) 2.912 .011 -18.98 -1.26
Conservative Extremely liberal 11.70(*) 3.308 .009 1.63 21.76
Liberal 5.49(*) 1.737 .034 .20 10.78
Slightly liberal 8.70(*) 1.654 .000 3.67 13.73
Moderate 5.23(*) 1.330 .002 1.18 9.28
Slightly conservative 6.33(*) 1.548 .001 1.62 11.04
Extremely conservative -3.79 2.917 1.000 -12.67 5.09
Extremely conservative Extremely liberal 15.48(*) 4.126 .004 2.93 28.04
Liberal 9.28(*) 3.016 .045 9.89E-02 18.46
Slightly liberal 12.49(*) 2.969 .001 3.45 21.52
Moderate 9.02(*) 2.802 .028 .49 17.54
Slightly conservative 10.12(*) 2.912 .011 1.26 18.98
Conservative 3.79 2.917 1.000 -5.09 12.67
* The mean difference is significant at the .05 level.


Homogeneous Subsets (Tukey Range Test)

The Tukey range test gives information similar to Bonferroni paired comparisons, but in a different format. SPSS will print out a table which lists all the groups (the categories on the independent variable) and their means. Then for the .05 level of significance, additional columns will be printed, one for each subset where group means do not differ significantly. Note this means that when the significance level of mean differences is worse than .05, we fail to accept the null hypothesis that the means do not differ. Thus the "Sig." values in the bottom row below are all above .05. In each subset column only the means of the variables in that subset will be printed. The subsets may overlap (a group may belong to more than one subset). Examination of the different subset columns reveals for which groups (independent variable categories) the mean on the dependent do or do not differ.

For instance, in this case "Conservatives" and "Extremely Conservatives" are in one age group, but "Conservatives" are also in the middle age group, which includes "Slightly Conservatives," "Liberals," and "Moderates." These last three polviews groups are also in the first age grouping, which also includes "Extreme Liberals" and "Slightly Liberals."

Age of Respondent

N Subset for alpha = .05

Think of Self as Liberal or Conservative
1 2 3
Tukey HSD(a,b) Extremely liberal 30 39.07

Slightly liberal 192 42.06

Slightly conservative 247 44.43 44.43
Liberal 162 45.27 45.27
Moderate 527 45.53 45.53
Conservative 240
50.76 50.76
Extremely conservative 40

54.55
Sig.
.157 .177 .764
Means for groups in homogeneous subsets are displayed.
a Uses Harmonic Mean Sample Size = 87.689
b The group sizes are unequal. The harmonic mean of the group sizes is used. Type I error levels are not guaranteed.