While you wait: Enter the following in your calculator. Find the mean and sample variation of each group. Bluman, Chapter 12 1
Chapter 12 Analysis of Variance McGraw-Hill, Bluman, 7th ed., Chapter 12 2
Chapter 12 Overview Introduction 12-1 One-Way Analysis of Variance 12-2 The Scheffé Test and the Tukey Test 12-3 Two-Way Analysis of Variance Bluman, Chapter 12 3
Chapter 12 Objectives 1. Use the one-way ANOVA technique to determine if there is a significant difference among three or more means. 2. Determine which means differ, using the Scheffé or Tukey test if the null hypothesis is rejected in the ANOVA. 3. Use the two-way ANOVA technique to determine if there is a significant difference in the main effects or interaction. Bluman, Chapter 12 4
What is the ANOVA Test? Remember the 2-Mean T-Test? For example: A salesman in car sales wants to find the difference between two types of cars in terms of mileage: Mid-Size Vehicles Sports Utility Vehicles
Car Salesman s Sample The salesman took an independent SRS from each population of vehicles: Level n Mean StDev Mid-size 28 27.101 mpg 2.629 mpg SUV 26 20.423 mpg 2.914 mpg If a 2-Mean ttest were done on this data: t = 8.15 P-value = ~0
What if the salesman wanted to compare another type of car, Pickup Trucks in addition to the SUV s and Mid-size vehicles? Level n Mean StDev Midsize 28 27.101 mpg 2.629 mpg SUV 26 20.423 mpg 2.914 mpg Pickup 8 23.125 mpg 2.588 mpg
This is an example of when we would use the ANOVA Test. In a 2-Mean TTest, we see if the difference between the 2 sample means is significant. The ANOVA is used to compare multiple means, and see if the difference between multiple sample means is significant.
Let s Compare the Means Yes, we see that no two of these confidence intervals overlap, therefore the means are significantly different. This is the question that the ANOVA test answers Do mathematically. these sample means look significantly different from each other?
More Confidence Intervals Not Significant Significant What if the confidence intervals were different? Would these confidence intervals be significantly different?
ANOVA Test Hypotheses H 0 : µ 1 = µ 2 = µ 3 (All of the means are equal) H 1 : Not all of the means are equal For Our Example: H 0 : µ Mid-size = µ SUV = µ Pickup The mean mileages of Mid-size vehicles, Sports Utility Vehicles, and Pickup trucks are all equal. H 1 : At least one of the mean mileages of Mid-size vehicles, Sports Utility Vehicles, and Pickup trucks is different.
Introduction The F test, used to compare two variances, can also be used to compare three of more means. This technique is called analysis of variance or ANOVA. For three groups, the F test can only show whether or not a difference exists among the three means, not where the difference lies. Other statistical tests, Scheffé test and the Tukey test, are used to find where the difference exists. Bluman, Chapter 12 12
12-1 One-Way Analysis of Variance When an F test is used to test a hypothesis concerning the means of three or more populations, the technique is called analysis of variance (commonly abbreviated as ANOVA). Although the t test is commonly used to compare two means, it should not be used to compare three or more. Bluman, Chapter 12 13
Assumptions for the F Test The following assumptions apply when using the F test to compare three or more means. 1. The populations from which the samples were obtained must be normally or approximately normally distributed. 2. The samples must be independent of each other. 3. The variances of the populations must be equal. Bluman, Chapter 12 14
The F Test In the F test, two different estimates of the population variance are made. The first estimate is called the betweengroup variance, and it involves finding the variance of the means. The second estimate, the within-group variance, is made by computing the variance using all the data and is not affected by differences in the means. Bluman, Chapter 12 15
The F Test If there is no difference in the means, the between-group variance will be approximately equal to the within-group variance, and the F test value will be close to 1 do not reject null hypothesis. However, when the means differ significantly, the between-group variance will be much larger than the within-group variance; the F test will be significantly greater than 1 reject null hypothesis. Bluman, Chapter 12 16
Chapter 12 Analysis of Variance Section 12-1 Example 12-1 Page #630 Bluman, Chapter 12 17
Example 12-1: Lowering Blood Pressure A researcher wishes to try three different techniques to lower the blood pressure of individuals diagnosed with high blood pressure. The subjects are randomly assigned to three groups; the first group takes medication, the second group exercises, and the third group follows a special diet. After four weeks, the reduction in each person s blood pressure is recorded. At α = 0.05, test the claim that there is no difference among the means. Bluman, Chapter 12 18
Example 12-1: Lowering Blood Pressure Step 1: State the hypotheses and identify the claim. H 0 : μ 1 = μ 2 = μ 3 (claim) H 1 : At least one mean is different from the others. Bluman, Chapter 12 19
To use ANOVA testing you should have: number of samples. k the sample means the sample variances the sample sizes. n Bluman, Chapter 12 20
There is the between group variation and the within group variation. The whole idea behind the analysis of variance is to compare the ratio of between group variance to within group variance. If the variance caused by the interaction between the samples is much larger when compared to the variance that appears within each group, then it is because the means aren't the same. Bluman, Chapter 12 21
The Grand Mean (GM) The grand mean of a set of samples is the total of all the data values divided by the total sample size. The total variation (not variance) is comprised the sum of the squares of the differences of each mean with the grand mean. Bluman, Chapter 12 22
Between Group Variation The variation due to the interaction between the samples is denoted SS(B) for Sum of Squares Between groups. SSB = n (x x GM ) 2 If the sample means are close to each other (and therefore the Grand Mean) this will be small. Bluman, Chapter 12 23
Between Group Variation There are k samples involved with one data value for each sample (the sample mean), so there are k-1 degrees of freedom. The variance due to the interaction between the samples is denoted MS(B) for Mean Square Between groups. MS B = SS B k 1 Bluman, Chapter 12 24
Between Group Variation This is the between group variation divided by its degrees of freedom. It is also denoted by s b 2. Bluman, Chapter 12 25
Within Group Variation The variation due to differences within individual samples, denoted SS(W) for Sum of Squares Within groups. Each sample is considered independently, no interaction between samples is involved. SS W = df s 2 Bluman, Chapter 12 26
Within Group Variation The degrees of freedom is equal to the sum of the individual degrees of freedom for each sample. Since each sample has degrees of freedom equal to one less than their sample sizes, and there are k samples, the total degrees of freedom is k less than the total sample size: df = N - k. 27
Within Group Variation The variance due to the differences within individual samples is denoted MS(W) for Mean Square Within groups. This is the within group variation divided by its degrees of freedom. It is also denoted by s w 2. MS W = SS W N k 28
F test statistic F = MS B MS W Recall that a F variable is the ratio of two independent chi-square variables divided by their respective degrees of freedom. Also recall that the F test statistic is the ratio of two sample variances, well, it turns out that's exactly what we have here. Bluman, Chapter 12 29
The F value: F = MS B MS W Bluman, Chapter 12 30
F test statistic The F test statistic is found by dividing the between group variance by the within group variance. The degrees of freedom for the numerator are the degrees of freedom for the between group (k-1) and the degrees of freedom for the denominator are the degrees of freedom for the within group (N-k). Bluman, Chapter 12 31
Example 12-1: Lowering Blood Pressure Step 2: Find the critical value. Since k = 3, N = 15, and α = 0.05, d.f.n. = k 1 = 3 1 = 2 d.f.d. = N k = 15 3 = 12 The critical value is 3.89, obtained from Table H. Bluman, Chapter 12 32
Example 12-1: Lowering Blood Pressure Step 3: Compute the test value. a. Find the mean and variance of each sample (these were provided with the data). b. Find the grand mean, the mean of all values in the samples. X GM X 10 12 9 4 116 N 15 15 7.73 c. Find the between-group variance, 2. 2 2 ni X i X GM sb k 1 s B Bluman, Chapter 12 33
Example 12-1: Lowering Blood Pressure Step 3: Compute the test value. (continued) 2 c. Find the between-group variance,. s B s B 2 2 2 2 5 11.8 7.73 5 3.8 7.73 5 7.6 7.73 3 1 160.13 80.07 2 2 d. Find the within-group variance, s W. s n 1 2 i B ni s 1 2 i 4 5.7 4 10.2 4 10.3 104.80 8.73 4 4 4 12 Bluman, Chapter 12 34
Example 12-1: Lowering Blood Pressure Step 3: Compute the test value. (continued) e. Compute the F value. s 80.07 F s 8.73 2 B 2 W 9.17 Step 4: Make the decision. Reject the null hypothesis, since 9.17 > 3.89. Step 5: Summarize the results. There is enough evidence to reject the claim and conclude that at least one mean is different from the others. Bluman, Chapter 12 35
ANOVA Please see page 634 The between-group variance is sometimes called the mean square, MS B. The numerator of the formula to compute MS B is called the sum of squares between groups, SS B. The within-group variance is sometimes called the mean square, MS W. The numerator of the formula to compute MS W is called the sum of squares within groups, SS W. Bluman, Chapter 12 36
Choice H In ( ) enter the lists follow each list by a comma Bluman, Chapter 12 37
Scroll down to see the rest of the values. Bluman, Chapter 12 38
ANOVA Summary Table: see page 633 Source Sum of Squares d.f. Mean Squares F Between SS B k 1 MS B MS MS B W Within (error) SS W N k MS W Total Bluman, Chapter 12 39
ANOVA Summary Table for Example 12-1, page 634 Source Sum of Squares d.f. Mean Squares F Between 160.13 2 80.07 9.17 Within (error) 104.80 12 8.73 Total 264.93 14 Compare the calculator results with the values on the chart. 40
ANOVA Summary Table for Example 12-1, page 634 Source Sum of Squares d.f. Mean Squares F Between 160.13 2 80.07 9.17 Within (error) 104.80 12 8.73 Total 264.93 14 Bluman, Chapter 12 41
ANOVA on your Calculator Enter the data on the lists on your calculator. Bluman, Chapter 12 42
Chapter 12 Analysis of Variance Section 12-1 Example 12-2 Page #632 Bluman, Chapter 12 43
Bluman, Chapter 12 44
Full solution for ANOVA For ANOVA testing in addition to performing hypothesis testing, an ANOVA summary table with proper values a and symbols should be included. For examples of ANOVA summary table see page 634 and 635 of your text. Bluman, Chapter 12 45
ANOVA Summary Table Use the values displayed by your calculator to determine the value of each of the following. Source Between Sum of Squares SS B d.f. k 1 Mean Squares MS B F MS MS B W Within (error) SS W N k MS W Total Bluman, Chapter 12 46
Example 12-2: Toll Road Employees A state employee wishes to see if there is a significant difference in the number of employees at the interchanges of three state toll roads. The data are shown. At α = 0.05, can it be concluded that there is a significant difference in the average number of employees at each interchange? Bluman, Chapter 12 47
Example 12-2: Toll Road Employees Step 1: State the hypotheses and identify the claim. H 0 : μ 1 = μ 2 = μ 3 H 1 : At least one mean is different from the others (claim). Bluman, Chapter 12 48
Example 12-2: Toll Road Employees Step 2: Find the critical value. Since k = 3, N = 18, and α = 0.05, d.f.n. = 2, d.f.d. = 15 The critical value is 3.68, obtained from Table H. Bluman, Chapter 12 49
Example 12-2: Toll Road Employees Step 3: Compute the test value. a. Find the mean and variance of each sample (these were provided with the data). b. Find the grand mean, the mean of all values in the samples. X GM X 7 14 32 11 152 8.4 N 15 18 c. Find the between-group variance, 2. 2 2 ni X i X GM sb k 1 s B Bluman, Chapter 12 50
Example 12-2: Toll Road Employees Step 3: Compute the test value. (continued) 2 c. Find the between-group variance,. s B s W 2 2 2 2 6 15.5 8.4 6 4 8.4 6 5.8 8.4 3 1 459.18 229.59 2 2 d. Find the within-group variance, s W. 2 2 n 1 si sb n 1 i i 5 81.9 5 25.6 5 29.0 682.5 4 4 4 15 45.5 Bluman, Chapter 12 51
Example 12-2: Toll Road Employees Step 3: Compute the test value. (continued) e. Compute the F value. s 229.59 F s 45.5 2 B 2 W 5.05 Step 4: Make the decision. Reject the null hypothesis, since 5.05 > 3.68. Step 5: Summarize the results. There is enough evidence to support the claim that there is a difference among the means. Bluman, Chapter 12 52
ANOVA Summary Table for Example 12-2 Source Sum of Squares d.f. Mean Squares F Between 459.18 2 229.59 5.05 Within (error) 682.5 15 45.5 Total 1141.68 17 Bluman, Chapter 12 53
Homework Read section 12.1 and take notes Sec 12.1 page 637 #1-7 and 9, 11, 13 Bluman, Chapter 12 54
Thanks For Watching A special thanks to Mr. Coons for all the help and advice.