1 / 33

Week 9 October 27-31

Week 9 October 27-31. Four Mini-Lectures QMM 510 Fall 2014 . 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

lolita
Télécharger la présentation

Week 9 October 27-31

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


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

  2. 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 Two-Sample Hypothesis Tests Chapter 10 So many topics, so little time …

  3. Two-Sample Tests Chapter 10 What Is a Two-Sample Test • A two-sample test compares two sample estimates with each other. • A one-sample test compares a sample estimate to a nonsample benchmark. 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.

  4. Two-Sample Tests Chapter 10 What Is a Two-Sample Test 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.

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

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

  7. Comparing Two Means: Independent Samples Chapter 10 Case 2: Unknown Variances, Assumed Equal • 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, s12 and s22 can be used to estimate a common pooled variance sp2.

  8. Comparing Two Means: Independent Samples Chapter 10 Case 3: Unknown Variances, Assumed Unqual • 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. A quick rule for degrees of freedom is to use min(n1 – 1, n2 – 1). You will get smaller d.f. but avoid the tedious formula above.

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

  10. Comparing Two Means: Independent Samples Chapter 10 Which Assumption Is Best? • 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. Must Sample Sizes Be Equal? • Unequal sample sizes are common and the formulas still apply.

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

  12. Comparing Two Means: Independent Samples Chapter 10 Three Caveats: • Are the populations severely skewed? Are there outliers? Check using histograms and/or dot plots of each sample. ttests are OK if moderately skewed, while outliers are more serious. • 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.

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

  14. Comparing Two Means: ML 9.2Paired Samples Chapter 10 Paired Data • 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. • Paired data are typically displayed in columns.

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

  16. Comparing Two Means: Paired Samples Chapter 10 Steps in Testing Paired Data • Step 1: State the hypotheses. For example:H0: µd = 0H1: µ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 4: Make the decision. Reject H0 if the test statistic falls in the rejection region(s) as defined by the critical values.

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

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

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

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

  21. Comparing Two Proportions Chapter 10 Testing for Zero Difference: 12 = 0 If H0 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

  22. Comparing Two Proportions Chapter 10 Testing for Zero Difference: 12 = 0 • If the samples are large, p1 – p2 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

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

  24. Comparing Two Proportions Chapter 10 Testing for Zero Difference: 12 = 0 • We have assumed a normal distribution for the statistic p1 – p2. • 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.” Checking for Normality

  25. Comparing Two Proportions Chapter 10 Testing for Nonzero Difference

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

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

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

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

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

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

  32. Comparing Two Variances Chapter 10 EXCEL’s F Test Note: Excel uses a left-tailed test if s12 < s22 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 s12 > s22

  33. Comparing Two Variances Chapter 10 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. • MINITAB reports both the F test and a robust alternative called Levene’s test along with its p-values.

More Related