Presentation is loading. Please wait.

Presentation is loading. Please wait.

Week 9 October 27-31 Four Mini-Lectures QMM 510 Fall 2014.

Similar presentations


Presentation on theme: "Week 9 October 27-31 Four Mini-Lectures QMM 510 Fall 2014."— Presentation transcript:

1 Week 9 October 27-31 Four Mini-Lectures QMM 510 Fall 2014

2 10-2 Two-Sample Hypothesis Tests Chapter Contents 10.1 Two-Sample Tests 10.2 Comparing Two Means: Independent Samples 10.3 Confidence Interval for the Difference of Two Means,  1   2 10.4 Comparing Two Means: Paired Samples 10.5 Comparing Two Proportions 10.6 Confidence Interval for the Difference of Two Proportions,  1   2 10.7 Comparing Two Variances Chapter 10 So many topics, so little time …

3 10-3 A two-sample test compares two sample estimates with each other. A one-sample test compares a sample estimate to a nonsample benchmark. What Is a Two-Sample Test What Is a Two-Sample Test Basis of Two-Sample Tests Basis of Two-Sample Tests Two-sample tests are especially useful because they possess a built-in point of comparison. The logic of two-sample tests is based on the fact that two samples drawn from the same population may yield different estimates of a parameter due to chance.The logic of two-sample tests is based on the fact that two samples drawn from the same population may yield different estimates of a parameter due to chance. Chapter 10 Two-Sample Tests

4 10-4 If the two sample statistics differ by more than the amount attributable to chance, then we conclude that the samples came from populations with different parameter values. What Is a Two-Sample Test What Is a Two-Sample Test Chapter 10 Two-Sample Tests

5 10-5 The hypotheses for comparing two independent population means µ 1 and µ 2 are: Format of Hypotheses Format of Hypotheses Chapter 10 Comparing Two Means: ML 9.1 Independent Samples

6 10-6 When the population variances  1 2 and  2 2 are known, use the normal distribution for the test (assuming a normal population). The test statistic is: Case 1: Known Variances Case 1: Known Variances Chapter 10 Comparing Two Means: Independent Samples

7 10-7 If the variances are unknown, they must be estimated and the Student’s t distribution used to test the means. Assuming the population variances are equal, s 1 2 and s 2 2 can be used to estimate a common pooled variance s p 2. Case 2: Unknown Variances, Assumed Equal Case 2: Unknown Variances, Assumed Equal Chapter 10 Comparing Two Means: Independent Samples

8 10-8 If the population variances cannot be assumed equal, the distribution of the random variable is uncertain (Behrens-Fisher problem)..If the population variances cannot be assumed equal, the distribution of the random variable is uncertain (Behrens-Fisher problem).. The Welch-Satterthwaite test addresses this difficulty by estimating each variance separately and then adjusting the degrees of freedom.The Welch-Satterthwaite test addresses this difficulty by estimating each variance separately and then adjusting the degrees of freedom. A quick rule for degrees of freedom is to use min(n 1 – 1, n 2 – 1). You will get smaller d.f. but avoid the tedious formula above. Chapter 10 Comparing Two Means: Independent Samples Case 3: Unknown Variances, Assumed Unqual Case 3: Unknown Variances, Assumed Unqual

9 10-9 knownIf the population variances  1 2 and  2 2 are known, then use the normal distribution. Of course, we rarely know  1 2 and  2 2. unknownIf population variances are unknown and estimated using s 1 2 and s 2 2, then use the Student’s t distribution (Case 2 or Case 3) If you are testing for zero difference of means (H 0 : µ 1 − µ 2 = 0) the formulas are simplified to: Test Statistic Chapter 10 Comparing Two Means: Independent Samples

10 10-10 If the sample sizes are equal, the Case 2 and Case 3 test statistics will be identical, although the degrees of freedom may differ and therefore the p-values may differ. If the variances are similar, the two tests will usually agree. If no information about the population variances is available, then the best choice is Case 3. The fewer assumptions, the better. Which Assumption Is Best? Which Assumption Is Best? Chapter 10 Must Sample Sizes Be Equal? Must Sample Sizes Be Equal? Unequal sample sizes are common and the formulas still apply.Unequal sample sizes are common and the formulas still apply. Comparing Two Means: Independent Samples

