Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Statistics for Managers Using Microsoft® Excel 5th Edition Chapter 10 Two-Sample Tests Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-1 Learning Objectives In this chapter, you learn how to use hypothesis testing for comparing the difference between: The means of two independent populations with equal variances The means of two independent populations with unequal variances The means of two related populations The proportions of two independent populations The variances of two independent populations Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-2 Two-Sample Tests Overview Two Sample Tests Independent Population Means Means, Related Populations Independent Population Proportions Same group before vs. after treatment Proportion 1vs. Proportion 2 Independent Population Variances Examples Group 1 vs. Group 2 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Variance 1 vs. Variance 2 Chap 10-3 Two-Sample Tests Independent Populations Different data sources Independent Population Means σ1 and σ2 known σ1 and σ2 unknown Independent: Sample selected from one population has no effect on the sample selected from the other population Use pooled variance t test, or separate-variance t test Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-4 The Process There are two tests to determine if the means of two populations are different. One test assumes the variances of the populations are equal the other is needed if the variances are not equal. Rather than make assumptions about the variances, I prefer to perform an F test for the equality of population variances and use the results to determine which model should be used. Therefore the F test comes first. Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-5 Testing Population Variances Purpose: To determine if two independent populations have the same variability. H0: σ12 = σ22 H1: σ12 ≠ σ22 H0: σ12 σ22 H1: σ12 < σ22 H0: σ12 ≤ σ22 H1: σ12 > σ22 Two-tail test Lower-tail test Upper-tail test Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-6 Testing Population Variances The F test statistic is: 2 1 2 2 S F S S12 = Variance of Sample 1 n1 - 1 = numerator degrees of freedom S22 = Variance of Sample 2 n2 - 1 = denominator degrees of freedom Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-7 F Test: An Example 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 variances between the NYSE & NASDAQ at the = 0.05 level? Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-8 F Test: Example Solution (continued) H0: σ12 = σ22 H1: σ12 ≠ σ22 The test statistic is: S12 1.302 F 2 1.256 2 S2 1.16 p-value= .588846 = .05 The p-value is not < alpha, so we do not reject H0 Conclusion: There is not sufficient evidence of a difference in the variances of dividend yield for the two exchanges Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-9 F test in PhStat PHStat | Two-Sample Tests | F Test for Differences in Two Variances … Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-10 Hypothesis Tests for Two Population Means Two Population Means, Independent Samples Lower tail test: Upper tail test: Two-tailed test: H0: μ1 μ2 H1: μ1 < μ2 H0: μ1 ≤ μ2 H1: μ1 > μ2 H0: μ1 = μ2 H1: μ1 ≠ μ2 i.e., i.e., i.e., H0: μ1 – μ2 0 H1: μ1 – μ2 < 0 H0: μ1 – μ2 ≤ 0 H1: μ1 – μ2 > 0 H0: μ1 – μ2 = 0 H1: μ1 – μ2 ≠ 0 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-11 Two-Sample Tests for Means Independent Populations Independent Population Means Assumptions: Samples are randomly and independently drawn σ1 and σ2 known Populations are normally distributed σ1 and σ2 unknown or large sample sizes are used Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-12 Difference Between Two Means Population means, independent samples σ1 and σ2 unknown but equal σ1 and σ2 unknown but unequal Use s to estimate unknown σ Use pooled variance t test where 1=2 or individual variance t test where 12 (proven by F test) Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-13 σ1 and σ2 Unknown but Equal (continued) Population means, independent samples σ1 and σ2 unknown but equal If an F test does not prove the variances to be unequal, we can assume that they are equal and pool them. The pooled standard deviation is Sp Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. n1 1S12 n2 1S2 2 (n1 1) (n2 1) Chap 10-14 σ1 and σ2 Unknown but Equal (continued) The test statistic for μ1 = μ2 is: Population means, independent samples t σ1 and σ2 unknown but equal X X 1 2 1 1 S n1 n 2 2 p Where t has (n1 + n2 – 2) d.f., and Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. S 2 p 2 2 n1 1S1 n2 1S2 (n1 1) (n2 1) Chap 10-15 Pooled Variance t Test: Example 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 Number 21 25 Sample mean 3.27 2.53 Sample std dev 1.30 1.16 Is there a difference in the mean dividend yield between the NYSE & NASDAQ ( = 0.05)? Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-16 Solution F = 1.256 p = .5888 H0: μ1 = μ2 Do Not Reject H1: μ1 ≠ μ2 2 = σ 2 σ 1 2 = 0.05 df = 21 + 25 - 2 = 44 Pooled Test Statistic: t 3.27 2.53 1 1 1.5021 21 25 p-value: 2.0397 .047407 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Reject H0 Reject H0 .025 .025 0 t Decision: Reject H0 at = 0.05 Conclusion: There is sufficient evidence of a difference in mean dividend yield for the two exchanges. Chap 10-17 Pooled Variance t Test in PhStat and Excel If the raw data is available Tools | Data Analysis | t-Test: Two Sample Assuming Equal Variances If only summary statistics are available PHStat | Two-Sample Tests | t Test for Differences in Two Means … Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-18 Independent Populations Unequal Variance If you cannot assume population variances are equal, the pooled-variance t test is inappropriate Instead, use a separate-variance t test, which includes the two separate sample variances in the computation of the test statistic The computations are not in the Text but are as follows: Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-19 The Unequal-Variance t Test Population means, independent samples σ1 and σ2 unknown and unequal (X 1 X 2) t 2 2 s1 s2 n1 n2 ( s / n1 s / n2 ) d.f. ( s12 / n1 ) 2 ( s22 / n2 ) 2 n2 1 n1 1 2 1 2 2 2 p TDIST (t , df , tails ) Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-20 Unequal Variance t Test: Example 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 Number 21 25 Sample mean 3.27 2.53 Sample std dev 2.30 1.16 Is there a difference in the mean dividend yield between the NYSE & NASDAQ ( = 0.05)? Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-21 Unequal Variance Solution Test Statistics: H0: m1 = m2 H1: m1 m2 = 0.05 df = 92 F = 3.9313 p = .001794 Reject HO: 1 2 t = 1.34 p-value =.1901 Reject H0 Reject H0 .025 .025 0 .1901 t Decision: Fail to Reject at = 0.05 Conclusion: There is not sufficient evidence of a difference in mean dividend yields for the two exchanges Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-22 Unequal Variance t Test in PhStat and Excel If the raw data is available Tools | Data Analysis | t-Test: Two Sample Assuming Unequal Variances If only summary statistics are available Use the Excel spreadsheet downloaded from the Homework web page Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-23 Confidence Intervals Independent Populations Independent Population Means The confidence interval for μ1 – μ2 is: X X t 1 2 σ1 and σ2 known n1 n 2 - 2 1 1 S n1 n 2 2 p Where σ1 and σ2 unknown 2 2 n 1 S n 1 S 1 2 2 S2 1 p Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. (n1 1) (n2 1) Chap 10-24 Two-Sample Tests Related Populations Tests Means of 2 Related Populations Paired or matched samples Repeated measures (before/after) Use difference between paired values: D = X1 - X2 Eliminates Variation Among Subjects Assumptions: Both Populations Are Normally Distributed or have large samples Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-25 Mean Difference, σD Unknown (continued) Paired samples If σD is unknown, we can estimate the unknown population standard deviation with a sample standard deviation. The test statistic for D is now a t statistic, with n-1 d.f.: D t SD n Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. n SD 2 (D D ) i i1 n 1 Chap 10-26 Paired Samples Example Assume you send your salespeople to a “customer service” training workshop to reduce complaints. Is the training effective? You collect the following data: 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 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. - 2 -14 - 1 0 - 4 -21 D = Di n = -4.2 SD 2 (D D ) i n 1 5.67 Chap 10-27 Paired Samples: Solution Has the training made a difference in the number of complaints (at the 0.05 level)? H0: μD = 0 H1: μD 0 = .01 D = - 4.2 Reject /2 /2 -1.66 d.f. = n - 1 = 4 Decision: Do not reject H0 Test Statistic: D 4.2 t 1.66 SD / n 5.67/ 5 p-value= Reject .1730 (p-value is not <.05) Conclusion: There is not sufficient evidence of a change in the number of complaints. Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-28 Related Sample t Test in PhStat and Excel If the raw data is available Tools | Data Analysis | t-Test: Paired Two Sample for Means If only summary statistics are available No test available Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-29 Two Population Proportions Goal: Test a hypothesis or form a confidence interval for two independent population proportions, π1 = π2 Assumptions: n1π1 5 , n1(1-π1) 5 n2π2 5 , n2(1-π2) 5 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-30 Two Population Proportions Hypothesis for Population Proportions Lower-tail test: Upper-tail test: Two-tail test: H0: π1 π2 H1: π1 < π2 H0: π1 ≤ π2 H1: π1 > π2 H0: π1 = π2 H1: π1 ≠ π2 i.e., i.e., i.e., H0: π1 – π2 0 H1: π1 – π2 < 0 H0: π1 – π2 ≤ 0 H1: π1 – π2 > 0 H0: π1 – π2 = 0 H1: π1 – π2 ≠ 0 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-31 Two Population Proportions Since you begin by assuming the null hypothesis is true, you assume π1 = π2 and pool the two sample (p) estimates. The pooled estimate for the overall proportion is: X1 X 2 p n1 n 2 where X1 and X2 are the number of successes in samples 1 and 2 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-32 Two Population Proportions The test statistic for π1 = 2 is a Z statistic: Z where p1 p2 1 1 p (1 p) n1 n2 p X1 X 2 X X , P1 1 , P2 2 n1 n 2 n1 n2 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-33 Example: Two population Proportions Is there a significant difference between the proportion of men and the proportion of women who will vote Yes on Proposition A? In a random sample, 36 of 72 men and 31 of 50 women indicated they would vote Yes Test for a significant difference at the .05 level of significance Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-34 Check the Assumptions The sample proportions are: Men: ps1 = 36/72 = .50 Women: ps2 = 31/50 = .62 Assumptions Men np=72(.5)=36 n(1-p)=72(.5)=36 Women np=50(.62)=31 n(1-p)50(.38)=19 All values > 5 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-35 Two Independent Population Proportions: Example H0: π1 = π2 (the two proportions are equal) H1: π1 π2 The sample proportions are: Men: p1 = 36/72 = .50 Women: p2 = 31/50 = .62 The pooled estimate for the overall proportion is: X1 X 2 36 31 67 p .549 n1 n 2 72 50 122 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-36 Two Independent Population Proportions: Example The test statistic for π1 = π2 is: z p1 p2 1 1 p (1 p) n1 n 2 .50 .62 1 1 .549 (1 .549) 72 50 Reject H0 .025 .025 -1.96 -1.31 1.31 P-value for -1.31 is .1902 At = .05 Reject H0 1.96 Decision: Do not reject H0 There is not sufficient evidence of a difference in the proportions of men and women who will vote yes on Proposition A. Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-37 Confidence Interval - Two Independent Population Proportions The confidence interval for π1 – π2 is: p1 p2 Z p1 (1 p1 ) p2 (1 p2 ) n1 n2 Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-38 Two Sample Tests in PHStat Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-39 Sample PHStat Output Input Output Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-40 Sample PHStat Output (continued) Input Output Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-41 Chapter Summary In this chapter, we have Compared two independent samples Performed pooled variance t test for the differences in two means Examined unequal variance t test for the differences in two means Formed confidence intervals for the differences between two means Compared two related samples (paired samples) Performed paired sample t test for the mean difference Formed confidence intervals for the paired difference Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-42 Chapter Summary In this chapter, we have Compared two population proportions Performed Z-test for equality of two population proportions Formed confidence intervals for the difference between two population proportions Performed F tests for the difference between two population variances Statistics for Managers Using Microsoft Excel, 5e © 2008 Prentice-Hall, Inc. Chap 10-43