Business Statistics A First Course 6 th Edition
Business Statistics: A First Course 6 th Edition Chapter 10 Two-Sample Tests and One-Way ANOVA Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -1
Learning Objectives In this chapter, you learn n How to use hypothesis testing for comparing the difference between: n The means of two independent populations n The means of two related populations n The proportions of two independent populations n The variances of two independent populations n The means of more than two populations Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -2
Two-Sample Tests DCOVA Two-Sample Tests Population Means, Independent Samples Population Means, Related Samples Population Proportions Population Variances Examples: Group 1 vs. Group 2 Same group before vs. after treatment Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Proportion 1 vs. Proportion 2 Variance 1 vs. Variance 2 Chap 10 -3
Difference Between Two Means DCOVA Population means, independent samples * σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, not assumed equal Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Goal: Test hypothesis or form a confidence interval for the difference between two population means, μ 1 – μ 2 The point estimate for the difference is X 1 – X 2 Chap 10 -4
Difference Between Two Means: Independent Samples DCOVA n Population means, independent samples Different data sources * σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, not assumed equal Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall n n Unrelated Independent n Sample selected from one population has no effect on the sample selected from the other population Use Sp to estimate unknown σ. Use a Pooled-Variance t test. Use S 1 and S 2 to estimate unknown σ1 and σ2. Use a Separate-Variance t test. Chap 10 -5
Hypothesis Tests for Two Population Means DCOVA Two Population Means, Independent Samples Lower-tail test: Upper-tail test: Two-tail test: H 0: μ 1 μ 2 H 1: μ 1 < μ 2 H 0: μ 1 ≤ μ 2 H 1: μ 1 > μ 2 H 0: μ 1 = μ 2 H 1: μ 1 ≠ μ 2 i. e. , H 0: μ 1 – μ 2 0 H 1: μ 1 – μ 2 < 0 H 0: μ 1 – μ 2 ≤ 0 H 1: μ 1 – μ 2 > 0 H 0: μ 1 – μ 2 = 0 H 1: μ 1 – μ 2 ≠ 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -6
Hypothesis tests for μ 1 – μ 2 DCOVA Two Population Means, Independent Samples Lower-tail test: Upper-tail test: Two-tail test: H 0: μ 1 – μ 2 0 H 1: μ 1 – μ 2 < 0 H 0: μ 1 – μ 2 ≤ 0 H 1: μ 1 – μ 2 > 0 H 0: μ 1 – μ 2 = 0 H 1: μ 1 – μ 2 ≠ 0 -t Reject H 0 if t. STAT < -t t Reject H 0 if t. STAT > t Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall /2 -t /2 Reject H 0 if t. STAT < -t /2 or t. STAT > t /2 Chap 10 -7
Hypothesis tests for µ 1 - µ 2 with σ1 and σ2 unknown and assumed equal DCOVA Assumptions: Population means, independent samples σ1 and σ2 unknown, assumed equal § Samples are randomly and independently drawn * σ1 and σ2 unknown, not assumed equal Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall § Populations are normally distributed or both sample sizes are at least 30 § Population variances are unknown but assumed equal Chap 10 -8
Hypothesis tests for µ 1 - µ 2 with σ1 and σ2 unknown and assumed equal (continued) DCOVA • The pooled variance is: Population means, independent samples σ1 and σ2 unknown, assumed equal * σ1 and σ2 unknown, not assumed equal Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall • The test statistic is: • Where t. STAT has d. f. = (n 1 + n 2 – 2) Chap 10 -9
Confidence interval for µ 1 - µ 2 with σ1 and σ2 unknown and assumed equal DCOVA Population means, independent samples σ1 and σ2 unknown, assumed equal * σ1 and σ2 unknown, not assumed equal Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall The confidence interval for μ 1 – μ 2 is: Where tα/2 has d. f. = n 1 + n 2 – 2 Chap 10 -10
Pooled-Variance t Test Example DCOVA You are a financial analyst for a brokerage firm. Is there a difference in dividend yield between stocks listed on the NYSE & NASDAQ? You collect the following data: NYSE NASDAQ Sample Size 21 25 Sample mean 3. 27 2. 53 Sample std dev 1. 30 1. 16 Assuming both populations are approximately normal with equal variances, is there a difference in mean yield ( = 0. 05)? Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -11
Pooled-Variance t Test Example: Calculating the Test Statistic (continued) H 0: μ 1 - μ 2 = 0 i. e. (μ 1 = μ 2) H 1: μ 1 - μ 2 ≠ 0 i. e. (μ 1 ≠ μ 2) DCOVA The test statistic is: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -12
Pooled-Variance t Test Example: Hypothesis Test Solution DCOVA H 0: μ 1 - μ 2 = 0 i. e. (μ 1 = μ 2) H 1: μ 1 - μ 2 ≠ 0 i. e. (μ 1 ≠ μ 2) = 0. 05 df = 21 + 25 - 2 = 44 Critical Values: t = ± 2. 0154 Test Statistic: Reject H 0 . 025 -2. 0154 Reject H 0 . 025 0 2. 0154 t 2. 040 Decision: Reject H 0 at = 0. 05 Conclusion: There is evidence of a difference in means. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -13
Excel Pooled-Variance t test Comparing NYSE & NASDAQ DCOVA Pooled-Variance t Test for the Difference Between Two Means (assumes equal population variances) Data Hypothesized Difference Level of Significance Population 1 Sample Size Sample Mean Sample Standard Deviation Population 2 Sample Size Sample Mean Sample Standard Deviation Intermediate Calculations Population 1 Sample Degrees of Freedom Population 2 Sample Degrees of Freedom Total Degrees of Freedom Pooled Variance Standard Error Difference in Sample Means t Test Statistic 0 0. 05 21 =COUNT(DATA!$A: $A) 3. 27 =AVERAGE(DATA!$A: $A) 1. 3 =STDEV(DATA!$A: $A) 25 =COUNT(DATA!$B: $B) 2. 53 =AVERAGE(DATA!$B: $B) 1. 16 =STDEV(DATA!$B: $B) Decision: Reject H 0 at = 0. 05 Conclusion: There is evidence of a difference in means. 20 =B 7 - 1 24 =B 11 - 1 44 =B 16 + B 17 1. 502 =((B 16 * B 9^2) + (B 17 * B 13^2)) / B 18 0. 363 =SQRT(B 19 * (1/B 7 + 1/B 11)) 0. 74 =B 8 - B 12 2. 040 =(B 21 - B 4) / B 20 Two-Tail Test Lower Critical Value Upper Critical Value p-value Reject the null hypothesis -2. 015 =-TINV(B 5, B 18) 2. 015 =TINV(B 5, B 18) 0. 047 =TDIST(ABS(B 22), B 18, 2) =IF(B 27<B 5, "Reject the null hypothesis", "Do not reject the null hypothesis") Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -14
Minitab Pooled-Variance t test Comparing NYSE & NASDAQ DCOVA Two-Sample T-Test and CI Sample N Mean St. Dev SE Mean 1 21 3. 27 1. 30 0. 28 2 25 2. 53 1. 16 0. 23 Difference = mu (1) - mu (2) Estimate for difference: 0. 740 95% CI for difference: (0. 009, 1. 471) T-Test of difference = 0 (vs not =): T-Value = 2. 04 P-Value = 0. 047 DF = 44 Both use Pooled St. Dev = 1. 2256 Decision: Reject H 0 at = 0. 05 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Conclusion: There is evidence of a difference in means. Chap 10 -15
Pooled-Variance t Test Example: Confidence Interval for µ 1 - µ 2 DCOVA Since we rejected H 0 can we be 95% confident that µNYSE > µNASDAQ? 95% Confidence Interval for µNYSE - µNASDAQ Since 0 is less than the entire interval, we can be 95% confident that µNYSE > µNASDAQ Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -16
Hypothesis tests for µ 1 - µ 2 with σ1 and σ2 unknown, not assumed equal DCOVA Assumptions: Population means, independent samples § Samples are randomly and independently drawn § Populations are normally distributed or both sample sizes are at least 30 σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, not assumed equal * Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall § Population variances are unknown and cannot be assumed to be equal Chap 10 -17
Hypothesis tests for µ 1 - µ 2 with σ1 and σ2 unknown and not assumed equal (continued) DCOVA The formulae for this test are not covered in this book. Population means, independent samples See reference 8 from this chapter for more details. σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, not assumed equal * Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall This test utilizes two separate sample variances to estimate the degrees of freedom for the t test Chap 10 -18
Related Populations The Paired Difference Test DCOVA Tests Means of 2 Related Populations Related samples n n n Paired or matched samples Repeated measures (before/after) Use difference between paired values: Di = X 1 i - X 2 i n n Eliminates Variation Among Subjects Assumptions: n Both Populations Are Normally Distributed n Or, if not Normal, use large samples Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -19
Related Populations The Paired Difference Test DCOVA (continued) The ith paired difference is Di , where Related samples Di = X 1 i - X 2 i The point estimate for the paired difference population mean μD is D : The sample standard deviation is SD n is the number of pairs in the paired sample Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -20
The Paired Difference Test: Finding t. STAT DCOVA Paired samples n The test statistic for μD is: n Where t. STAT has n - 1 d. f. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -21
The Paired Difference Test: Possible Hypotheses DCOVA Paired Samples Lower-tail test: Upper-tail test: Two-tail test: H 0: μD 0 H 1: μD < 0 H 0: μD ≤ 0 H 1: μD > 0 H 0: μD = 0 H 1: μD ≠ 0 -t Reject H 0 if t. STAT < -t t Reject H 0 if t. STAT > t Where t. STAT has n - 1 d. f. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall /2 -t /2 Reject H 0 if t. STAT < -t /2 or t. STAT > t /2 Chap 10 -22
The Paired Difference Confidence Interval DCOVA Paired samples The confidence interval for μD is where Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -23
Paired Difference Test: DCOVA Example Assume you send your salespeople to a “customer service” training workshop. Has the training made a difference in the number of complaints? You collect the following data: n Number of Complaints: (2) - (1) Salesperson Before (1) After (2) Difference, Di C. B. T. F. M. H. R. K. M. O. 6 20 3 0 4 4 6 2 0 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall - 2 -14 - 1 0 - 4 -21 D = Di n = -4. 2 Chap 10 -24
Paired Difference Test: DCOVA Solution n Has the training made a difference in the number of complaints (at the 0. 01 level)? H 0: μ D = 0 H 1: μD 0 =. 01 D = - 4. 2 t 0. 005 = ± 4. 604 d. f. = n - 1 = 4 Test Statistic: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Reject /2 - 4. 604 - 1. 66 4. 604 Decision: Do not reject H 0 (tstat is not in the reject region) Conclusion: There is insufficient evidence there is significant change in the number of complaints. Chap 10 -25
Paired t Test In Excel DCOVA Paired t Test Data Hypothesized Mean Diff. Level of Significance Intermediate Calculations Sample Size Dbar Degrees of Freedom SD Standard Error t-Test Statistic Two-Tail Test Lower Critical Value Upper Critical Value p-value Do not reject the null Hypothesis 0 0. 05 Since -2. 776 < -1. 66 < 2. 776 we do not reject the null hypothesis. Or 5 =COUNT(I 2: I 6) -4. 2 =AVERAGE(I 2: I 6) 4 =B 8 - 1 5. 67 =STDEV(I 2: I 6) 2. 54 =B 11/SQRT(B 8) -1. 66 =(B 9 - B 4)/B 12 Since p-value = 0. 173 > 0. 05 we do not reject the null hypothesis. Thus we conclude that there is Insufficient evidence to conclude there is a difference in the average number of complaints. -2. 776 =-TINV(B 5, B 10) 2. 776 =TINV(B 5, B 10) 0. 173 =TDIST(ABS(B 13), B 10, 2) =IF(B 18<B 5, "Reject the null hypothesis", "Do not reject the null hypothesis") Data not shown is in column I Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -26
Paired t Test In Minitab Yields The Same Conclusions Paired T-Test and CI: After, Before DCOVA Paired T for After - Before After Before Difference N Mean St. Dev SE Mean 5 2. 40 2. 61 1. 17 5 6. 60 7. 80 3. 49 5 -4. 20 5. 67 2. 54 95% CI for mean difference: (-11. 25, 2. 85) T-Test of mean difference = 0 (vs not = 0): T-Value = -1. 66 P-Value = 0. 173 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -27
Two Population Proportions DCOVA Goal: test a hypothesis or form a confidence interval for the difference between two population proportions, π1 – π2 Population proportions The point estimate for the difference is Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -28
Two Population Proportions DCOVA Population proportions In the null hypothesis we assume the null hypothesis is true, so we assume π1 = π2 and pool the two sample estimates The pooled estimate for the overall proportion is: where X 1 and X 2 are the number of items of interest in samples 1 and 2 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -29
Two Population Proportions (continued) The test statistic for π1 – π2 is a Z statistic: Population proportions DCOVA where Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -30
Hypothesis Tests for Two Population Proportions DCOVA Population proportions Lower-tail test: Upper-tail test: Two-tail test: H 0: π1 π2 H 1: π1 < π2 H 0: π1 ≤ π2 H 1: π1 > π2 H 0: π1 = π2 H 1: π1 ≠ π2 i. e. , H 0: π1 – π2 0 H 1: π1 – π2 < 0 H 0: π1 – π2 ≤ 0 H 1: π1 – π2 > 0 H 0: π1 – π2 = 0 H 1: π1 – π2 ≠ 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -31
Hypothesis Tests for Two Population Proportions (continued) Population proportions DCOVA Lower-tail test: Upper-tail test: Two-tail test: H 0: π1 – π2 0 H 1: π1 – π2 < 0 H 0: π1 – π2 ≤ 0 H 1: π1 – π2 > 0 H 0: π1 – π2 = 0 H 1: π1 – π2 ≠ 0 -z Reject H 0 if ZSTAT < -Z z Reject H 0 if ZSTAT > Z Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall /2 -z /2 Reject H 0 if ZSTAT < -Z /2 or ZSTAT > Z /2 Chap 10 -32
Hypothesis Test Example: Two population Proportions DCOVA Is there a significant difference between the proportion of men and the proportion of women who will vote Yes on Proposition A? n n In a random sample, 36 of 72 men and 35 of 50 women indicated they would vote Yes Test at the. 05 level of significance Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -33
Hypothesis Test Example: Two population Proportions (continued) n The hypothesis test is: DCOVA H 0: π1 – π2 = 0 (the two proportions are equal) H 1: π1 – π2 ≠ 0 (there is a significant difference between proportions) n The sample proportions are: n Men: p 1 = 36/72 = 0. 50 n Women: p 2 = 35/50 = 0. 70 § The pooled estimate for the overall proportion is: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -34
Hypothesis Test Example: Two population Proportions The test statistic for π1 – π2 is: DCOVA (continued) Reject H 0 . 025 -1. 96 -2. 20 1. 96 Decision: Reject H 0 Critical Values = ± 1. 96 For =. 05 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Conclusion: There is evidence of a difference in proportions who will vote yes between men and women. Chap 10 -35
Two Proportion Test In Excel DCOVA Z Test for Differences in Two Proportions Data Hypothesized Difference Level of Significance Group 1 Number of items of interest Sample Size Group 2 Number of items of interest Sample Size Intermediate Calculations Group 1 Proportion Group 2 Proportion Difference in Two Proportions Average Proportion Z Test Statistic Two-Tail Test Lower Critical Value Upper Critical Value p-value Reject the null hypothesis 0 0. 05 36 72 35 50 Since -2. 20 < -1. 96 Or Since p-value = 0. 028 < 0. 05 We reject the null hypothesis 0. 5 =B 7/B 8 0. 7 =B 10/B 11 -0. 2 =B 14 - B 15 Decision: 0. 582 =(B 7 + B 10)/(B 8 + B 11) -2. 20 =(B 16 -B 4)/SQRT((B 17*(1 -B 17))*(1/B 8+1/B 11)) -1. 96 =NORMSINV(B 5/2) 1. 96 =NORMSINV(1 - B 5/2) 0. 028 =2*(1 - NORMSDIST(ABS(B 18))) =IF(B 23 < B 5, "Reject the null hypothesis", "Do not reject the null hypothesis") Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Reject H 0 Conclusion: There is evidence of a difference in proportions who will vote yes between men and women. Chap 10 -36
Two Proportion Test In Minitab Shows The Same Conclusions DCOVA Test and CI for Two Proportions Sample X 1 36 2 35 N 72 50 Sample p 0. 500000 0. 700000 Difference = p (1) - p (2) Estimate for difference: -0. 2 95% CI for difference: (-0. 371676, -0. 0283244) Test for difference = 0 (vs not = 0): Z = -2. 28 P-Value = 0. 022 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -37
Confidence Interval for Two Population Proportions DCOVA Population proportions The confidence interval for π1 – π2 is: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -38
Testing for the Ratio Of Two Population Variances DCOVA Tests for Two Population Variances F test statistic * Hypotheses FSTAT H 0: σ12 = σ22 H 1: σ12 ≠ σ22 H 0: σ12 ≤ σ22 H 1: σ12 > σ22 Where: = Variance of sample 1 (the larger sample variance) n 1 = sample size of sample 1 = Variance of sample 2 (the smaller sample variance) n 2 = sample size of sample 2 n 1 – 1 = numerator degrees of freedom n 2 – 1 = denominator degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -39
The F Distribution n n DCOVA The F critical value is found from the F table There are two degrees of freedom required: numerator and denominator n The larger sample variance is always the numerator n When n In the F table, df 1 = n 1 – 1 ; df 2 = n 2 – 1 n numerator degrees of freedom determine the column n denominator degrees of freedom determine the row Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -40
Finding the Rejection Region DCOVA H 0: σ12 = σ22 H 1: σ12 ≠ σ22 H 0: σ12 ≤ σ22 H 1: σ12 > σ22 /2 0 Do not reject H 0 Fα/2 Reject H 0 if FSTAT > Fα/2 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall F 0 Do not reject H 0 Fα Reject H 0 F Reject H 0 if FSTAT > Fα Chap 10 -41
F Test: An Example DCOVA You are a financial analyst for a brokerage firm. You want to compare dividend yields between stocks listed on the NYSE & NASDAQ. You collect the following data: NYSE NASDAQ Number 21 25 Mean 3. 27 2. 53 Std dev 1. 30 1. 16 Is there a difference in the NYSE 0. 05 level? Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall variances between & NASDAQ at the = Chap 10 -42
F Test: Example Solution DCOVA n Form the hypothesis test: (there is no difference between variances) (there is a difference between variances) n Find the F critical value for = 0. 05: n Numerator d. f. = n 1 – 1 = 20 n Denominator d. f. = n 2 – 1 = 25 – 1 = 24 n Fα/2 = F. 025, 20, 24 = 2. 33 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -43
F Test: Example Solution DCOVA (continued) n The test statistic is: H 0: σ12 = σ22 H 1: σ12 ≠ σ22 /2 =. 025 0 n n FSTAT = 1. 256 is not in the rejection region, so we do not reject H 0 Do not reject H 0 Reject H 0 F F 0. 025=2. 33 Conclusion: There is insufficient evidence of a difference in variances at =. 05 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -44
Two Variance F Test In Excel DCOVA F Test for Differences in Two Variables Data Level of Significance Larger-Variance Sample Size Sample Variance Smaller-Variance Sample Size Sample Variance 0. 05 21 1. 6900 =1. 3^2 25 1. 3456 =1. 16^2 Intermediate Calculations F Test Statistic Population 1 Sample Degrees of Freedom Population 2 Sample Degrees of Freedom 1. 256 1. 255945 20 =B 6 - 1 24 =B 9 - 1 Conclusion: There is insufficient evidence of a difference in variances at =. 05 because: F statistic =1. 256 < 2. 327 Fα/2 or p-value = 0. 589 > 0. 05 = α. Two-Tail Test Upper Critical Value p-value Do not reject the null hypothesis 2. 327 =FINV(B 4/2, B 14, B 15) 0. 589 =2*FDIST(B 13, B 14, B 15) =IF(B 19<B 4, "Reject the null hypothesis", "Do not reject the null hypothesis") Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -45
Two Variance F Test In Minitab Yields The Same Conclusion DCOVA Test and CI for Two Variances Null hypothesis Sigma(1) / Sigma(2) = 1 Alternative hypothesis Sigma(1) / Sigma(2) not = 1 Significance level Alpha = 0. 05 Statistics Sample 1 2 N 21 25 St. Dev 1. 300 1. 160 Variance 1. 690 1. 346 Ratio of standard deviations = 1. 121 Ratio of variances = 1. 256 95% Confidence Intervals Distribution of Data Normal CI for St. Dev Ratio (0. 735, 1. 739) CI for Variance Ratio (0. 540, 3. 024) Tests Test Method DF 1 DF 2 Statistic P-Value F Test (normal) 20 24 1. 26 0. 589 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -46
One-Way Analysis Of Variance (ANOVA) Setting DCOVA n n Want to examine differences among more than two groups The groups involved are classified according to levels of a factor of interest (numerical or categorical) n Different levels produce different groups n Think of each group as a sample from a different population Observe effects on the dependent variable n Are the groups the same? When there is only 1 factor the design is called a completely randomized design Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -47
One-Way Analysis of Variance DCOVA n Evaluate the difference among the means of three or more groups Examples: Accident rates for 1 st, 2 nd, and 3 rd shift Expected mileage for five brands of tires n Assumptions n Populations are normally distributed n Populations have equal variances n Samples are randomly and independently drawn Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -48
Hypotheses of One-Way ANOVA DCOVA n n n n All population means are equal i. e. , no factor effect (no variation in means among groups) n At least one population mean is different n i. e. , there is a factor effect n Does not mean that all population means are different (some pairs may be the same) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -49
One-Way ANOVA DCOVA The Null Hypothesis is True All Means are the same: (No Factor Effect) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -50
One-Way ANOVA DCOVA (continued) The Null Hypothesis is NOT true At least one of the means is different (Factor Effect is present) or Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -51
Partitioning the Variation n DCOVA Total variation can be split into two parts: SST = SSA + SSW SST = Total Sum of Squares (Total variation) SSA = Sum of Squares Among Groups (Among-group variation) SSW = Sum of Squares Within Groups (Within-group variation) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -52
Partitioning the Variation (continued) SST = SSA + SSW DCOVA Total Variation = the aggregate variation of the individual data values across the various factor levels (SST) Among-Group Variation = variation among the factor sample means (SSA) Within-Group Variation = variation that exists among the data values within a particular factor level (SSW) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -53
Partition of Total Variation DCOVA Total Variation (SST) = Variation Due to Factor (SSA) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall + Variation Due to Random Error (SSW) Chap 10 -54
Total Sum of Squares DCOVA SST = SSA + SSW Where: SST = Total sum of squares c = number of groups or levels nj = number of observations in group j Xij = ith observation from group j X = grand mean (mean of all data values) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -55
Total Variation DCOVA (continued) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -56
Among-Group Variation DCOVA SST = SSA + SSW Where: SSA = Sum of squares among groups c = number of groups nj = sample size from group j Xj = sample mean from group j X = grand mean (mean of all data values) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -57
Among-Group Variation (continued) DCOVA Variation Due to Differences Among Groups Mean Square Among = SSA/degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -58
Among-Group Variation DCOVA (continued) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -59
Within-Group Variation DCOVA SST = SSA + SSW Where: SSW = Sum of squares within groups c = number of groups nj = sample size from group j Xj = sample mean from group j Xij = ith observation in group j Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -60
Within-Group Variation (continued) DCOVA Summing the variation within each group and then adding over all groups Mean Square Within = SSW/degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -61
Within-Group Variation DCOVA (continued) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -62
Obtaining the Mean Squares DCOVA The Mean Squares are obtained by dividing the various sum of squares by their associated degrees of freedom Mean Square Among (d. f. = c-1) Mean Square Within (d. f. = n-c) Mean Square Total (d. f. = n-1) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -63
One-Way ANOVA Table Source of Variation Degrees of Freedom Sum Of Squares Among Groups c-1 Within Groups n-c SSW Total n– 1 SST SSA DCOVA Mean Square (Variance) F SSA MSA = c-1 SSW MSW = n-c FSTAT = MSA MSW c = number of groups n = sum of the sample sizes from all groups df = degrees of freedom Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -64
One-Way ANOVA F Test Statistic DCOVA H 0: μ 1= μ 2 = … = μc H 1: At least two population means are different n Test statistic MSA is mean squares among groups MSW is mean squares within groups n Degrees of freedom n n df 1 = c – 1 (c = number of groups) df 2 = n – c (n = sum of sample sizes from all populations) Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -65
Interpreting One-Way ANOVA F Statistic DCOVA n The F statistic is the ratio of the among estimate of variance and the within estimate of variance n n n The ratio must always be positive df 1 = c -1 will typically be small df 2 = n - c will typically be large Decision Rule: n Reject H 0 if FSTAT > Fα, otherwise do not reject H 0 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall 0 Do not reject H 0 Reject H 0 Fα Chap 10 -66
One-Way ANOVA F Test Example You want to see if when three different golf clubs are used, they hit the ball different distances. You randomly select five measurements from trials on an automated driving machine for each club. At the 0. 05 significance level, is there a difference in mean distance? Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall DCOVA Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 Chap 10 -67
One-Way ANOVA Example: Scatter Plot DCOVA Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 Distance 270 260 250 240 230 220 210 200 190 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall • • • • • 1 2 3 Club Chap 10 -68
One-Way ANOVA Example Computations DCOVA Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 X 1 = 249. 2 n 1 = 5 X 2 = 226. 0 n 2 = 5 X 3 = 205. 8 n 3 = 5 X = 227. 0 n = 15 c = 3 SSA = 5 (249. 2 – 227)2 + 5 (226 – 227)2 + 5 (205. 8 – 227)2 = 4, 716. 4 SSW = (254 – 249. 2)2 + (263 – 249. 2)2 +…+ (204 – 205. 8)2 = 1, 119. 6 MSA = 4, 716. 4 / (3 -1) = 2, 358. 2 MSW = 1, 119. 6 / (15 -3) = 93. 3 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -69
One-Way ANOVA Example Solution DCOVA Test Statistic: H 0: μ 1 = μ 2 = μ 3 H 1: μj not all equal = 0. 05 df 1= 2 df 2 = 12 Decision: Reject H 0 at = 0. 05 Critical Value: Fα = 3. 89 =. 05 0 Do not reject H 0 Reject H 0 Fα = 3. 89 FSTAT Conclusion: There is evidence that at least one μj differs = 25. 275 from the rest Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -70
One-Way ANOVA Excel Output DCOVA SUMMARY Groups Count Sum Average Variance Club 1 5 1246 249. 2 108. 2 Club 2 5 1130 226 77. 5 Club 3 5 1029 205. 8 94. 2 ANOVA Source of Variation SS df MS Between Groups 4716. 4 2 2358. 2 Within Groups 1119. 6 12 93. 3 Total 5836. 0 14 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall F P-value 25. 275 F crit 4. 99 E-05 3. 89 Chap 10 -71
One-Way ANOVA Minitab Output DCOVA One-way ANOVA: Distance versus Club Source DF SS MS F P Club 2 4716. 4 2358. 2 25. 28 0. 000 Error 12 1119. 6 93. 3 Total 14 5836. 0 S = 9. 659 R-Sq = 80. 82% R-Sq(adj) = 77. 62% Individual 95% CIs For Mean Based on Pooled St. Dev Level N Mean St. Dev -------+---------+-----+-1 5 249. 20 10. 40 (-----*-----) 2 5 226. 00 8. 80 (-----*-----) 3 5 205. 80 9. 71 (-----*-----) -------+---------+-----+- 208 224 240 256 Pooled St. Dev = 9. 66 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -72
The Tukey-Kramer Procedure DCOVA n Tells which population means are significantly different n n n e. g. : μ 1 = μ 2 μ 3 Done after rejection of equal means in ANOVA Allows paired comparisons n Compare absolute mean differences with critical range μ 1 = μ 2 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall μ 3 x Chap 10 -73
Tukey-Kramer Critical Range DCOVA where: Qα = Upper Tail Critical Value from Studentized Range Distribution with c and n - c degrees of freedom (see appendix E. 7 table) MSW = Mean Square Within nj and nj’ = Sample sizes from groups j and j’ Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -74
The Tukey-Kramer Procedure: Example DCOVA Club 1 Club 2 Club 3 254 234 200 263 218 222 241 235 197 237 227 206 251 216 204 1. Compute absolute mean differences: 2. Find the Qα value from the table in appendix E. 7 with c = 3 and (n – c) = (15 – 3) = 12 degrees of freedom: Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -75
The Tukey-Kramer Procedure: Example (continued) DCOVA 3. Compute Critical Range: 4. Compare: 5. All of the absolute mean differences are greater than critical range. Therefore there is a significant difference between each pair of means at 5% level of significance. Thus, with 95% confidence we can conclude that the mean distance for club 1 is greater than club 2 and 3, and club 2 is greater than club 3. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -76
ANOVA Assumptions n Randomness and Independence n n Select random samples from the c groups (or randomly assign the levels) Normality n n DCOVA The sample values for each group are from a normal population Homogeneity of Variance n n All populations sampled from have the same variance Can be tested with Levene’s Test Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -77
ANOVA Assumptions Levene’s Test n n Tests the assumption that the variances of each population are equal. First, define the null and alternative hypotheses: n n DCOVA H 0: σ21 = σ22 = …=σ2 c H 1: Not all σ2 j are equal Second, compute the absolute value of the difference between each value and the median of each group. Third, perform a one-way ANOVA on these absolute differences. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -78
Levene Homogeneity Of Variance Test Example DCOVA H 0: σ21 = σ22 = σ23 H 1: Not all σ2 j are equal Calculate Medians Club 1 Club 2 Calculate Absolute Differences Club 3 Club 1 Club 2 Club 3 237 216 197 14 11 7 241 218 200 10 9 4 251 227 204 Median 0 0 0 254 234 206 3 7 2 263 235 222 12 8 18 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -79
Levene Homogeneity Of Variance Test Example (Excel) (continued) DCOVA Anova: Single Factor SUMMARY Groups Count Sum Average Variance Club 1 5 39 7. 8 36. 2 Club 2 5 35 7 17. 5 Club 3 5 31 6. 2 50. 2 F Pvalue Source of Variation Between Groups Within Groups Total SS df 6. 4 2 415. 6 12 422 MS 3. 2 0. 092 F crit 0. 912 3. 885 34. 6 14 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Since the p-value is greater than 0. 05 there is insufficient evidence of a difference in the variances Chap 10 -80
Levene Homogeneity Of Variance Test Example (Minitab) (continued) DCOVA One-way ANOVA: Abs. Diff versus Club Source Club Error Total DF 2 12 14 SS 6. 4 415. 6 422. 0 MS 3. 2 34. 6 F 0. 09 P 0. 912 S = 5. 885 R-Sq = 1. 52% R-Sq(adj) = 0. 00% Individual 95% CIs For Mean Based on Pooled St. Dev Level N Mean St. Dev ---------+---------+ 1 5 7. 800 6. 017 (--------*--------) 2 5 7. 000 4. 183 (--------*--------) 3 5 6. 200 7. 085 (--------*--------) ---------+---------+ 3. 5 7. 0 10. 5 14. 0 Since the p-value is greater than 0. 05 there is insufficient evidence of a difference in the variances Pooled St. Dev = 5. 885 Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -81
Chapter Summary n n n Performed pooled-variance t test for the difference between the means of two independent populations Formed confidence interval for the difference between the means of two independent populations Performed paired t test for the difference between means of two related populations Formed confidence interval for the difference between means of two related populations Compared two population proportions from two independent populations Compared two population variances from two independent populations via the F test Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -82
Chapter Summary (Con’t) n Described one-way analysis of variance n n n The logic of ANOVA assumptions F test for difference in c means The Tukey-Kramer procedure for multiple comparisons The Levene test for homogeneity of variance Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -83
All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior written permission of the publisher. Printed in the United States of America. Copyright © 2013 Pearson Education, Inc. publishing as Prentice Hall Chap 10 -84
- Slides: 84