Presentation is loading. Please wait.

Presentation is loading. Please wait.

© 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data.

Similar presentations


Presentation on theme: "© 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data."— Presentation transcript:

1 © 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data

2 © 2002 Prentice-Hall, Inc. Chap 8-2 Chapter Topics Comparing two independent samples Independent samples Z test for the difference in two means Pooled variance t test for the difference in two means F test for the difference in two variances Comparing two related samples Paired sample z test for the mean difference Paired sample t test for the mean difference

3 © 2002 Prentice-Hall, Inc. Chap 8-3 Chapter Topics Wilcoxon rank-sum test Difference in two medians (continued)

4 © 2002 Prentice-Hall, Inc. Chap 8-4 Comparing Two Independent Samples Different data sources Unrelated Independent Sample selected from one population has no effect or bearing on the sample selected from the other population Use the difference between 2 sample means Use Z test or pooled variance t test

5 © 2002 Prentice-Hall, Inc. Chap 8-5 Independent Sample Z Test (Variances Known) Assumptions Samples are randomly and independently drawn from normal distributions Population variances are known Test statistic

6 © 2002 Prentice-Hall, Inc. Chap 8-6 Independent Sample Z Test (Large Samples) Assumptions Samples are randomly and independently drawn Population variances either known or unknown Both sample sizes are at least 30 Test statistic

7 © 2002 Prentice-Hall, Inc. Chap 8-7 Independent Sample (Two Sample) Z Test in EXCEL Independent sample Z test with variances known Tools | data analysis | z-test: two sample for means Independent sample Z test with large sample Tools | data analysis | z-test: two sample for means If the population variances are unknown, use sample variances

8 © 2002 Prentice-Hall, Inc. Chap 8-8 Pooled Variance t Test (Variances Unknown) Assumptions Both populations are normally distributed Samples are randomly and independently drawn Population variances are unknown but assumed equal If both populations are not normal, need large sample sizes

9 © 2002 Prentice-Hall, Inc. Chap 8-9 Developing the Pooled Variance t Test Setting up the hypotheses H 0 :  1   2 H 1 :  1 >  2 H 0 :  1 -  2 = 0 H 1 :  1 -  2  0 H 0 :  1 =  2 H 1 :  1   2 H 0 :  1  2 H 0 :  1 -  2  0 H 1 :  1 -  2 > 0 H 0 :  1 -  2  H 1 :  1 -  2 < 0 OR Left Tail Right Tail Two Tail  H 1 :  1 <  2

10 © 2002 Prentice-Hall, Inc. Chap 8-10 Developing the Pooled Variance t Test Calculate the pooled sample variances as an estimate of the common population variance (continued)

11 © 2002 Prentice-Hall, Inc. Chap 8-11 Developing the Pooled Variance t Test Compute the sample statistic (continued) Hypothesized difference

12 © 2002 Prentice-Hall, Inc. Chap 8-12 Pooled Variance t Test: Example You’re a financial analyst for Charles Schwab. 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 Assuming equal variances, is there a difference in average yield (  = 0.05)? © 1984-1994 T/Maker Co.

13 © 2002 Prentice-Hall, Inc. Chap 8-13 Calculating the Test Statistic

14 © 2002 Prentice-Hall, Inc. Chap 8-14 Solution 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 Value(s): Test Statistic: Decision: Conclusion: Reject at  = 0.05 There is evidence of a difference in means. t 02.0154-2.0154.025 Reject H 0 0.025 2.03

15 © 2002 Prentice-Hall, Inc. Chap 8-15 p -Value Solution p Value 2 (p Value is between.02 and.05)  (  = 0.05). Reject. 0 2.0 3 Z Reject  2.0154 is between.01 and.025 Test Statistic 2.03 is in the Reject Region Reject -2.0154 =.025

16 © 2002 Prentice-Hall, Inc. Chap 8-16 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...

17 © 2002 Prentice-Hall, Inc. Chap 8-17 Solution in EXCEL Excel workbook that performs the pooled variance t test

