1 / 63

Chapter 11

Chapter 11. Comparing Two Populations or Treatments. Notation - Comparing Two Means. Notation - Comparing Two Means. If the random samples on which and are based are selected independently of one another, then. Sampling Distribution for Comparing Two Means.

Download Presentation

Chapter 11

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. Chapter 11 Comparing Two Populations or Treatments

  2. Notation - Comparing Two Means

  3. Notation - Comparing Two Means

  4. If the random samples on which and are based are selected independently of one another, then Sampling Distribution for Comparing Two Means

  5. If n1 and n2 are both large or the population distributions are (at least approximately) normal then and each have (at least approximately) a normal distribution. This implies that the sampling distribution of is also normal or approximately normal. Sampling Distribution for Comparing Two Means

  6. Sampling Distribution for Comparing Two Means If n1 and n2 are both large or the population distributions are (at least approximately) normal, then the distribution of Is described (at least approximately) by the standard normal (z) distribution.

  7. Hypothesis Tests Comparing Two Means Large size sample techniques allow us to test the null hypothesis H0: m1 - m2 = hypothesized value against one of the usual alternate hypotheses using the statistic

  8. Hypothesis Tests Example Comparing Two Means We would like to compare the mean fill of 32 ounce cans of beer from two adjacent filling machines. Past experience has shown that the population standard deviations of fills for the two machines are known to be s1 = 0.043 and s2 = 0.052 respectively. A sample of 35 cans from machine 1 gave a mean of 16.031 and a sample of 31 cans from machine 2 gave a mean of 16.009. State, perform and interpret an appropriate hypothesis test using the 0.05 level of significance.

  9. Test statistic: Hypothesis Tests Example Comparing Two Means m1 = mean fill from machine 1 m2 = mean fill from machine 2 H0: m1 - m2 = 0 Ha: m1 - m2 Significance level: a = 0.05

  10. Hypothesis Tests Example Comparing Two Means Since n1 and n2 are both large (> 30) we do not have to make any assumptions about the nature of the distributions of the fills. This example is a bit of a stretch, since knowing the population standard deviations (without knowing the population means) is very unusual. Accept this example for what it is, just a sample of the calculation. Generally this statistic is used when dealing with “what if” type of scenarios and we will move on to another technique that is somewhat more commonly used when s1 and s2 are not known.

  11. Hypothesis Tests Example Comparing Two Means Calculation: P-value: P-value = 2P(z > 1.86) = 2P(z < -1.86) = 2(0.0314) = 0.0628

  12. Hypothesis Tests Example Comparing Two Means The p-value of the test is 0.0628. There is insufficient evidence to support a claim that the two machines produce bottles with different mean fills at a significance level of 0.05. With a p-value of 0.063 we have been unable to show the difference in mean fills is statistically significant at the 0.05 significance level.

  13. If n1 and n2 are both large or if the population distributions are normal and when the two random samples are independently selected, the standardized variable Has approximately a t distribution with Two-Sample t Test for Comparing Two Population Means

  14. Two-Sample t Test for Comparing Two Population Means df should be truncated to an integer.

  15. Alternate hypothesis and finding the P-value: • Ha: p1 - p2 > hypothesized value P-value = Area under the z curve to the right of the calculated z • Ha: p1 - p2 < hypothesized value P-value = Area under the z curve to the left of the calculated z Two-Sample t Tests for Difference of Two Means

  16. Ha: p1 - p2 hypothesized value • 2•(area to the right of z) if z is positive • 2•(area to the left of z) if z is negative Two-Sample t Tests for Difference of Two Means

  17. Hypothesis Test Example In an attempt to determine if two competing brands of cold medicine contain, on the average, the same amount of acetaminophen, twelve different tablets from each of the two competing brands were randomly selected and tested for the amount of acetaminophen each contains. The results (in milligrams) follow. Use a significance level of 0.01.

  18. Hypothesis Test Example Brand ABrand B 517, 495, 503, 491 493, 508, 513, 521 503, 493, 505, 495 541, 533, 500, 515 498, 481, 499, 494 536, 498, 515, 515 State and perform an appropriate hypothesis test.

  19. Test statistic: Hypothesis Test Example m1 = the mean amount of acetaminophen in cold tablet brand A m2 = the mean amount of acetaminophen in cold tablet brand B H0:m1 = m2 (m1 - m2 = 0) Ha:m1m2(m1 - m20) Significance level:a = 0.01

  20. Hypothesis Test Example Assumptions:The samples were selected independently and randomly. Since the samples are not large, we need to be able to assume that the populations (of amounts of acetaminophen are both normally distributed.

  21. Hypothesis Test Example Assumptions (continued): As we can see from the normality plots and the boxplots, the assumption that the underlying distributions are normally distributed appears to be quite reasonable.

  22. Hypothesis Test Example Calculation:

  23. Hypothesis Test Example Calculation: We truncate the degrees of freedom to give df = 17.

  24. Hypothesis Test Example P-value: From the table of tail areas for t curve (Table IV) we look up a t value of 3.5 with df = 17 to get 0.001. Since this is a two-tailed alternate hypothesis, P-value = 2(0.001) = 0.002. Conclusion: Since P-value = 0.002 < 0.01 = a, H0 is rejected. The data provides strong evidence that the mean amount of acetaminophen is not the same for both brands. Specifically, there is strong evidence that the average amount per tablet for brand A is less than that for brand B.

  25. Confidence IntervalsComparing Two Means • The general formula for a confidence interval for m1 – m2 when • The two samples are independently chosen random samples, and • The sample sizes are both large (generally n1 30 and n2 30) OR the population distributions are approximately normal is

  26. The t critical value is based on df should be truncated to an integer. T t critical values are in the table of t critical values (table III). Confidence IntervalsComparing Two Means

  27. Confidence Intervals ExampleComparing Two Means Two kinds of thread are being compared for strength. Fifty pieces of each type of thread are tested under similar conditions. The sample data is given in the following table. Construct a 98% confidence interval for the difference of the population means.

  28. Confidence Intervals ExampleComparing Two Means Truncating, we have df = 96.

  29. Confidence Intervals ExampleComparing Two Means Looking on the table of t critical values (table III) under 98% confidence level for df = 96, (we take the closest value for df , specifically df = 120) and have the t critical value = 2.36. The 98% confidence interval estimate for the difference of the means of the tensile strengths is

  30. Confidence Intervals ExampleComparing Two Means A student recorded the mileage he obtained while commuting to school in his car. He kept track of the mileage for twelve different tankfuls of fuel, involving gasoline of two different octane ratings. Compute the 95% confidence interval for the difference of mean mileages. His data follow: 87 Octane 90 Octane 26.4, 27.6, 29.7 30.5, 30.9, 29.2 28.9, 29.3, 28.8 31.7, 32.8, 29.3

  31. Confidence Intervals Example Let 87 octane fuel be the first group and 90 octane fuel the second group, so we have n1 = n2 = 6 and Truncating, we have df = 9.

  32. Confidence Intervals Example Looking on the table under 95% with 9 degrees of freedom, the critical value of t is 2.26. The 95% confidence interval for the true difference of the mean mileages is (-3.99, 0.57).

  33. Confidence Intervals ExampleComments about assumptions Comments: We had to assume that the samples were independent and random and that the underlying populations were normally distributed since the sample sizes were small. If we randomized the order of the tankfuls of the two different types of gasoline we can reasonably assume that the samples were random and independent. By using all of the observations from one car we are simply controlling the effects of other variables such as year, model, weight, etc.

  34. Confidence Intervals ExampleComments about assumptions By looking at the following normality plots, we see that the assumption of normality for each of the two populations of mileages appears reasonable. Given the small sample sizes, the assumption of normality is very important, so one would be a bit careful utilizing the result.

  35. Null hypothesis: H0:md = hypothesized value Test statistic: Where n is the number of sample differences and and sd are the sample mean and standard deviation of the sample differences. This test is based on df = n-1 Comparing Two Population or Treatment Means – Paired t Test

  36. Comparing Two Population or Treatment Means – Paired t Test Assumptions: The samples are paired. The n sample differences can be viewed as a random sample from a population of differences. The number of sample differences is large (generally at least 30) OR the population distribution of differences is approximately normal.

  37. Comparing Two Population or Treatment Means – Paired t Test Alternate hypothesis and finding the P-value: • Ha: md > hypothesized value P-value = Area under the appropriate t curve to the right of the calculated t • Ha: md < hypothesized value P-value = Area under the appropriate t curve to the left of the calculated t • Ha: md hypothesized value • 2•(area to the right of t) if t is positive • 2•(area to the left of t) if t is negative

  38. Paired t Test Example A weight reduction center advertises that participants in its program lose an average of at least 5 pounds during the first week of the participation. Because of numerous complaints, the state’s consumer protection agency doubts this claim. To test the claim at the 0.05 level of significance, 12 participants were randomly selected. Their initial weights and their weights after 1 week in the program appear on the next slide. Set up and perform an appropriate hypothesis test.

  39. Paired Sample Example continued

  40. Paired Sample Example continued

  41. md = mean of the individual weight changes (initial weight–weight after one week) This is equivalent to the difference of means: md = m1 – m2 = minitial weight - m1 week weight H0: md = 5 Ha: md < 5 Significance level: a = 0.05 Test statistic: Paired Sample Example continued

  42. Paired Sample Example continued Assumptions: According to the statement of the example, we can assume that the sampling is random. The sample size (12) is small, so from the boxplot we see that there is one outlier but never the less, the distribution is reasonably symmetric and the normal plot confirms that it is reasonable to assume that the population of differences (weight losses) is normally distributed.

  43. Paired Sample Example continued Calculations: According to the statement of the example, we can assume that the sampling is random. The sample size (10) is small, so P-value: This is an lower tail test, so looking up the t value of 3.0 under df = 11 in the table of tail areas for t curves (table IV) we find that P-value = 0.002.

  44. Paired Sample Example continued Conclusions: Since P-value = 0.002 < 0.05 = a, we reject H0. There is strong evidence that the mean weight loss is less than 5 pounds for those who took the program for one week.

  45. Paired Sample Example continued Minitab returns the following when asked to perform this test. Paired T-Test and CI: Initial Weight, 1 Week Weight Paired T for Initial Weight - 1 Week Weight N Mean StDev SE Mean Initial Weig 12 160.92 28.19 8.14 1 Week Weigh 12 158.58 27.49 7.93 Difference 12 2.333 2.674 0.772 95% CI for mean difference: (0.634, 4.032) T-Test of mean difference = 5 (vs not = 5):T-Value = -3.45 P-Value = 0.005

  46. Large-Sample InferencesDifference of Two Population (Treatment) Proportions Some notation:

  47. Properties: Sampling Distribution of p1-p2 • Properties If two random samples are selected independently of one another, the following properties hold: • If both n1 and n2 are large [n1 p1  10, n1(1- p1)  10, n2p2  10, n2(1- p2)  10], then p1 and p2 each have a sampling distribution that is approximately normal

  48. Large-Sample z Tests for p1 – p2 = 0 The combined estimate of the common population proportion is

  49. Test statistic: Large-Sample z Tests for p1 – p2 = 0 Null hypothesis: H0:p1 – p2 = 0 • Assumptions: • The samples are independently chosen random samples OR treatments ere assigned at random to individuals or objects (or vice versa). • Both sample sizes are large: • n1 p1  10, n1(1- p1)  10, n2p2  10, n2(1- p2)  10

  50. Large-Sample z Tests for p1 – p2 = 0 Alternate hypothesis and finding the P-value: • Ha: p1 - p2 > 0 P-value = Area under the z curve to the right of the calculated z • Ha: p1 - p2 < 0 P-value = Area under the z curve to the left of the calculated z • Ha: p1 - p2 0 • 2•(area to the right of z) if z is positive • 2•(area to the left of z) if z is negative

More Related