Download presentation
Presentation is loading. Please wait.
Published byLogan Hutchinson Modified over 9 years ago
1
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-1 Chapter 9 Two Sample Tests Statistics for Managers Using Microsoft ® Excel 4 th Edition
2
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-2 Chapter Goals After completing this chapter, you should be able to: Compare two independent samples with an F test for the difference in two variances t test for the difference in two means where Test two means from related samples Complete a Z test for the difference between two proportions Test for normality
3
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-3 Two Sample Tests Population Means, Independent Samples Population Means, Related Samples Population Variances Group 1 vs. independent Group 2 Same group before vs. after treatment Variance 1 vs. Variance 2 Examples: Population Proportions Proportion 1 vs. Proportion 2
4
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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.
5
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-5 Tests for the difference in variances for two independent populations Parametric test procedure using s 1 and s 2 Assumptions Both populations are normally distributed Test is not robust to this violation Samples are randomly and independently drawn The F Distribution
6
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-6 Hypothesis Tests for Variances Tests for Two Population Variances F test statistic H 0 : σ 1 2 = σ 2 2 H 1 : σ 1 2 ≠ σ 2 2 Two tailed test Lower tail test Upper tail test H 0 : σ 1 2 σ 2 2 H 1 : σ 1 2 < σ 2 2 H 0 : σ 1 2 ≤ σ 2 2 H 1 : σ 1 2 > σ 2 2
7
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-7 Hypothesis Tests for Variances Tests for Two Population Variances F test statistic The F test statistic is: = Variance of Sample 1 n 1 - 1 = numerator degrees of freedom n 2 - 1 = denominator degrees of freedom = Variance of Sample 2 (continued)
8
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-8 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 2125 Mean3.272.53 Std dev1.301.16 Is there a difference in the variances between the NYSE & NASDAQ at the = 0.05 level?
9
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-9 F Test: Example Solution The test statistic is: H 0 : σ 1 2 = σ 2 2 H 1 : σ 1 2 ≠ σ 2 2 The p-value is not < alpha, so we do not reject H 0 (continued) Conclusion: There is not sufficient evidence of a difference in the variances of dividend yield for the two exchanges p-value=.588846 =.05
10
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-10 F test in PhStat PHStat | Two-Sample Tests | F Test for Differences in Two Variances … For some problems an incorrect decision is reached. Ignore the decision and compare the p-value with alpha.
11
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-11 Hypothesis Tests for Two Population Means Lower tail test: H 0 : μ 1 μ 2 H 1 : μ 1 < μ 2 i.e., H 0 : μ 1 – μ 2 0 H 1 : μ 1 – μ 2 < 0 Upper tail test: H 0 : μ 1 ≤ μ 2 H 1 : μ 1 > μ 2 i.e., H 0 : μ 1 – μ 2 ≤ 0 H 1 : μ 1 – μ 2 > 0 Two-tailed test: H 0 : μ 1 = μ 2 H 1 : μ 1 ≠ μ 2 i.e., H 0 : μ 1 – μ 2 = 0 H 1 : μ 1 – μ 2 ≠ 0 Two Population Means, Independent Samples
12
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-12 Difference Between Two Means Population means, independent samples σ 1 and σ 2 unknown but equal σ 1 and σ 2 unknown but unequal Assumptions Samples randomly and Independently Drawn Populations are normally distributed or large sample sizes are used Use s to estimate unknown σ Use pooled variance t test where 1 = 2 or individual variance t test where 1 2 (proven by F test)
13
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-13 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 (continued) σ 1 and σ 2 unknown but equal
14
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-14 Population means, independent samples σ 1 and σ 2 Unknown but Equal Where t has (n 1 + n 2 – 2) d.f., and The test statistic for μ 1 – μ 2 is: σ 1 and σ 2 unknown but equal (continued)
15
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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)?
16
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-16 Solution H 0 : μ 1 = μ 2 H 1 : μ 1 ≠ μ 2 = 0.05 df = 21 + 25 - 2 = 44 Pooled Test Statistic: p-value: Decision: Conclusion: Reject H 0 at = 0.05 There is evidence of a difference in mean dividend yield for the two exchanges. t 0.025 Reject H 0.025.047407 F = 1.256 p =.5888 Do Not Reject σ 1 2 = σ 2 2
17
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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 …
18
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-18 Population means, independent samples σ 1 and σ 2 known The confidence interval for μ 1 – μ 2 is: Where σ 1 and σ 2 unknown but equal Confidence Interval, σ 1 and σ 2 Unknown but Equal To get t use function TINV(1-Confidence, df) df=n 1 +n 2 -2
19
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-19 The Unequal-Variance t Test Population means, independent samples σ 1 and σ 2 unknown and unequal
20
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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)?
21
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-21 Unequal Variance Solution H 0 : 1 = 2 H 1 : 1 2 = 0.05 df = 92 Test Statistics: Decision: Conclusion: Fail to Reject at = 0.05 There is not sufficient evidence of a difference in mean dividend yields for the two exchanges t 0.025 Reject H 0 0.025.1901 p =.1901 t = 1.34 F = 3.9313 p =.001794 Reject H O :
22
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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
23
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-23 Population means, independent samples σ 1 and σ 2 known The confidence interval for μ 1 – μ 2 is: σ 1 and σ 2 unknown and unequal Confidence Interval, σ 1 and σ 2 Unknown and Unequal To get t use function TINV(1-Confidence, df) df=n 1 +n 2 -2
24
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-24 Related Samples Tests Means of 2 Related Populations Paired or matched samples Repeated measures (before/after) Use difference between paired values: Eliminates Variation Among Subjects Assumptions: Both Populations Are Normally Distributed Or, if Not Normal, use large samples Related samples D = X 1 - X 2
25
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-25 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.: Paired samples Mean Difference, σ D Unknown (continued)
26
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-26 Assume you send your salespeople to a “customer service” training workshop to reduce complaints. Is the training effective? You collect the following data: Paired Samples Example Number of Complaints: (2) - (1) Salesperson Before (1) After (2) Difference, D i C.B. 6 4 - 2 T.F. 20 6 -14 M.H. 3 2 - 1 R.K. 0 0 0 M.O. 4 0 - 4 -21 D = DiDi n = -4.2
27
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-27 Has the training made a difference in the number of complaints (at the 0.05 level)? - 4.2D = H 0 : μ D = 0 H 1 : μ D 0 Test Statistic: d.f. = n - 1 = 4 Reject /2 Decision: Do not reject H 0 (p-value is not <.05) Conclusion: There is not sufficient evidence of a change in the number of complaints. Paired Samples: Solution Reject /2 -1.66 =.01 p-value=.1730
28
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-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
29
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-29 The confidence interval for D Confidence Interval, Paired Samples To get t use function TINV(1-Confidence, df) df=n-1 Or use PhStat | Confidence Intervals | Estimate for the Mean, sigma unknown - Select the differences as the data Paired samples
30
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-30 Two Population Proportions Goal: test a hypothesis or form a confidence interval for the difference between two population proportions, p 1 – p 2 The point estimate for the difference is Population proportions Assumptions: Independent and randomly drawn samples n 1 p 1 5, n 1 (1-p 1 ) 5 n 2 p 2 5, n 2 (1-p 2 ) 5
31
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-31 Hypothesis Tests for Two Population Proportions Population proportions Lower tail test: H 0 : p 1 p 2 H A : p 1 < p 2 i.e., H 0 : p 1 – p 2 0 H A : p 1 – p 2 < 0 Upper tail test: H 0 : p 1 ≤ p 2 H A : p 1 > p 2 i.e., H 0 : p 1 – p 2 ≤ 0 H A : p 1 – p 2 > 0 Two-tailed test: H 0 : p 1 = p 2 H A : p 1 ≠ p 2 i.e., H 0 : p 1 – p 2 = 0 H A : p 1 – p 2 ≠ 0
32
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-32 Two Population Proportions Population proportions The pooled estimate for the overall proportion is: where X 1 and X 2 are the numbers from samples 1 and 2 with the characteristic of interest Since we begin by assuming the null hypothesis is true, we assume p 1 = p 2 and pool the two p s estimates
33
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-33 Two Population Proportions Population proportions The test statistic for p 1 – p 2 is a Z statistic: (continued) where
34
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-34 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
35
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-35 Check the Assumptions The sample proportions are: Men: p s1 = 36/72 =.50 Women: p s2 = 31/50 =.62 Assumptions Men np=72(.5)=36 n(1-p)=72(.5)=36 Women np=50(.62)=31 n(1-p)=19 All values > 5
36
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-36 The hypothesis test is: H 0 : p 1 = p 2 (the two proportions are equal) H 1 : p 1 p 2 (there is a significant difference between proportions) The sample proportions are: Men: p s1 = 36/72 =.50 Women: p s2 = 31/50 =.62 The pooled estimate for the overall proportion is: Example: Two population Proportions (continued)
37
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-37 The test statistic for p 1 = p 2 is: Example: Two population Proportions (continued).025 -1.961.96.025 Decision: Do not reject H 0 Conclusion: There is not significant evidence of a difference in the proportions of men and women who will vote yes on Proposition A. Reject H 0 p-value =.1902
38
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-38 Confidence Interval for Two Population Proportions Population proportions The confidence interval for p 1 – p 2 is: To get Z use function NORMSINV(two tail) where two tail=Confidence+(1-Confidence)/2
39
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-39 Two Sample Tests in PHStat
40
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-40 Sample PHStat Output Input Output
41
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-41 Sample PHStat Output Input Output (continued)
42
Statistics for Managers Using Microsoft Excel, 4e © 2004 Prentice-Hall, Inc. Chap 9-42 Chapter Summary Compared two independent samples Performed F tests for the difference between two population variances Performed t tests for the differences in two means for equal and unequal population variances Formed confidence intervals for the differences between two means Compared two related samples (paired samples) Performed paired sample t tests for the mean difference Formed confidence intervals for the paired difference Compared two population proportions Performed Z-test for two population proportions Formed confidence intervals for the difference between two population proportions
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.