18 © 2002 Prentice-Hall, Inc. Chap 8-18 F Test for Difference in Two Population Variances Test for the difference in two independent populations Parametric test procedure Assumptions Both populations are normally distributed Test is not robust to this violation Samples are randomly and independently drawn

19 © 2002 Prentice-Hall, Inc. Chap 8-19 The F Test Statistic = Variance of Sample 1 n 1 - 1 = degrees of freedom n 2 - 1 = degrees of freedom F0 = Variance of Sample 2

20 © 2002 Prentice-Hall, Inc. Chap 8-20 Hypotheses H 0 :  1 2 =  2 2 H 1 :  1 2  2 2 Test Statistic F = S 1 2 /S 2 2 Two Sets of Degrees of Freedom df 1 = n 1 - 1; df 2 = n 2 - 1 Critical Values: F L( ) and F U( ) F L = 1/F U * (*degrees of freedom switched) Developing the F Test Reject H 0  /2 Do Not Reject F 0 FLFL FUFU n 1 -1, n 2 -1

21 © 2002 Prentice-Hall, Inc. Chap 8-21 F Test: An Example You are a financial analyst for Charles Schwab. 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? © 1984-1994 T/Maker Co.

22 © 2002 Prentice-Hall, Inc. Chap 8-22 F Test: Example Solution Finding the critical values for  =.05

23 © 2002 Prentice-Hall, Inc. Chap 8-23 F Test: Example Solution H 0 :  1 2 =  2 2 H 1 :  1 2   2 2  .05 Df 1  20 df 2  24 Critical value(s): Test Statistic: Decision: Conclusion: Do not reject at  = 0.05 There is no evidence of a difference in variances. 0 F 2.330.415.025 Reject.025 1.25

24 © 2002 Prentice-Hall, Inc. Chap 8-24 F Test in PHStat PHStat | two-sample tests | F test for differences in two variances Example in excel spreadsheet

25 © 2002 Prentice-Hall, Inc. Chap 8-25 F Test: One-Tail H 0 :  1 2   2 2 H 1 :  1 2  2 2 H 0 :  1 2   2 2 H 1 :  1 2 >  2 2 Reject .05 F 0 F 0 Reject .05  =.05 or Degrees of freedom switched

26 © 2002 Prentice-Hall, Inc. Chap 8-26 Comparing Two Related Samples Test the means of two related samples Paired or matched Repeated measures (before and after) Use difference between pairs Eliminates variation between subjects

27 © 2002 Prentice-Hall, Inc. Chap 8-27 Z Test for Mean Difference (Variance Known) Assumptions Both populations are normally distributed Observations are paired or matched Variance known Test statistic

28 © 2002 Prentice-Hall, Inc. Chap 8-28 t Test for Mean Difference (Variance Unknown) Assumptions Both populations are normally distributed Observations are matched or paired Variance unknown If population not normal, need large samples Test statistic

29 © 2002 Prentice-Hall, Inc. Chap 8-29 User Current Leader (1) New Software (2) Difference D i C.B.9.98 Seconds 9.88 Seconds.10 T.F.9.88 9.86.02 M.H.9.84 9.75.09 R.K.9.99 9.80.19 M.O.9.94 9.87.07 D.S.9.84 9.84.00 S.S.9.86 9.87 -.01 C.T.10.12 9.86.26 K.T.9.90 9.83.07 S.Z.9.91 9.86.05 Paired Sample t Test: Example You work in the finance department. Is the new financial package faster (  =0.05 level)? You collect the following data entry times:

30 © 2002 Prentice-Hall, Inc. Chap 8-30 Paired Sample t Test: Example Solution Is the new financial package faster (0.05 level)?.084D = H 0 :  D   H 1 :  D     Test Statistic Critical Value=1.8331 df = n - 1 = 9 Reject  1.8331 Decision: Reject H 0 t Stat. in the rejection zone. Conclusion: The new software package is faster. 3.15

31 © 2002 Prentice-Hall, Inc. Chap 8-31 Paired Sample t Test in EXCEL Tools | data analysis… | t-test: paired two sample for means Example in excel spreadsheet

