TA14-1
One-way analysis of variance (ANOVA) extends the two-sample test to more than two groups. The null hypothesis is and the alternative hypothesis is at least one population mean is different from the rest. You have already met the basic ANOVA table that is part of the standard regression output. Here, the terms in the table take on a different meaning.
The first step is to graphically examine the distributions of the groups for (approximate) Normality and outliers (we don’t want any of these). We also use descriptive statistics to compare the standard deviations in terms of satisfying the basic assumption that all groups have the same population variance (which is generally considered fulfilled if twice the smallest standard deviation is larger than the biggest standard deviation).
Data Analysis and ANOVA
ANOVA in Excel requires that the different group (treatment) observations be in separate columns, If they are not, copy and paste so each group has its own column.
For summary statistics on each group, use Data ➔ Data Analysis ➔ Descriptive Statistics.
Unfortunately, Excel cannot make stemplots or side-by-side boxplots to visually examine the data for symmetry and outliers. If this is your only technology, you will have to create those by hand.
To perform the ANOVA, use Data ➔ Data Analysis ➔ ANOVA: Single Factor.
The Excel Video Technology Manual: One-Way ANOVA gives more information and an example.
TA14-2
The data analysis and test can all be done through Analyze ➔ Fit Y by X.
The JMP Video Technology Manual: One-Way ANOVA gives more information and an example.
Use Stat ➔ ANOVA ➔ One-Way.
The Minitab Video Technology Manual: One-Way ANOVA gives more information and an example.
SPSS must have numeric group identifiers. If the grouping variable is categorical, you will have to create a numeric version. Use Transform ➔ Recode into Different Variables.
TA14-3
For summary statistics and graphs, use Analyze ➔ Descriptive Statistics ➔ Explore.
Perform the ANOVA using Analyze ➔ Compare Means ➔ One-Way ANOVA. Enter the response variable in the “Dependent” list and the numeric group identifier in the “Factor” list. Click “OK” for the results.
The SPSS Video Technology Manual: One-Way ANOVA gives more information and an example.
For side-by-side boxplots (presuming you have one column of data and a separate column that indicates group), click Graphics ➔ Boxplots. Click the “Grouped” tab. Click to enter the response (data) variable and the factor (group by) variables. Click “Calculate.” If these plots look reasonably symmetric with no outliers, the “approximately Normal” condition is satisfied.
Compare standard deviations. Click Statistics ➔ Descriptive Statistics. Click the “Grouped” tab. Click to enter the response (data) variable and the factor (group by) variables. Click “Calculate.” If twice the smallest standard deviation is more than the largest, the data meet the “equal variability” condition.
Compute the ANOVA. Click Statistics ➔ ANOVA ➔ One-way. Here there is an option for the type of data layout—one column of data and a column for grouping (Grouped), or each group in a separate column (Columns). Click the appropriate tab. Click to enter the variables, then click “Calculate” for the results.
TI calculators can display up to three side-by-side boxplots at once. Enter the data for each group into separate lists. Use (Stat Plots) to define the boxplots for each group using the plot that identifies outliers (if they exist). If no outliers are seen and each distribution is relatively symmetric, the “approximately Normal” condition is satisfied.
Use (Calc) 1:1-VarStats on each list to find the standard deviations for each list of data. If twice the smallest standard deviation is more than the largest, the data meet the “equal variability” condition.
Use (Tests) ANOVA to perform the test. This command is the last one on the Tests menu, so pressing once to find it is easier than scrolling down. For parameters, enter the names of all the lists that contain your data, separated by commas. Note that TI calculators do not give the “Total” line for the ANOVA table, but its sum of squares and df are simply the sum of the other two entries.
The TI-83/-84 Video Technology Manual: One-Way ANOVA gives more information and an example.
TA14-4
For side-by-side boxplots (presuming you have one column of data and a separate column that indicates group), use a command of the following form:
> boxplot(Response ~ Group)
Examine this plot for “approximate Normality” and outliers. If satisfied, compare variability of the groups using
> numSummary(Response,group=Group)
If you only want to look at the standard deviations, you can use
> Tapply(Response,Group,sd)
If twice the smallest standard deviation is more than the largest, the data meet the “equal variability” condition. If conditions are satisfied, perform the ANOVA:
> mod <- aov(Response ~ Group)
The command
> summary(mod)
returns the ANOVA table.
The R Video Technology Manual: One-Way ANOVA and Pairwise Comparisons gives more information and an example.
Comparing Group Means
A significant ANOVA only tells us at least one population mean is different from the rest. We’d like to know which one(s) differ.
Excel has no built-in function to calculate these intervals and tests.
JMP does not compute contrasts.
It has four different methods to compute simultaneous confidence intervals (the LSD—labeled t in JMP—Tukey’s HSD, and two others), but none of these are the Bonferroni method described in your text. To access any of these, click the red triangle at the top of the ANOVA results, select “Compare Means,” and select a method. Output will be added to the bottom of the ANOVA results.
Minitab does not compute contrasts.
It has four different methods to compute simultaneous confidence intervals (the LSD—labeled Fisher in Minitab—Tukey’s HSD, and two others), but none of these are the Bonferroni method described in your text. To access any of these, click the “Comparisons” button in the main ANOVA dialog and check the box for the comparison type you desire. Output will be added to the bottom of the ANOVA results.
TA14-5
To create a contrast, click “Contrasts” at the upper right of the One-Way ANOVA dialog. Enter the coefficients for the contrast (specify a coefficient for each group) and click “Add” after each. To add another contrast, click “Next.” When finished adding contrasts, click “Continue” to return to the main dialog.
To compute simultaneous confidence intervals, click “Post Hoc” in the main ANOVA dialog. Check the box for the type of intervals you would like. There are several methods to choose from; the Bonferroni method described in your text is on the left-hand column. Click “Continue” to return to the main dialog.
Crunchit cannot compute these intervals and tests.
TI calculators cannot compute these intervals and tests.
For Bonferroni multiple comparisons, you can use the command
> pairwise.t.test(Response,Group,p.adj=‘bonferroni’)
This gives a matrix of -values for testing equality of means. Another option is
> TukeyHSD(mod)
where mod was used to store the model in the aov command. This gives pairwise comparisons of all possible combinations of group means with confidence intervals for the differences as well as -values. By default, the family-wise confidence level is 95%.