Download presentation
Presentation is loading. Please wait.
1
Chapter 10 Two Sample Tests
Yandell – Econ 216
2
Chapter Goals After completing this chapter, you should be able to:
Test hypotheses or form interval estimates for two independent population means Standard deviations known Standard deviations unknown two means from paired samples Use the F table to find critical F values Yandell – Econ 216
3
Two-Sample Tests 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 Proportion 1 vs. Proportion 2 Variance 1 vs. Variance 2 Yandell – Econ 216
4
Difference Between Two Means
Population means, independent samples Goal: Form a confidence interval for the difference between two population means, μ1 – μ2 * σ1 and σ2 known The point estimate for the difference is σ1 and σ2 unknown, assumed equal X1 – X2 σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
5
Population means, independent samples
Different data sources Unrelated Independent Sample selected from one population has no effect on the sample selected from the other population Use the difference between 2 sample means Use Z test, pooled variance t test, or separate-variance t test Population means, independent samples * σ1 and σ2 known σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
6
Hypothesis tests for μ1 – μ2
Population means, independent samples Use a Z test statistic σ1 and σ2 known Use S1 and S2 to estimate a pooled estimate for σ , use a t test statistic σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Use S1 and S2 with a separate-variance t test Yandell – Econ 216
7
Population means, independent samples
σ1 and σ2 known Population means, independent samples Assumptions: Samples are randomly and independently drawn population distributions are normal or both sample sizes are 30 Population standard deviations are known * σ1 and σ2 known σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
8
σ1 and σ2 known (continued) When σ1 and σ2 are known and both populations are normal or both sample sizes are at least 30, the test statistic is a Z-value… Population means, independent samples * σ1 and σ2 known …and the standard error of x1 – x2 is σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
9
Population means, independent samples
σ1 and σ2 known Population means, independent samples The test statistic for μ1 – μ2 is: * σ1 and σ2 known σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
10
σ1 and σ2 unknown, large samples
Assumptions: Samples are randomly and independently drawn both sample sizes are 30, or the populations are both normally distributed if not Population standard deviations are unknown Population means, independent samples σ1 and σ2 known * σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
11
σ1 and σ2 unknown, large samples
(continued) Population means, independent samples Process: The population variances are assumed equal, so use the two sample standard deviations S1 and S2 and pool them to estimate σ the test statistic is a t value with (n1 + n2 – 2) degrees of freedom σ1 and σ2 known * σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
12
σ1 and σ2 unknown, large samples
(continued) Population means, independent samples The pooled standard deviation is σ1 and σ2 known * σ1 and σ2 unknown, assumed equal σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
13
σ1 and σ2 unknown, large samples
(continued) The test statistic for μ1 – μ2 is: Population means, independent samples σ1 and σ2 known * σ1 and σ2 unknown, assumed equal Where t/2 has (n1 + n2 – 2) d.f., and σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
14
σ1 and σ2 unknown, small samples
Population means, independent samples Assumptions: populations are normally distributed the populations do not have equal variances samples are independent σ1 and σ2 known σ1 and σ2 unknown, assumed equal * σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
15
σ1 and σ2 unknown, small samples
(continued) Process: The population variances are assumed unequal, so a pooled estimate is not appropriate use a separate-variance t test, degrees of freedom must be calculated: Population means, independent samples σ1 and σ2 known σ1 and σ2 unknown, assumed equal * σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
16
σ1 and σ2 unknown, small samples
The test statistic for H0: μ1 – μ2 = 0 is: (with d.f. calculated using the formula on the previous slide) Population means, independent samples σ1 and σ2 known σ1 and σ2 unknown, assumed equal * σ1 and σ2 unknown, assumed unequal Yandell – Econ 216
17
Hypothesis Tests for Two Population Means
Two Population Means, Independent Samples Lower tail test: H0: μ1 μ2 H1: μ1 < μ2 i.e., H0: μ1 – μ2 0 H1: μ1 – μ2 < 0 Upper tail test: H0: μ1 ≤ μ2 H1: μ1 > μ2 i.e., H0: μ1 – μ2 ≤ 0 H1: μ1 – μ2 > 0 Two-tailed test: H0: μ1 = μ2 H1: μ1 ≠ μ2 i.e., H0: μ1 – μ2 = 0 H1: μ1 – μ2 ≠ 0 Yandell – Econ 216
18
Hypothesis tests for μ1 – μ2
Two Population Means, Independent Samples Lower tail test: H0: μ1 – μ2 0 H1: μ1 – μ2 < 0 Upper tail test: H0: μ1 – μ2 ≤ 0 H1: μ1 – μ2 > 0 Two-tailed test: H0: μ1 – μ2 = 0 H1: μ1 – μ2 ≠ 0 a a a/2 a/2 -ta ta -ta/2 ta/2 Reject H0 if t < -ta Reject H0 if t > ta Reject H0 if t < -ta/2 or t > ta/2 Yandell – Econ 216
19
Pooled sp t Test: Example
You’re 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 Sample mean Sample std dev Assuming equal variances, is there a difference in average yield ( = 0.05)? Yandell – Econ 216
20
Calculating the Test Statistic
The test statistic is: Yandell – Econ 216
21
Solution t Decision: Reject H0 at a = 0.05 Conclusion:
H0: μ1 - μ2 = 0 i.e. (μ1 = μ2) H1: μ1 - μ2 ≠ 0 i.e. (μ1 ≠ μ2) = 0.05 df = = 44 Critical Values: t = ± Test Statistic: .025 .025 2.0154 t 2.040 Decision: Conclusion: Reject H0 at a = 0.05 There is evidence of a difference in means. Yandell – Econ 216
22
Related (Paired) 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 = X1 - X2 Yandell – Econ 216
23
Related (Paired) Differences
The ith paired difference is Di , where Related samples Di = X1i - X2i The point estimate for the population mean paired difference is D : The sample standard deviation is n is the number of pairs in the paired sample Yandell – Econ 216
24
Hypothesis Testing for Paired Samples
The test statistic for D is Related samples n is the number of pairs in the paired sample Where t/2 has n - 1 d.f. and SD is: Yandell – Econ 216
25
Hypothesis Testing for Paired Samples
(continued) Related Samples Lower tail test: H0: μD 0 H1: μD < 0 Upper tail test: H0: μD ≤ 0 H1: μD > 0 Two-tailed test: H0: μD = 0 H1: μD ≠ 0 a a a/2 a/2 -ta ta -ta/2 ta/2 Reject H0 if t < -ta Reject H0 if t > ta Reject H0 if t < -ta/2 or t > ta/2 Where t has n - 1 d.f. Yandell – Econ 216
26
Paired Samples Example
Assume you send your salespeople to a “customer service” training workshop. 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 -21 Di D = n = -4.2 Yandell – Econ 216
27
Critical Value = ± 4.604 d.f. = n - 1 = 4
Paired Samples: Solution Has the training made a difference in the number of complaints (at the 0.01 level)? Reject Reject H0: μD = 0 H1: μD 0 /2 /2 = .01 D = - 4.2 - 1.66 Critical Value = ± d.f. = n - 1 = 4 Decision: Do not reject H0 (t stat is not in the reject region) Test Statistic: Conclusion: There is not a significant change in the number of complaints. Yandell – Econ 216
28
Two Population Proportions
Goal: test a hypothesis or form a confidence interval for the difference between two population proportions, π1 – π2 Population proportions Assumptions: n1 π1 5 , n1(1- π1) 5 n2 π2 5 , n2(1- π2) 5 The point estimate for the difference is Yandell – Econ 216
29
Two Population Proportions
In the null hypothesis we assume π1 = π2 and pool the two sample estimates Population proportions The pooled estimate for the overall proportion is: where X1 and X2 are the number of items of interest in samples 1 and 2 Yandell – Econ 216
30
Two Population Proportions
(continued) The test statistic for π1 – π2 is a Z statistic: Population proportions where Yandell – Econ 216
31
Hypothesis Tests for Two Population Proportions
Lower-tail test: H0: π1 π2 H1: π1 < π2 i.e., H0: π1 – π2 0 H1: π1 – π2 < 0 Upper-tail test: H0: π1 ≤ π2 H1: π1 > π2 i.e., H0: π1 – π2 ≤ 0 H1: π1 – π2 > 0 Two-tail test: H0: π1 = π2 H1: π1 ≠ π2 i.e., H0: π1 – π2 = 0 H1: π1 – π2 ≠ 0 Yandell – Econ 216
32
Hypothesis Tests for Two Population Proportions
(continued) Population proportions Lower-tail test: H0: π1 – π2 0 H1: π1 – π2 < 0 Upper-tail test: H0: π1 – π2 ≤ 0 H1: π1 – π2 > 0 Two-tail test: H0: π1 – π2 = 0 H1: π1 – π2 ≠ 0 a a a/2 a/2 -za za -za/2 za/2 Reject H0 if ZSTAT < -Za Reject H0 if ZSTAT > Za Reject H0 if ZSTAT < -Za/2 or ZSTAT > Za/2 Yandell – Econ 216
33
Hypothesis Test 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 35 of 50 women indicated they would vote Yes Test at the 0.05 level of significance Yandell – Econ 216
34
Hypothesis Test Example: Two population Proportions
(continued) The hypothesis test is: H0: π1 – π2 = 0 (the two proportions are equal) H1: π1 – π2 ≠ 0 (there is a significant difference between proportions) The sample proportions are: Men: p1 = 36/72 = 0.50 Women: p2 = 35/50 = 0.70 The pooled estimate for the overall proportion is: Yandell – Econ 216
35
Hypothesis Test Example: Two population Proportions
(continued) Reject H0 Reject H0 The test statistic for π1 – π2 is: .025 .025 -1.96 1.96 -2.20 Decision: Reject H0 Conclusion: There is significant evidence of a difference in proportions between men and women who will vote yes. Critical Values = ±1.96 For = 0.05 Yandell – Econ 216
36
Confidence Interval for Two Population Proportions
The confidence interval for π1 – π2 is: Yandell – Econ 216
37
Two Sample Tests in EXCEL
For independent samples: Independent sample Z test with variances known: Data | data analysis | z-test: two sample for means Independent sample Z test with large sample If the population variances are unknown, use sample variances For paired samples (t test): Data | data analysis | t-test: paired two sample for means Yandell – Econ 216
38
Two Sample Tests in PHStat
Yandell – Econ 216
39
Two Sample Tests in PHStat
Input Output Yandell – Econ 216
40
Hypothesis Tests for Variances
Tests for Two Population Variances F test statistic Yandell – Econ 216
41
F Test for Difference in Two Population Variances
* Tests for Two Population Variances H0: σ12 – σ22 = 0 H1: σ12 – σ22 ≠ 0 Two tailed test H0: σ12 – σ22 0 H1: σ12 – σ22 < 0 F test statistic Lower tail test H0: σ12 – σ22 ≤ 0 H1: σ12 – σ22 > 0 Upper tail test Yandell – Econ 216
42
F Test for Difference in Two Population Variances
Tests for Two Population Variances The F test statistic is: (Place the larger sample variance in the numerator) * F test statistic = Variance of Sample 1 n1 - 1 = numerator degrees of freedom = Variance of Sample 2 n2 - 1 = denominator degrees of freedom Yandell – Econ 216
43
The F Distribution The F critical value is found from the F table
The are two appropriate degrees of freedom: numerator and denominator In the F table, numerator degrees of freedom determine the row denominator degrees of freedom determine the column where df1 = n1 – 1 ; df2 = n2 – 1 Yandell – Econ 216
44
Finding the Critical Value
/2 F F F F/2 Do not reject H0 Reject H0 Do not reject H0 Reject H0 rejection region for a two-tailed test is rejection region for a one-tail test is (when the larger sample variance in the numerator) Yandell – Econ 216
45
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 Mean Std dev Is there a difference in the variances between the NYSE & NASDAQ at the = 0.05 level? Yandell – Econ 216
46
F Test: Example Solution
Form the hypothesis test: H0: σ21 – σ22 = 0 (there is no difference between variances) H1: σ21 – σ22 ≠ 0 (there is a difference between variances) Find the F critical value for = 0.05: Numerator: df1 = n1 – 1 = 21 – 1 = 20 Denominator: df2 = n2 – 1 = 25 – 1 = 24 F.05/2, 20, 24 = 2.327 Yandell – Econ 216
47
F Test: Example Solution
(continued) The test statistic is: H0: σ12 – σ22 = 0 H1: σ12 – σ22 ≠ 0 /2 = 0.025 F = is not greater than the critical F value of 2.327, so we do not reject H0 Do not reject H0 Reject H0 F/2 =2.327 Conclusion: There is no evidence of a difference in variances at = 0.05 Yandell – Econ 216
48
Using EXCEL and PHStat EXCEL 2013 F test for two variances: PHStat
Data | data analysis | F-test: two sample for variances PHStat PHStat | two-sample tests | F test for differences in two variances Yandell – Econ 216
49
Chapter Summary Compared two independent samples
Performed Z test for the differences in two means Performed t test for the differences in two means Compared two related samples (paired samples) Performed paired sample t tests for the mean difference Yandell – Econ 216
50
Chapter Summary (continued) Performed F tests for the difference between two population variances Used the F table to find F critical values Yandell – Econ 216
51
Chapter 10 Review Problems
The problems below are representative of the types of problems discussed in Chapter 10. The answer to each is provided in the text (6th edition). Use these problems to gauge your understanding of the chapter material: 10.8 (page 343) 10.14 (page 344) 10.30 (page 359) Yandell – Econ 216
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.