11 10-11 Large Samples Large Samples If both samples are large (n 1  30 and n 2  30) and the population is not badly skewed, it is reasonable to assume normality for the difference in sample means and use Appendix C.If both samples are large (n 1  30 and n 2  30) and the population is not badly skewed, it is reasonable to assume normality for the difference in sample means and use Appendix C. Chapter 10 Assuming normality makes the test easier. However, it is not conservative to replace t with z. Assuming normality makes the test easier. However, it is not conservative to replace t with z. Excel does the calculations, so we should use t whenever population variances are unknown (i.e., almost always). Excel does the calculations, so we should use t whenever population variances are unknown (i.e., almost always). Comparing Two Means: Independent Samples

12 10-12 Three Caveats: In small samples, the mean may not be a reliable indicator of central tendency and the t-test will lack power. In small samples, the mean may not be a reliable indicator of central tendency and the t-test will lack power. In large samples, a small difference in means could be “significant” but may lack practical importance. In large samples, a small difference in means could be “significant” but may lack practical importance. Chapter 10 Comparing Two Means: Independent Samples Are the populations severely skewed? Are there outliers? Check using histograms and/or dot plots of each sample. t tests are OK if moderately skewed, while outliers are more serious. Are the populations severely skewed? Are there outliers? Check using histograms and/or dot plots of each sample. t tests are OK if moderately skewed, while outliers are more serious.

13 10-13 Example: Order Size Example: Order Size Chapter 10 Summary statistics in 8 spreadsheet cells and use MegaStat: Assuming either Case 2 or Case 3, we would not reject H 0 at α =.05 (because the p- value exceeds.05) H 0 : μ 1 = μ 2 H 0 : μ 1 ≠ μ 2 Are the means equal? Test the hypotheses: Comparing Two Means: Independent Samples

14 10-14 Paired Data Paired Data Data occur in matched pairs when the same item is observed twice but under different circumstances.Data occur in matched pairs when the same item is observed twice but under different circumstances. For example, blood pressure is taken before and after a treatment is given.For example, blood pressure is taken before and after a treatment is given. Paired data are typically displayed in columns.Paired data are typically displayed in columns. Chapter 10 Comparing Two Means: ML 9.2 Paired Samples

15 10-15 Paired t Test Paired t Test Paired data typically come from a before/after experiment.Paired data typically come from a before/after experiment. In the paired t test, the difference between x 1 and x 2 is measured as d = x 1 – x 2In the paired t test, the difference between x 1 and x 2 is measured as d = x 1 – x 2 The mean and standard deviation for the differences d are:The mean and standard deviation for the differences d are: The test statistic becomes just a one-sample t-test.The test statistic becomes just a one-sample t-test. Chapter 10 Comparing Two Means: Paired Samples

16 10-16 Step 1: State the hypotheses. For example: H 0 : µ d = 0 H 1 : µ d ≠ 0 Step 2: Specify the decision rule. Choose  (the level of significance) and determine the critical values from Appendix D or with use of Excel. Step 3: Calculate the test statistic t.Step 3: Calculate the test statistic t. Step 4: Make the decision. Reject H 0 if the test statistic falls in the rejection region(s) as defined by the critical values.Step 4: Make the decision. Reject H 0 if the test statistic falls in the rejection region(s) as defined by the critical values. Steps in Testing Paired Data Steps in Testing Paired Data Chapter 10 Comparing Two Means: Paired Samples

17 10-17 A two-tailed test for a zero difference is equivalent to asking whether the confidence interval for the true mean difference µ d includes zero. Analogy to Confidence Interval Analogy to Confidence Interval Chapter 10 Comparing Two Means: Paired Samples

18 10-18 Example: Exam Scores Example: Exam Scores Chapter 10 Comparing Two Means: Paired Samples confidence interval includes zero =T.DIST.RT(0.9930,5) Using MegaStat:

19 10-19 To test for equality of two population proportions,  1,  2, use the following hypotheses: Testing for Zero Difference:  1   2 = 0 Testing for Zero Difference:  1   2 = 0 Chapter 10 Comparing Two Proportions ML 9.3

20 10-20 The sample proportion p 1 is a point estimate of  1 and p 2 is a point estimate of  2 : Chapter 10 Sample Proportions Sample Proportions Comparing Two Proportions Testing for Zero Difference:  1   2 = 0 Testing for Zero Difference:  1   2 = 0

21 10-21 If H 0 is true, there is no difference between  1 and  2, so the samples are pooled (or averaged) in order to estimate the common population proportion. Pooled Proportion Pooled Proportion Chapter 10 Comparing Two Proportions Testing for Zero Difference:  1   2 = 0 Testing for Zero Difference:  1   2 = 0

22 10-22 If the samples are large, p 1 – p 2 may be assumed normally distributed. The test statistic is the difference of the sample proportions divided by the standard error of the difference. The standard error is calculated by using the pooled proportion. The test statistic for the hypothesis  1   2 = 0 is: Test Statistic Test Statistic Chapter 10 Testing for Zero Difference:  1   2 = 0 Testing for Zero Difference:  1   2 = 0 Comparing Two Proportions

