Slides Prepared by JOHN S. LOUCKS St. Edward’s University © 2003 Thomson/South-Western Slide 1 Chapter 10 Comparisons Involving Means Estimation of the Difference between the Means of Two Populations: Independent Samples Hypothesis Tests about the Difference between the Means of Two Populations: Independent Samples Inferences about the Difference between the Means of Two Populations: Matched Samples Introduction to Analysis of Variance (ANOVA) ANOVA: Testing for the Equality of k Population Means © 2003 Thomson/South-Western Slide 2 Estimation of the Difference Between the Means of Two Populations: Independent Samples Point Estimator of the Difference between the Means of Two Populations Sampling Distribution x1 x2 Interval Estimate of Large-Sample Case Interval Estimate of Small-Sample Case © 2003 Thomson/South-Western Slide 3 Point Estimator of the Difference Between the Means of Two Populations Let 1 equal the mean of population 1 and 2 equal the mean of population 2. The difference between the two population means is 1 - 2. To estimate 1 - 2, we will select a simple random sample of size n1 from population 1 and a simple random sample of size n2 from population 2. Let x1 equal the mean of sample 1 and x2 equal the mean of sample 2. The point estimator of the difference between the means of the populations 1 and 2 is x1 x2 . © 2003 Thomson/South-Western Slide 4 Sampling Distribution of x1 x2 Properties of the Sampling Distribution of x1 x2 • Expected Value E ( x1 x2 ) 1 2 © 2003 Thomson/South-Western Slide 5 Sampling Distribution of x1 x2 Properties of the Sampling Distribution of x1 x2 • Standard Deviation x1 x2 12 n1 22 n2 where: 1 = standard deviation of population 1 2 = standard deviation of population 2 n1 = sample size from population 1 n2 = sample size from population 2 © 2003 Thomson/South-Western Slide 6 Interval Estimate of 1 - 2: Large-Sample Case (n1 > 30 and n2 > 30) Interval Estimate with 1 and 2 Known x1 x2 z / 2 x1 x2 where: 1 - is the confidence coefficient © 2003 Thomson/South-Western Slide 7 Interval Estimate of 1 - 2: Large-Sample Case (n1 > 30 and n2 > 30) Interval Estimate with 1 and 2 Unknown x1 x2 z / 2 sx1 x2 where: sx1 x2 © 2003 Thomson/South-Western s12 s22 n1 n2 Slide 8 Example: Par, Inc. Interval Estimate of 1 - 2: Large-Sample Case Par, Inc. is a manufacturer of golf equipment and has developed a new golf ball that has been designed to provide “extra distance.” In a test of driving distance using a mechanical driving device, a sample of Par golf balls was compared with a sample of golf balls made by Rap, Ltd., a competitor. The sample statistics appear on the next slide. © 2003 Thomson/South-Western Slide 9 Example: Par, Inc. Interval Estimate of 1 - 2: Large-Sample Case • Sample Statistics Sample Size Mean Standard Dev. Sample #1 Par, Inc. n1 = 120 balls x1 = 235 yards s1 = 15 yards © 2003 Thomson/South-Western Sample #2 Rap, Ltd. n2 = 80 balls x2 = 218 yards s2 = 20 yards Slide 10 Example: Par, Inc. Point Estimate of the Difference Between Two Population Means 1 = mean distance for the population of Par, Inc. golf balls 2 = mean distance for the population of Rap, Ltd. golf balls Point estimate of 1 - 2 = x1 x2 = 235 - 218 = 17 yards. © 2003 Thomson/South-Western Slide 11 Point Estimator of the Difference Between the Means of Two Populations Population 1 Par, Inc. Golf Balls Population 2 Rap, Ltd. Golf Balls 1 = mean driving 2 = mean driving distance of Par golf balls distance of Rap golf balls m1 – 2 = difference between the mean distances Simple random sample of n1 Par golf balls Simple random sample of n2 Rap golf balls x1 = sample mean distance for sample of Par golf ball x2 = sample mean distance for sample of Rap golf ball x1 - x2 = Point Estimate of m1 – 2 © 2003 Thomson/South-Western Slide 12 Example: Par, Inc. 95% Confidence Interval Estimate of the Difference Between Two Population Means: Large-Sample Case, 1 and 2 Unknown Substituting the sample standard deviations for the population standard deviation: x1 x2 z / 2 12 22 (15) 2 ( 20) 2 17 1. 96 n1 n2 120 80 = 17 + 5.14 or 11.86 yards to 22.14 yards. We are 95% confident that the difference between the mean driving distances of Par, Inc. balls and Rap, Ltd. balls lies in the interval of 11.86 to 22.14 yards. © 2003 Thomson/South-Western Slide 13 Interval Estimate of 1 - 2: Small-Sample Case (n1 < 30 and/or n2 < 30) Interval Estimate with 2 Known x1 x2 z / 2 x1 x2 where: x1 x2 1 1 ( ) n1 n2 © 2003 Thomson/South-Western 2 Slide 14 Interval Estimate of 1 - 2: Small-Sample Case (n1 < 30 and/or n2 < 30) Interval Estimate with 2 Unknown x1 x2 t / 2 sx1 x2 where: sx1 x2 1 1 s ( ) n1 n2 2 © 2003 Thomson/South-Western 2 2 ( n 1 ) s ( n 1 ) s 1 2 2 s2 1 n1 n2 2 Slide 15 Example: Specific Motors Specific Motors of Detroit has developed a new automobile known as the M car. 12 M cars and 8 J cars (from Japan) were road tested to compare miles-pergallon (mpg) performance. The sample statistics are: Sample Size Mean Standard Deviation Sample #1 M Cars n1 = 12 cars x1 = 29.8 mpg s1 = 2.56 mpg © 2003 Thomson/South-Western Sample #2 J Cars n2 = 8 cars x2 = 27.3 mpg s2 = 1.81 mpg Slide 16 Example: Specific Motors Point Estimate of the Difference Between Two Population Means 1 = mean miles-per-gallon for the population of M cars 2 = mean miles-per-gallon for the population of J cars Point estimate of 1 - 2 = x1 x2 = 29.8 - 27.3 = 2.5 mpg. © 2003 Thomson/South-Western Slide 17 Example: Specific Motors 95% Confidence Interval Estimate of the Difference Between Two Population Means: Small-Sample Case We will make the following assumptions: • The miles per gallon rating must be normally distributed for both the M car and the J car. • The variance in the miles per gallon rating must be the same for both the M car and the J car. © 2003 Thomson/South-Western Slide 18 Example: Specific Motors 95% Confidence Interval Estimate of the Difference Between Two Population Means: Small-Sample Case Using the t distribution with n1 + n2 - 2 = 18 degrees of freedom, the appropriate t value is t.025 = 2.101. We will use a weighted average of the two sample variances as the pooled estimator of 2. © 2003 Thomson/South-Western Slide 19 Example: Specific Motors 95% Confidence Interval Estimate of the Difference Between Two Population Means: Small-Sample Case 2 2 2 2 ( n 1 ) s ( n 1 ) s 11 ( 2 . 56 ) 7 ( 1 . 81 ) 1 2 2 s2 1 5. 28 n1 n2 2 12 8 2 x1 x2 t.025 1 1 1 1 s ( ) 2. 5 2.101 5. 28( ) n1 n2 12 8 2 = 2.5 + 2.2 or .3 to 4.7 miles per gallon. We are 95% confident that the difference between the mean mpg ratings of the two car types is from .3 to 4.7 mpg (with the M car having the higher mpg). © 2003 Thomson/South-Western Slide 20 Hypothesis Tests About the Difference between the Means of Two Populations: Independent Samples Hypotheses H0: 1 - 2 < 0 Ha: 1 - 2 > 0 H0: 1 - 2 > 0 Ha: 1 - 2 < 0 Test Statistic Large-Sample z ( x1 x2 ) ( 1 2 ) 12 n1 22 n2 © 2003 Thomson/South-Western H0: 1 - 2 = 0 Ha: 1 - 2 0 Small-Sample t ( x1 x2 ) ( 1 2 ) s2 (1 n1 1 n2 ) Slide 21 Example: Par, Inc. Hypothesis Tests About the Difference between the Means of Two Populations: Large-Sample Case Par, Inc. is a manufacturer of golf equipment and has developed a new golf ball that has been designed to provide “extra distance.” In a test of driving distance using a mechanical driving device, a sample of Par golf balls was compared with a sample of golf balls made by Rap, Ltd., a competitor. The sample statistics appear on the next slide. © 2003 Thomson/South-Western Slide 22 Example: Par, Inc. Hypothesis Tests About the Difference Between the Means of Two Populations: Large-Sample Case • Sample Statistics Sample Size Mean Standard Dev. Sample #1 Par, Inc. n1 = 120 balls x1 = 235 yards s1 = 15 yards © 2003 Thomson/South-Western Sample #2 Rap, Ltd. n2 = 80 balls x2 = 218 yards s2 = 20 yards Slide 23 Example: Par, Inc. Hypothesis Tests About the Difference Between the Means of Two Populations: Large-Sample Case Can we conclude, using a .01 level of significance, that the mean driving distance of Par, Inc. golf balls is greater than the mean driving distance of Rap, Ltd. golf balls? © 2003 Thomson/South-Western Slide 24 Example: Par, Inc. Hypothesis Tests About the Difference Between the Means of Two Populations: Large-Sample Case 1 = mean distance for the population of Par, Inc. golf balls 2 = mean distance for the population of Rap, Ltd. golf balls • Hypotheses H0: 1 - 2 < 0 Ha: 1 - 2 > 0 © 2003 Thomson/South-Western Slide 25 Example: Par, Inc. Hypothesis Tests About the Difference Between the Means of Two Populations: Large-Sample Case • Rejection Rule Reject H0 if z > 2.33 z ( x1 x2 ) ( 1 2 ) 12 n1 22 n2 © 2003 Thomson/South-Western ( 235 218) 0 17 6. 49 2 2 2. 62 (15) ( 20) 120 80 Slide 26 Example: Par, Inc. Hypothesis Tests About the Difference Between the Means of Two Populations: Large-Sample Case • Conclusion Reject H0. We are at least 99% confident that the mean driving distance of Par, Inc. golf balls is greater than the mean driving distance of Rap, Ltd. golf balls. © 2003 Thomson/South-Western Slide 27 Example: Specific Motors Hypothesis Tests About the Difference Between the Means of Two Populations: Small-Sample Case Can we conclude, using a .05 level of significance, that the miles-per-gallon (mpg) performance of M cars is greater than the miles-pergallon performance of J cars? © 2003 Thomson/South-Western Slide 28 Example: Specific Motors Hypothesis Tests About the Difference Between the Means of Two Populations: Small-Sample Case 1 = mean mpg for the population of M cars 2 = mean mpg for the population of J cars • Hypotheses H0: 1 - 2 < 0 Ha: 1 - 2 > 0 © 2003 Thomson/South-Western Slide 29 Example: Specific Motors Hypothesis Tests About the Difference Between the Means of Two Populations: Small-Sample Case • Rejection Rule Reject H0 if t > 1.734 (a = .05, d.f. = 18) • Test Statistic t where: ( x1 x2 ) ( 1 2 ) s2 (1 n1 1 n2 ) (n1 1)s12 (n2 1)s22 s n1 n2 2 2 © 2003 Thomson/South-Western Slide 30 Inference About the Difference between the Means of Two Populations: Matched Samples With a matched-sample design each sampled item provides a pair of data values. The matched-sample design can be referred to as blocking. This design often leads to a smaller sampling error than the independent-sample design because variation between sampled items is eliminated as a source of sampling error. © 2003 Thomson/South-Western Slide 31 Example: Express Deliveries Inference About the Difference between the Means of Two Populations: Matched Samples A Chicago-based firm has documents that must be quickly distributed to district offices throughout the U.S. The firm must decide between two delivery services, UPX (United Parcel Express) and INTEX (International Express), to transport its documents. In testing the delivery times of the two services, the firm sent two reports to a random sample of ten district offices with one report carried by UPX and the other report carried by INTEX. Do the data that follow indicate a difference in mean delivery times for the two services? © 2003 Thomson/South-Western Slide 32 Example: Express Deliveries District Office Seattle Los Angeles Boston Cleveland New York Houston Atlanta St. Louis Milwaukee Denver Delivery Time (Hours) UPX INTEX Difference 32 30 19 16 15 18 14 10 7 16 © 2003 Thomson/South-Western 25 24 15 15 13 15 15 8 9 11 7 6 4 1 2 3 -1 2 -2 5 Slide 33 Example: Express Deliveries Inference About the Difference between the Means of Two Populations: Matched Samples Let d = the mean of the difference values for the two delivery services for the population of district offices • Hypotheses H0: d = 0, Ha: d © 2003 Thomson/South-Western Slide 34 Example: Express Deliveries Inference About the Difference between the Means of Two Populations: Matched Samples • Rejection Rule Assuming the population of difference values is approximately normally distributed, the t distribution with n - 1 degrees of freedom applies. With = .05, t.025 = 2.262 (9 degrees of freedom). Reject H0 if t < -2.262 or if t > 2.262 © 2003 Thomson/South-Western Slide 35 Example: Express Deliveries Inference About the Difference between the Means of Two Populations: Matched Samples di ( 7 6... 5) d 2. 7 n 10 2 76.1 ( di d ) sd 2. 9 n 1 9 d d 2. 7 0 t 2. 94 sd n 2. 9 10 © 2003 Thomson/South-Western Slide 36 Example: Express Deliveries Inference About the Difference between the Means of Two Populations: Matched Samples • Conclusion Reject H0. There is a significant difference between the mean delivery times for the two services. © 2003 Thomson/South-Western Slide 37 Introduction to Analysis of Variance Analysis of Variance (ANOVA) can be used to test for the equality of three or more population means using data obtained from observational or experimental studies. We want to use the sample results to test the following hypotheses. H0: 1 = 2 = 3 = . . . = k Ha: Not all population means are equal © 2003 Thomson/South-Western Slide 38 Introduction to Analysis of Variance If H0 is rejected, we cannot conclude that all population means are different. Rejecting H0 means that at least two population means have different values. © 2003 Thomson/South-Western Slide 39 Assumptions for Analysis of Variance For each population, the response variable is normally distributed. The variance of the response variable, denoted 2, is the same for all of the populations. The observations must be independent. © 2003 Thomson/South-Western Slide 40 Analysis of Variance: Testing for the Equality of k Population Means Between-Treatments Estimate of Population Variance Within-Treatments Estimate of Population Variance Comparing the Variance Estimates: The F Test The ANOVA Table © 2003 Thomson/South-Western Slide 41 Between-Treatments Estimate of Population Variance A between-treatment estimate of 2 is called the mean square treatment and is denoted MSTR. k MSTR 2 n ( x x ) j j j 1 k 1 The numerator of MSTR is called the sum of squares treatment and is denoted SSTR. The denominator of MSTR represents the degrees of freedom associated with SSTR. © 2003 Thomson/South-Western Slide 42 Within-Samples Estimate of Population Variance The estimate of 2 based on the variation of the sample observations within each sample is called the mean square error and is denoted by MSE. k MSE 2 ( n 1 ) s j j j 1 nT k The numerator of MSE is called the sum of squares error and is denoted by SSE. The denominator of MSE represents the degrees of freedom associated with SSE. © 2003 Thomson/South-Western Slide 43 Comparing the Variance Estimates: The F Test If the null hypothesis is true and the ANOVA assumptions are valid, the sampling distribution of MSTR/MSE is an F distribution with MSTR d.f. equal to k - 1 and MSE d.f. equal to nT - k. If the means of the k populations are not equal, the value of MSTR/MSE will be inflated because MSTR overestimates 2. Hence, we will reject H0 if the resulting value of MSTR/MSE appears to be too large to have been selected at random from the appropriate F distribution. © 2003 Thomson/South-Western Slide 44 Test for the Equality of k Population Means Hypotheses H0: 1 = 2 = 3 = . . . = k Ha: Not all population means are equal Test Statistic F = MSTR/MSE Rejection Rule Reject H0 if F > F where the value of F is based on an F distribution with k - 1 numerator degrees of freedom and nT - 1 denominator degrees of freedom. © 2003 Thomson/South-Western Slide 45 Sampling Distribution of MSTR/MSE The figure below shows the rejection region associated with a level of significance equal to where F denotes the critical value. Do Not Reject H0 Reject H0 F Critical Value © 2003 Thomson/South-Western MSTR/MSE Slide 46 ANOVA Table Source of Sum of Variation Squares Treatment SSTR Error SSE Total SST Degrees of Freedom k-1 nT - k nT - 1 Mean Squares F MSTR MSTR/MSE MSE SST divided by its degrees of freedom nT - 1 is simply the overall sample variance that would be obtained if we treated the entire nT observations as one data set. k nj SST ( xij x) 2 SSTR SSE j 1 i 1 © 2003 Thomson/South-Western Slide 47 Example: Reed Manufacturing Analysis of Variance J. R. Reed would like to know if the mean number of hours worked per week is the same for the department managers at her three manufacturing plants (Buffalo, Pittsburgh, and Detroit). A simple random sample of 5 managers from each of the three plants was taken and the number of hours worked by each manager for the previous week is shown on the next slide. © 2003 Thomson/South-Western Slide 48 Example: Reed Manufacturing Analysis of Variance Observation 1 2 3 4 5 Sample Mean Sample Variance Plant 1 Buffalo 48 54 57 54 62 55 26.0 © 2003 Thomson/South-Western Plant 2 Pittsburgh 73 63 66 64 74 68 26.5 Plant 3 Detroit 51 63 61 54 56 57 24.5 Slide 49 Example: Reed Manufacturing Analysis of Variance • Hypotheses H0: 1 = 2 = 3 Ha: Not all the means are equal where: 1 = mean number of hours worked per week by the managers at Plant 1 2 = mean number of hours worked per week by the managers at Plant 2 3 = mean number of hours worked per week by the managers at Plant 3 © 2003 Thomson/South-Western Slide 50 Example: Reed Manufacturing Analysis of Variance • Mean Square Treatment Since the sample sizes are all equal x= = (55 + 68 + 57)/3 = 60 SSTR = 5(55 - 60)2 + 5(68 - 60)2 + 5(57 - 60)2 = 490 MSTR = 490/(3 - 1) = 245 • Mean Square Error SSE = 4(26.0) + 4(26.5) + 4(24.5) = 308 MSE = 308/(15 - 3) = 25.667 © 2003 Thomson/South-Western Slide 51 Example: Reed Manufacturing Analysis of Variance • F - Test If H0 is true, the ratio MSTR/MSE should be near 1 since both MSTR and MSE are estimating 2. If Ha is true, the ratio should be significantly larger than 1 since MSTR tends to overestimate 2. © 2003 Thomson/South-Western Slide 52 Example: Reed Manufacturing Analysis of Variance • Rejection Rule Assuming = .05, F.05 = 3.89 (2 d.f. numerator, 12 d.f. denominator). Reject H0 if F > 3.89 • Test Statistic F = MSTR/MSE = 245/25.667 = 9.55 © 2003 Thomson/South-Western Slide 53 Example: Reed Manufacturing Analysis of Variance • ANOVA Table Source of Variation Treatments Error Total Sum of Degrees of Squares Freedom 490 308 798 © 2003 Thomson/South-Western 2 12 14 Mean Square 245 25.667 F 9.55 Slide 54 Example: Reed Manufacturing Analysis of Variance • Conclusion F = 9.55 > F.05 = 3.89, so we reject H0. The mean number of hours worked per week by department managers is not the same at each plant. © 2003 Thomson/South-Western Slide 55 End of Chapter 10 © 2003 Thomson/South-Western Slide 56