Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
12 - 1 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 2 When you have completed this chapter, you will be able to: 1. Discuss the general idea of analysis of variance. 2. List the characteristics of the F distribution. 3. Conduct a test of hypothesis to determine whether the variances of two populations are equal. 4. Organize data into a one-way and a two-way ANOVA table. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 3 5. Define the terms treatments and blocks. 6. Conduct a test of hypothesis to determine whether three or more treatment means are equal. 7. Develop multiple tests for difference between each pair of treatment means. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Characteristics of the F-Distribution 12 - 4 There is a “family of F-Distributions: Each member of the family is determined by two parameters: …the numerator degrees of freedom, and the … denominator degrees of freedom F cannot be negative, and it is a continuous distribution The F distribution is positively skewed Its values range from 0 to as F , the curve approaches the X-axis Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Test for Equal Variances 12 - 5 For the two tailed test, the test statistic is given by: F 2 s1 2 s1 s 22 and s 22 are the sample variances for the two samples The null hypothesis is rejected if the computed value of the test statistic is greater than the critical value Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 6 Colin, a stockbroker at Critical Securities, reported that the mean rate of return on a sample of 10 internet stocks was 12.6 percent with a standard deviation of 3.9 percent. The mean rate of return on a sample of 8 utility stocks was 10.9 percent with a standard deviation of 3.5 percent. At the .05 significance level, can Colin conclude that there is more variation in the internet stocks? Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Hypothesis Testing Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule Step 5 Compute the value of the test statistic and make a decision Do not reject H0 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 7 Reject H0 and accept H1 Hypothesis Test Step 1 Step 2 Step 3 Step 4 Step 5 12 - 8 H 0 : s I2 s U2 H : s I2 > s 2 1 U Select the level of significance = 0.05 The test statistic is the Identify the test statistic F distribution State the null and alternate hypotheses State the decision rule Compute the test statistic and make a decision Reject H0 if F > 3.68 The df are 9 in the numerator and 7 in the denominator. s 12 ( 3 .9 ) 2 F = 1.2416 s 22 (3 .5 ) 2 Do not reject the null hypothesis; there is insufficient evidence to show more variation in the internet stocks. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. ANOVA The F distribution is also used for testing whether two or more sample means came from the same or equal populations This this technique is called analysis of variance or ANOVA Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 9 ANOVA 12 - 10 requires the following conditions… …the sampled populations follow the normal distribution …the populations have equal standard deviations …the samples are randomly selected and are independent Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. ANOVA Procedure 12 - 11 The Null Hypothesis (H0) is that the population means are the same The Alternative Hypothesis (H1) is that at least one of the means is different The Test Statistic is the F distribution The Decision rule is to reject H0 if F(computed) is greater than F(table) with numerator and denominator df Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 12 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Terminology 12 - 13 Total Variation …is the sum of the squared differences between each observation and the overall mean Treatment Variation …is the sum of the squared differences between each treatment mean and the overall mean Random Variation …is the sum of the squared differences between each observation and its treatment mean Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 14 If there k populations being sampled, the numerator degrees of freedom is k – 1 If there are a total of n observations the denominator degrees of freedom is n - k The test statistic is computed by: F SST ( k - 1) SSE Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. (n- k ) 12 - 15 • SS Total is the total sum of squares S ( X) 2 SS Total S X n Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 2 12 - 16 • SST is the treatment sum of squares T c2 (S X )2 SST S n nc TC is the column total, nc is the number of observations in each column, SX the sum of all the observations, and n the total number of observations Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 17 • SSE is the sum of squares error SSE SS total - SST Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 18 Easy Meals Restaurants specialize in meals for senior citizens. Katy Smith, President, recently developed a new meat loaf dinner. Before making it a part of the regular menu she decides to test it in several of her restaurants. She would like to know if there is a difference in the mean number of dinners sold per day at the Aynor, Loris, and Lander restaurants. Use the .05 significance level. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 19 Aynor 13 12 14 12 …continued Tc nc 51 4 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Loris 10 12 13 11 46 4 Lander 18 16 17 17 17 85 5 12 - 20 …continued • SS Total (is the total sum of squares) 2 S ( X ) 2 SS Total SX n = 2634 - (182)2 13 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. = 86 12 - 21 …continued •SST is the treatment sum of squares 2 2 T c (S X ) SST S n c (51 ) 2 (46 ) 2 ( 85) 2 + + 4 5 4 = 76.25 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. n (182 ) 2 13 12 - 22 …continued • SSE is the sum of squares error SSE = SS Total - SST 86 – 76.25 = 9.75 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 23 Hypothesis Test Step 1 State the null and alternate hypotheses Step 2 Select the level of significance Step 3 Identify the test statistic Step 4 State the decision rule Step 5 Compute the test statistic and make a decision m1 = m2 = m3 H : Treatment means are 1 not all equal = 0.05 The test statistic is the F distribution Reject H0 if F > 4.10 The df are 2 in the numerator and 10 in the denominator. SST ( k - 1) F Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. H 0: SSE (n- k ) 76.25 2 9.75 10 = 39.10 12 - 24 …continued The decision is to reject the null hypothesis The treatment means are not the same The mean number of meals sold at the three locations is not the same Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. ANOVA Table 12 - 25 …from the Minitab system Analysis of Variance Source DF SS MS F P Factor 2 76.250 38.125 39.10 0.000 Error 10 9.750 0.975 Total 12 86.000 Individual 95% CIs For Mean Based on Pooled St.Dev Level N Mean St.Dev ---------+--------+---------+------Aynor 4 12.750 0.957 (---*---) Loris 4 11.500 1.291 (---*---) Lander 5 17.000 0.707 (---*---) ---------+---------+---------+------Pooled St.Dev = 0.987 12.5 15.0 17.5 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 26 Analysis of Variance in Excel Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Using 12 - 27 See Click on DATA ANALYSIS See… Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Using 12 - 28 See Highlight ANOVA: SINGLE FACTOR …Click OK Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. See… Using 12 - 29 Input the sample data in Columns A, B, C. See INPUT NEEDS A1:C6 See… Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Using 12 - 30 F test SST SSE SS Total Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 31 Inferences About Treatment Means Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Inferences About Treatment Means 12 - 32 When we reject the null hypothesis that the means are equal, we may want to know which treatment means differ One of the simplest procedures is through the use of confidence intervals Confidence Interval Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Confidence Interval for the Difference Between Two Means 1 1 (X1 - X2 ) t MSE + n1 n 2 where t is obtained from the t table with degrees of freedom (n - k). MSE = [SSE/(n - k)] Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 33 Confidence Interval for the Difference Between Two Means 12 - 34 Develop a 95% confidence interval for the difference in the mean number of meat loaf dinners sold in Lander and Aynor. Can Katy conclude that there is a difference between the two restaurants? Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Confidence Interval for the Difference Between Two Means (X 1 - X2 )t MSE 12 - 35 1 1 + MSE n1 n 2 1 1 (17-12.75) 2.228 .975 + 4 5 4 . 25 1 . 48 ( 2.77, 5.73) Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Confidence Interval for the Difference Between Two Means 12 - 36 …continued Because zero is not in the interval, we conclude that this pair of means differs The mean number of meals sold in Aynor is different from Lander Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 37 ANOVA For the two-factor ANOVA we test whether there is a significant difference between the treatment effect and whether there is a difference in the blocking effect! B r2 ( S X )2 SSB S n k …Let Br be the block totals (r for rows) …Let SSB represent the sum of squares for the blocks Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 38 ANOVA The Bieber Manufacturing Co. operates 24 hours a day, five days a week. The workers rotate shifts each week. Todd Bieber, the owner, is interested in whether there is a difference in the number of units produced when the employees work on various shifts. A sample of five workers is selected and their output recorded on each shift. At the .05 significance level, can we conclude there is a difference in the mean production by shift and in the mean production by employee? Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 39 ANOVA …continued Employee Day Evening Output Output Night Output McCartney 31 25 35 Neary 33 26 33 Schoen 28 24 30 Thompson 30 29 28 Wagner 28 26 27 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 40 Hypothesis Test Difference between various shifts? Step 1 State the null and alternate hypotheses H 0: m1 = m2 = m3 H : Not all means are equal 1 Step 2 Select the level of significance Step 3 Identify the test statistic The test statistic is the F distribution Step 4 State the decision rule Reject H0 if F > 4.46. The df are 2 and 8 Step 5 Compute the test statistic and make a decision F Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. = 0.05 SST (k - 1) SSE (( k - 1 )( b - 1 )) 12 - 41 ANOVA …continued Compute the various sum of squares: SS(total) = 139.73 Using SST = 62.53 to get these SSB = 33.73 results SSE = 43.47 df(block) = 4, df(treatment) = 2 df(error)=8 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 42 ANOVA …continued Step 5 F SST (k - 1) SSE (( k - 1 )( b - 1 )) (3-1) 43.47 ((3 - 1 )(5 - 1)) 62 . 53 = 5.754 Since 5.754 > 4.46, H0 is rejected. There is a difference in the mean number of units produced on the different shifts. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 43 Hypothesis Test Difference between various shifts? Step 1 State the null and alternate hypotheses H 0: m1 = m2 = m3 H : Not all means are equal 1 Step 2 Select the level of significance Step 3 Identify the test statistic The test statistic is the F distribution Step 4 State the decision rule Reject H0 if F > 3.84 The df are 4 and 8 Step 5 Compute the test statistic and make a decision F Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. = 0.05 SST (k - 1) SSE (( k - 1 )( b - 1 )) 12 - 44 ANOVA …continued Step 5 F SST (k - 1) SSE (( k - 1 )( b - 1 )) 33.73 4 43.47 (2)(4) = 1.55 Since 1.55 < 3.84, H0 is not rejected. There is no significant difference in the mean number of units produced by the various employees. Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 45 ANOVA …from the Minitab system Units versus Worker, Shift Analysis of Variance for Units Source Worker Shift Error Total DF 4 2 8 14 SS 33.73 62.53 43.47 139.73 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. MS 8.43 31.27 5.43 F 1.55 5.75 P 0.276 0.028 Using 12 - 46 INPUT DATA Select Highlight ANOVA: TWO FACTOR WITHOUT REPLICATION …Click OK See… Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Using 12 - 47 Since F(test) < F(critical), there is not sufficient evidence to reject H0 There is no significant difference in the average number of units produced by the different employees. Ftest SSB SST SSE SS Total Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. Fcritical Test your learning… www.mcgrawhill.ca/college/lind Online Learning Centre for quizzes extra content data sets searchable glossary access to Statistics Canada’s E-Stat data …and much more! Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved. 12 - 48 12 - 49 This completes Chapter 12 Copyright © 2004 by The McGraw-Hill Companies, Inc. All rights reserved.