Chapter 10 10-1
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 10 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 • The means of two related populations • The proportions of two independent Chapter 10 populations Two-Sample Tests • The variances of two independent populations by testing the ratio of the two variances Prof. Shuguang Liu Chap 10-1 Prof. Shuguang Liu Chap 10-2 Two-Sample Tests Difference Between Two Means DCOVA DCOVA Two-Sample Tests Population means, Goal: Test hypothesis or form independent * a confidence interval for the samples difference between two Population Population population means, µ – µ Means, Means, Population Population 1 2 Proportions Variances Independent Related σ1 and σ2 unknown, Samples Samples assumed equal The point estimate for the difference is Examples: Group 1 vs. Same group Proportion 1 vs. Variance 1 vs. Group 2 before vs. after Proportion 2 Variance 2 X1 – X2 treatment σ1 and σ2 unknown, not assumed equal Prof. Shuguang Liu Chap 10-3 Prof. Shuguang Liu Chap 10-4 Difference Between Two Means: Hypothesis Tests for Independent Samples Two Population Means DCOVA DCOVA § Different data sources Two Population Means, Independent Samples Population• Unrelated means, independent• Independent * Lower-tail test: Upper-tail test: Two-tail test: samplesu Sample selected from one population has no effect on the sample selected from the other population H0: µ1 ≥ µ2 H0: µ1 ≤ µ2 H0: µ1 = µ2 H1: µ1 < µ2 H1: µ1 > µ2 H1: µ1 ≠ µ2 Use S to estimate unknown i.e., i.e., i.e., p σ and σ unknown, 1 2 σ. Use a Pooled-Variance t H : µ – µ ≤ 0 H : µ – µ = 0 assumed equal H0: µ1 – µ2 ≥ 0 0 1 2 0 1 2 test. H : µ – µ > 0 H : µ – µ ≠ 0 H1: µ1 – µ2 < 0 1 1 2 1 1 2 Use S and S to estimate σ1 and σ2 unknown, 1 2 not assumed equal unknown σ1 and σ2. Use a Separate-Variance t test. Prof. Shuguang Liu Chap 10-5 Prof. Shuguang Liu Chap 10-6 Chapter 10 10-2 Hypothesis tests for µ1 - µ2 with σ1 and Hypothesis tests for µ1 – µ2 σ2 unknown and assumed equal DCOVA DCOVA Two Population Means, Independent Samples Population means, Assumptions: Lower-tail test: Upper-tail test: Two-tail test: independent § Samples are randomly and H : µ – µ 0 H : µ – µ ≤ 0 H : µ – µ = 0 samples 0 1 2 ≥ 0 1 2 0 1 2 independently drawn H1: µ1 – µ2 < 0 H1: µ1 – µ2 > 0 H1: µ1 – µ2 ≠ 0 § Populations are normally σ and σ unknown, α α α/2 α/2 1 2 * distributed or both sample assumed equal sizes are at least 30 -tα tα -tα/2 tα/2 § Population variances are unknown but assumed equal Reject H0 if tSTAT < -tα Reject H0 if tSTAT > tα Reject H0 if tSTAT < -tα/2 σ1 and σ2 unknown, or tSTAT > t /2 α not assumed equal Prof. Shuguang Liu Chap 10-7 Prof. Shuguang Liu Chap 10-8 Hypothesis tests for µ - µ with σ and 1 2 1 Confidence interval for µ1 - µ2 with σ1 σ2 unknown and assumed equal and σ2 unknown and assumed equal (continued) DCOVA DCOVA • The pooled variance is: Population means, 2 2 Population means, 2 (n1 − 1)S1 + (n2 − 1)S2 independent S = independent samples p (n 1) (n 1) samples 1 − + 2 − The confidence interval for • The test statistic is: µ1 – µ2 is: σ and σ unknown, 1 2 * σ1 and σ2 unknown, assumed equal * (X1 − X2 )− (µ1 − µ2 ) assumed equal tSTAT = 2 ⎛ 1 1 ⎞ X1 X2 t S ⎜ ⎟ ( − ) ± α/2 p ⎜ + ⎟ 2 ⎛ 1 1 ⎞ n n S ⎝ 1 2 ⎠ p ⎜ + ⎟ ⎝ n1 n2 ⎠ σ and σ unknown, σ and σ unknown, 1 2 1 2 Where tα/2 has d.f. = n1 + n2 – 2 not assumed equal • Where tSTAT has d.f. = (n1 + n2 – 2) not assumed equal Prof. Shuguang Liu Chap 10-9 Prof. Shuguang Liu Chap 10-10 Pooled-Variance t Test Example: Pooled-Variance t Test Example Calculating the Test Statistic You are a financial analyst for a brokerage firm. Is thereDCOV a A (continued) difference in dividend yield between stocks listed on the H0: µ1 - µ2 = 0 i.e. (µ1 = µ2) DCOVA NYSE & NASDAQ? You collect the following data: H1: µ1 - µ2 ≠ 0 i.e. (µ1 ≠ µ2) NYSE NASDAQ Number 21 25 The test statistic is: Sample mean 3.27 2.53 Sample std dev 1.30 1.16 (X1 − X2 )− (µ1 − µ2 ) (3.27 − 2.53)− 0 tSTAT = = = 2.040 ⎛ 1 1 ⎞ ⎛ 1 1 ⎞ S2 ⎜ + ⎟ 1.5021⎜ + ⎟ p ⎜ ⎟ 21 25 Assuming both populations are ⎝ n1 n2 ⎠ ⎝ ⎠ approximately normal with equal variances, is 2 2 2 2 2 (n1 −1)S1 + (n2 −1)S2 (21 −1)1.30 + (25 −1)1.16 there a difference in mean S = = = 1.5021 P (n −1) + (n −1) (21-1) + (25 −1) yield (α = 0.05)? 1 2 Prof. Shuguang Liu Chap 10-11 Prof. Shuguang Liu Chap 10-12 Chapter 10 10-3 Pooled-Variance t Test Example: Excel Pooled-Variance t test Comparing NYSE & Hypothesis Test Solution NASDAQ DCOVA H0: µ1 - µ2 = 0 i.e. (µ1 = µ2) DCOVA Reject H0 Reject H0 Pooled-Variance t Test for the Difference Between Two Means H1: µ1 - µ2 ≠ 0 i.e. (µ1 ≠ µ2) (assumes equal populaon variances) Data Hypothesized Difference 0 α = 0.05 Level of Significance 0.05 Decision: .025 .025 Populaon 1 Sample df = 21 + 25 - 2 = 44 Sample Size 21 =COUNT(DATA!$A:$A) Sample Mean 3.27 =AVERAGE(DATA!$A:$A) Reject H0 at α = 0.05 Critical Values: t = ± 2.0154 Sample Standard Deviaon 1.3 =STDEV(DATA!$A:$A) -2.0154 0 2.0154 Populaon 2 Sample t Sample Size 25 =COUNT(DATA!$B:$B) Conclusion: Sample Mean 2.53 =AVERAGE(DATA!$B:$B) Sample Standard Deviaon 1.16 =STDEV(DATA!$B:$B) Test Statistic: 2.040 There is evidence of a Intermediate Calculaons Populaon 1 Sample Degrees of Freedom 20 =B7 - 1 difference in means. Populaon 2 Sample Degrees of Freedom 24 =B11 - 1 Decision: Total Degrees of Freedom 44 =B16 + B17 3.27 − 2.53 Pooled Variance 1.502 =((B16 * B9^2) + (B17 * B13^2)) / B18 Reject H at α = 0.05 Standard Error 0.363 =SQRT(B19 * (1/B7 + 1/B11)) tSTAT = = 2.040 0 Difference in Sample Means 0.74 =B8 - B12 ⎛ 1 1 ⎞ t Test Stas=c 2.040 =(B21 - B4) / B20 1.5021 ⎜ + ⎟ Conclusion: Two-Tail Test 21 25 Lower Cri=cal Value -2.015 =-TINV(B5, B18) ⎝ ⎠ There is evidence of a Upper Cri=cal Value 2.015 =TINV(B5, B18) p-value 0.047 =TDIST(ABS(B22),B18,2) Reject the null hypothesis =IF(B27<B5,"Reject the null hypothesis", difference in means. "Do not reject the null hypothesis") Prof. Shuguang Liu Chap 10-13 Prof. Shuguang Liu Chap 10-14 Minitab Pooled-Variance t test Comparing NYSE & Pooled-Variance t Test Example: NASDAQ Confidence Interval for µ1 - µ2 DCOVA DCOVA Two-Sample T-Test and CI Since we rejected H0 can we be 95% confident that µNYSE Sample N Mean StDev SE Mean 1 21 3.27 1.30 0.28 > µNASDAQ? 2 25 2.53 1.16 0.23 Difference = mu (1) - mu (2) 95% Confidence Interval for µNYSE - µNASDAQ Estimate for difference: 0.740 95% CI for difference: (0.009, 1.471) T-Test of difference = 0 (vs not =): T-Value = 2.04 P-Value = 0.047 DF = 44 2 ⎛ 1 1 ⎞ Both use Pooled StDev = 1.2256 X1 − X2 ± t /2 Sp ⎜ + ⎟ = 0.74 ± 2.0154× 0.3628 = (0.009, 1.471) ( ) α ⎜ ⎟ ⎝ n1 n 2 ⎠ Decision: Reject H0 at α = 0.05 Since 0 is less than the entire interval, we can be 95% Conclusion: confident that µ > µ There is evidence of a NYSE NASDAQ difference in means. Prof. Shuguang Liu Chap 10-15 Prof. Shuguang Liu Chap 10-16 Hypothesis tests for µ1 - µ2 with σ1 and Hypothesis tests for µ1 - µ2 with σ1 and σ2 unknown, not assumed equal σ2 unknown and not assumed equal (continued) DCOVA DCOVA The test statistic is: Population means, Assumptions: Population means, independent independent X1 X2 µ µ § Samples are randomly and ( − )− ( 1 − 2 ) samples samples tSTAT = independently drawn S2 S2 2 1 2 ⎛ S 2 S 2 ⎞ ⎜ 1 + 2 ⎟ + ⎜ n n ⎟ ⎝ 1 2 ⎠ n1 n2 ν = 2 2 § Populations are normally ⎛ S 2 ⎞ ⎛ S 2 ⎞ σ1 and σ2 unknown, ⎜ 1 ⎟ ⎜ 2 ⎟ σ1 and σ2 unknown, ⎜ ⎟ ⎜ ⎟ n1 n2 distributed or both sample assumed equal ⎝ ⎠ + ⎝ ⎠ assumed equal t n1 − 1 hasn2 − 1 d.f. ν = sizes are at least 30 STAT § Population variances are unknown and cannot be σ and σ unknown, σ and σ unknown, 1 2 assumed to be equal 1 2 not assumed equal * not assumed equal * Prof. Shuguang Liu Chap 10-17 Prof. Shuguang Liu Chap 10-18 Chapter 10 10-4 Related Populations Related Populations The Paired Difference Test The Paired Difference Test DCOVA DCOVA th (continued) Tests Means of 2 Related Populations The i paired difference is Di , where – Paired or matched samples Related – Repeated measures (before/after) Related Di = X1i - X2i samples – Use difference between paired values: samples n The point estimate for the D paired difference ∑ i Di = X1i - X2i D = i=1 § Eliminates Variation Among Subjects population mean µD is D : n § Assumptions: n The sample standard (D D)2 • Both Populations Are Normally Distributed ∑ i − deviation is SD S = i=1 • Or, if not Normal, use large samples D n − 1 n is the number of pairs in the paired sample Prof.