23 10-23 Example: Hurricanes Example: Hurricanes Chapter 10 Comparing Two Proportions … or using MegaStat: =2*NORM.S.DIST(-2.435,1)

24 10-24 We have assumed a normal distribution for the statistic p 1 – p 2. This assumption can be checked. For a test of two proportions, the criterion for normality is n   10 and n(1 −  )  10 for each sample, using each sample proportion in place of . If either sample proportion is not normal, their difference cannot safely be assumed normal. The sample size rule of thumb is equivalent to requiring that each sample contains at least 10 “successes” and at least 10 “failures.” Chapter 10 Checking for Normality Checking for Normality Testing for Zero Difference:  1   2 = 0 Testing for Zero Difference:  1   2 = 0 Comparing Two Proportions

25 10-25 Chapter 10 Testing for Nonzero Difference Testing for Nonzero Difference Comparing Two Proportions

26 10-26 We may need to test whether two population variances are equal. Format of Hypotheses Format of Hypotheses Chapter 10 Comparing Two Variances ML 9.4

27 10-27 The test statistic is the ratio of the sample variances: The F Test The F Test If the variances are equal, this ratio should be near unity: F = 1. Chapter 10 Comparing Two Variances

28 10-28 If the test statistic is far below 1 or above 1, we would reject the hypothesis of equal population variances. The numerator s 1 2 has degrees of freedom df 1 = n 1 – 1 and the denominator s 2 2 has degrees of freedom df 2 = n 2 – 1. The F distribution is skewed with mean > 1 and mode < 1. The F Test The F Test Chapter 10 Comparing Two Variances Example: 5% right-tailed area for F 11,8

29 10-29 For a two-tailed test, critical values for the F test are denoted F L (left tail) and F R (right tail). A right-tail critical value F R may be found from Appendix F using df 1 and df 2 degrees of freedom. F R = F df 1, df 2 A left-tail critical value F L may be found by reversing the numerator and denominator degrees of freedom, finding the critical value from Appendix F and taking its reciprocal: F L = 1/F df 2, df 1 F Test: Critical Values Chapter 10 Comparing Two Variances Excel function is: =F.INV.RT(α, df1, df2) Excel function is: =F.INV(α, df1, df2)

30 10-30 Step 1: State the hypotheses: H 0 :  1 2 =  2 2 H 1 :  1 2 ≠  2 2 Step 2: Specify the decision rule. Degrees of freedom are: Numerator: df 1 = n 1 – 1 Denominator: df 2 = n 2 – 1 Choose α and find the left-tail and right-tail critical values from Appendix F or from Excel. Two-Tailed F-Test: Two-Tailed F-Test: Chapter 10 Comparing Two Variances Step 3: Calculate the test statistic. Step 4: Make the decision. Reject H 0 if the test statistic falls in the rejection regions as defined by the critical values.

31 10-31 One -Tailed F-Test Step 1: State the hypotheses. For example: H 0 :  1 2   2 2 H 1 :  1 2 <  2 2 Step 2: State the decision rule. Degrees of freedom are: Numerator: df 1 = n 1 – 1 Denominator: df 2 = n 2 – 1 Choose α and find the critical value from Appendix F or Excel. Chapter 10 Comparing Two Variances Step 3: Calculate the test statistic. Step 4: Make the decision. Reject H 0 if the test statistic falls in the rejection region as defined by the critical value. Example: 5% left-tailed area for F 11,8 =F.INV(0.05,11,8)

32 10-32 EXCEL’s F Test EXCEL’s F Test Chapter 10 Comparing Two Variances Note: Note: Excel uses a left-tailed test if s 1 2 < s 2 2 So, if you want a two-tailed test, you must double Excel’s one-tailed p-value. Conversely, Excel uses a right-tailed test if s 1 2 > s 2 2

33 10-33 Assumptions of the F Test Assumptions of the F Test The F test assumes that the populations being sampled are normal. It is sensitive to nonnormality of the sampled populations.The F test assumes that the populations being sampled are normal. It is sensitive to nonnormality of the sampled populations. MINITAB reports both the F test and a robust alternative called Levene’s test along with its p-values.MINITAB reports both the F test and a robust alternative called Levene’s test along with its p-values. Chapter 10 Comparing Two Variances


Download ppt "Week 9 October 27-31 Four Mini-Lectures QMM 510 Fall 2014."

Similar presentations


Ads by Google