# Analysis of Variance The contents in this chapter are from Chapter 15 and Chapter 16 of the textbook. One-Way Analysis of Variance Multiple Comparisons.

## Presentation on theme: "Analysis of Variance The contents in this chapter are from Chapter 15 and Chapter 16 of the textbook. One-Way Analysis of Variance Multiple Comparisons."— Presentation transcript:

Analysis of Variance The contents in this chapter are from Chapter 15 and Chapter 16 of the textbook. One-Way Analysis of Variance Multiple Comparisons Two-Way Analysis of Variance The data of gssft.sav will be employed

One-way ANOVA Compare peoples’ average working hours
consider their educational backgrounds

One-way ANOVA

One-way ANOVA We can see the average working hours for all full-time employees is 45.62hours. The average work week ranges from a low of hours for people with only a high school diploma to a high of hours for people with graduate degrees. The descriptive statistics and plots suggest that there are difference in the average work week among the five groups.

One-way ANOVA Analysis of Variance (ANOVA):
compare the means of more than two populations. Measurement of variation is most important idea in statistics Assumptions Independence: samples are independent Normality: the populations are normally distributed Equality of variance: the population variables are all equal

One-way ANOVA Analyzing the Variability
Variations of observations will be decomposed in to Within-Groups variability Between-Groups variability Comparing the two estimates of variability and then put main results into a ANOVA table.

ANOVA Table The F test shows that there is a significant difference among average hours worked per week in five categories of education.

One-way ANOVA Example:
An experiment was conducted to determine if any significant differences exist in the strength of parachutes woven from synthetic fibers from the different suppliers. Five parachutes were woven for each group – Supplier 1, Supplier 2, Supplier 3, and Supplier 4.

One-way ANOVA Example:
The strength of the parachutes is measured by placing them in a testing device that pulls on both ends of parachute until it tears apart. The amount of force required to tear the parachute is measured on a tensile-strength scale where the larger the value the stronger the parachute. The results of this experiment (in term of tensile strength) are displayed with the sample mean and sample standard deviation from each suppliers.

One-way ANOVA 1 2 3 4 18.5 26.3 20.6 25.4 24.0 25.3 25.2 19.9 17.2 20.8 22.6 21.2 24.7 17.5 18.0 24.5 22.9 20.4 Mean 19.52 24.26 22.84 21.16 Standard Deviation 2.69 1.92 2.13 2.98 We are required to test

One-Way ANOVA

One-Way ANOVA General Formulas: Total Variation

One-Way ANOVA General Formulas: Variation among the groups

One-Way ANOVA General Formulas: Variation within the groups

Example for parachutes woven
ANOVA Source of Variation SS Df MS F P-value F- critical value Between Groups 63.285 3 21.095 3.461 0.041 3.238 Within Groups 97.504 16 6.094 Total 19

Multiple Comparison The F test gives an answer about equality of several means. When the test is rejected, we want to know more detailed comparisons among those means.

Multiple Comparison

Multiple Comparison People with graduate degrees work significantly longer than people with only a high school education. No two other groups are significantly different from one another. There are many multiple comparison techniques. The method used on the previous page is called Bonferroni multiple comparisons.

Multiple Comparison We found that internet users watched significantly fewer hours of TV than non-users. However, since internet users are better educated than non-users. We should concern with TV watching and education.

Multiple Comparison People with less than a high school diploma watch significantly more TV than each of the other education groups. High school graduates watch more TV than college graduates and more TV than people with graduate degrees. People with junior college, college and graduate degrees to not differ significantly from one another in average hours of TV viewing.

Multiple Comparison Analysis of variance for television hours by internet use

Two-way ANOVA Let us consider the average hours worked based on degree and gender. Based on the results of the one-way ANOVA, we can’t say anything about differences between men and women in hours worked per week.

Bar chart of hours worked by degree and gender

Two-way ANOVA Firstly, try to look at the data by stem-and-leaf plots, histograms, or bar charts for 10 cells. For each level of education, on average, females in the sample work less than males. The largest difference between males and females is for those with junior college degrees. The box plots provide much more information than the bar charts.

Two-way ANOVA For each of the five degree categories, the median hours worked is higher for men than for women. The length of the boxes for the men is somewhat larger than for the women. That tells us that the interquartile ranges for hours worked are larger for the men than for the women. The box plots provide much more information than the bar charts. There are some outliers and extreme points.

Two-way ANOVA Testing Hypotheses
Are the average hours worked the same for the five degree categories? Are the average hours worked the same for men and women? Is the relationship between average hours worked and degree the same for men and for women?

Interaction Before we go into the ANOVA model, let us introduce a new concept -- “interaction”. Consider this two-factor data (graph 1), we have a plot like this (graph 2). However, for this set of data (graph 3), we have the plot like this (graph 4). Comparing the two plots, the first case shows that the two lines are parallel, this indicates that there is no interaction between factors A and B. However, the lines for B-one and B-two cross each other in the second case. This indicates factor A interacts with factor B. For the three-level situation, (last two graphs appear and cover graph 1 and 3) in the first case, two broken-lines are parallel. This indicates interaction doesn’t exist, while the second case shows interaction occurs.

Two-way ANOVA

Two-way ANOVA The null hypotheses for the interaction is that the effect of type of degree on average hours worked is the same for males and females in the population. The F test shows the p-value for testing no-interaction to be 0.16. The absence of interaction tells you that it’s reasonable to believe that the difference in average hours worked between males and females is the same for all degree categories.

Two-way ANOVA The F test for the degree is significant with p-value This is consistent with the conclusion on one-way ANOVA. The observed significance level for the sex main effect is very small, less than The average hours worked for males and females are significant different.

Two-way ANOVA Removing the interaction effect

Two-way ANOVA Multiple comparison results
When possible, you should restrict the number of groups you compare. The more groups you compare, the less likely you are to detect true differences. There aren’t any comparisons for the gender variable in the table on next page.

Two-way ANOVA Next page gives plots of the predicted means for the 10 gender-and-degree combinations under the model without the interaction effect.

Two-way ANOVA Predicted means from the main effects model

Two-way ANOVA Next page gives a line chart of daily hours of television viewing for men and women. We see that for every category, except for graduate degree, on average men watch more television than women. From the plots it looks that there are interactions between “sex” and “degree”. But, for statistical test, the interaction effect is not significant.

Two-way ANOVA Line plot of television hours

Two-way ANOVA

Download ppt "Analysis of Variance The contents in this chapter are from Chapter 15 and Chapter 16 of the textbook. One-Way Analysis of Variance Multiple Comparisons."

Similar presentations