32 © 2002 Prentice-Hall, Inc. Chap 8-32 Wilcoxon Rank-Sum Test for Differences in 2 Medians Test two independent population medians Populations need not be normally distributed Distribution free procedure Used when only rank data is available Can use normal approximation if n j >10

33 © 2002 Prentice-Hall, Inc. Chap 8-33 Wilcoxon Rank-Sum Test: Procedure Assign ranks, R i, to the n 1 + n 2 sample observations If unequal sample sizes, let n 1 refer to smaller- sized sample Smallest value R i = 1 Assign average rank for ties Sum the ranks, T j, for each sample Obtain test statistic, T 1 (smallest sample)

34 © 2002 Prentice-Hall, Inc. Chap 8-34 Wilcoxon Rank-Sum Test: Setting of Hypothesis H 0 : M 1 = M 2 H 1 : M 1  M 2 H 0 : M 1  M 2 H 1 : M 1  M 2 H 0 : M 1  M 2 H 1 : M 1  M 2 Two -Tail TestLeft-Tail TestRight -Tail Test M 1 = median of population 1 M 2 = median of population 2 Reject T 1L T 1U Reject Do Not Reject T 1L Do Not Reject T 1U Reject Do Not Reject

35 © 2002 Prentice-Hall, Inc. Chap 8-35 You’re a production planner. You want to see if the median operating rates for the two factories are the same. For factory number one, the rates (% of capacity) are 71, 82, 77, 92, 88. For factory number two, the rates are 85, 82, 94 & 97. Do the factories have the same median rates at the 0.10 significance level? You’re a production planner. You want to see if the median operating rates for the two factories are the same. For factory number one, the rates (% of capacity) are 71, 82, 77, 92, 88. For factory number two, the rates are 85, 82, 94 & 97. Do the factories have the same median rates at the 0.10 significance level? Wilcoxon Rank-Sum Test: Example

36 © 2002 Prentice-Hall, Inc. Chap 8-36 Wilcoxon Rank-Sum Test: Computation Table Factory 1Factory 2 RateRankRateRank 711855 82 3 3.5 82 4 3.5 772948 927979 886... Rank Sum T 2 =19.5 T 1 =25.5 Tie

37 © 2002 Prentice-Hall, Inc. Chap 8-37 Lower and Upper Critical Values T 1 of Wilcoxon Rank-Sum Test n2n2  n1n1 One- Tailed Two- Tailed 45 4 5.05.1012, 2819, 36.025.0511, 2917, 38.01.0210, 3016, 39.005.01--, --15, 40 6

38 © 2002 Prentice-Hall, Inc. Chap 8-38 Wilcoxon Rank-Sum Test: Solution H 0 : M 1 = M 2 H 1 : M 1  M 2  =.10 n 1 = 4 n 2 = 5 Critical Value(s): Test Statistic: Decision: Conclusion: Do not reject at  = 0.10 There is no evidence medians are not equal. Reject Do Not Reject 1228 T 1 = 5 + 3.5 + 8+ 9 = 25.5 (Smallest Sample)

39 © 2002 Prentice-Hall, Inc. Chap 8-39 Wilcoxon Rank-Sum Test (Large Sample) For large sample, the test statistic T 1 is approximately normal with mean and standard deviation Z test statistic

40 © 2002 Prentice-Hall, Inc. Chap 8-40 Chapter Summary Compared two independent samples Performed Z test for the differences in two means Performed t test for the differences in two means Addressed F test for difference in two variances Compared two related samples Performed paired sample Z tests for the mean difference Performed paired sample t tests for the mean difference

41 © 2002 Prentice-Hall, Inc. Chap 8-41 Chapter Summary Addressed Wilcoxon rank-sum test Performed tests on differences in two medians for small samples Performed tests on differences in two medians for large samples (continued)


Download ppt "© 2002 Prentice-Hall, Inc.Chap 8-1 Statistics for Managers using Microsoft Excel 3 rd Edition Chapter 8 Two Sample Tests with Numerical Data."

Similar presentations


Ads by Google