Chapter 21 TwoSample Proportions Inference Steps for doing

  • Slides: 16
Download presentation
Chapter 21 Two-Sample Proportions Inference

Chapter 21 Two-Sample Proportions Inference

Steps for doing a confidence interval: 1) State the parameter 2) Assumptions – 1)

Steps for doing a confidence interval: 1) State the parameter 2) Assumptions – 1) The samples are chosen randomly and were chosen independently of each other. OR Treatments were assigned randomly to individuals or objects (or vice-versa) 2) Both samples need to be large. n 1 p 1 10 and n 1(1 -p 1) 10 and n 2 p 2 10 and n 2(1 -p 2) 10 3) 10% rule – Both samples are less than 10% of the population. 3) Calculate the interval 4) Write a statement about the interval in the context of the problem.

Formula for confidence interval: Margin of error! Standard error! Note: use p-hat when p

Formula for confidence interval: Margin of error! Standard error! Note: use p-hat when p is not known

Example 1: At Community Hospital, the burn center is experimenting with a new plasma

Example 1: At Community Hospital, the burn center is experimenting with a new plasma compress treatment. A random sample of 316 patients with minor burns received the plasma compress treatment. Of these patients, it was found that 259 had no visible scars after treatment. Another random sample of 419 patients with minor burns received no plasma compress treatment. For this group, it was found that 94 had no visible scars after treatment. What is a 95% confidence interval of the difference in proportion of people who had no visible scars between the plasma compress treatment & control group?

State the parameters p 1 = the true proportion of patients who had no

State the parameters p 1 = the true proportion of patients who had no visible scars with the plasma compress treatment p 2 = the true proportion of patients who had no visible scars without the plasma compress treatment p 1 - p 2 = the true difference in proportion of patients who had no visible scars between the two treatments Justify the confidence interval needed (state assumptions) 1) The treatments were assigned randomly to individuals which is stated in the problem. 2) Both samples should be large. So both samples are large. 3) The samples should be less than 10% of the population. The population should be at least 7350 burn patients which I will assume. Since the conditions are met a CI for the difference of proportions is appropriate.

Calculate the confidence interval. 95% CI Explain the interval in the context of the

Calculate the confidence interval. 95% CI Explain the interval in the context of the problem. We are 95% confident that the true difference in proportion of people who had no visible scars between the plasma compress treatment & control group is between 53. 7% and 65. 4%

Steps for a hypothesis test for the difference of two proportions: 1) Define the

Steps for a hypothesis test for the difference of two proportions: 1) Define the parameter 2) Hypothesis statements 3) Assumptions 4) Calculations (Find the p-value) 5) Conclusion, in context

Hypotheses Statements Null hypothesis H 0: p 1 = p 2 or p 1

Hypotheses Statements Null hypothesis H 0: p 1 = p 2 or p 1 - p 2=0 Alternative hypothesis Ha : p 1 > p 2 Ha : p 1 < p 2 Ha : p 1 ≠ p 2

Assumptions 1) The samples are chosen randomly and were chosen independently of each other.

Assumptions 1) The samples are chosen randomly and were chosen independently of each other. OR Treatments were assigned randomly to individuals or objects (or viceversa) 2) Both samples need to be large. n 1 p 1 10 and n 1(1 -p 1) 10 and n 2 p 2 10 and n 2(1 -p 2) 10 3) 10% rule – Both samples are less than 10% of the population.

Formula for Hypothesis test: where

Formula for Hypothesis test: where

A forest in Oregon has an infestation of spruce moths. In an effort to

A forest in Oregon has an infestation of spruce moths. In an effort to control the moth, one area has been regularly sprayed from airplanes. In this area, a random sample of 495 spruce trees showed that 81 had been killed by moths. A second nearby area receives no treatment. In this area, a random sample of 518 spruce trees showed that 92 had been killed by the moth. Do these data indicate that the proportion of spruce trees killed by the moth is different for these areas?

Parameters and Hypotheses p 1 = the true proportion of trees killed by moths

Parameters and Hypotheses p 1 = the true proportion of trees killed by moths in the treated area p 2 = the true proportion of trees killed by moths in the untreated area p 1 – p 2 = the true difference in proportion of trees killed by moths in the two areas. H 0 : p 1 = p 2 Ha : p 1 ≠ p 2 Assumptions (Conditions) 1) Both samples must be random which is stated in the problem. 2) Both samples should be large. So both samples are large. 3) The samples should be less than 10% of the population. The population should be at least 10130 spruce trees which I will assume. Since the conditions are met, a z-test for the difference of proportions is appropriate.

Calculations

Calculations

Decision: Since the p-value > , I fail to reject the null hypothesis at

Decision: Since the p-value > , I fail to reject the null hypothesis at the. 05 level. Conclusion: There is not sufficient evidence to suggest that the proportion of spruce trees killed by the moth is different for these areas

Using the Calculator to find a 2 proportion Z-interval 1) Go to Menu, 6:

Using the Calculator to find a 2 proportion Z-interval 1) Go to Menu, 6: Statistics, 7: Stat Tests, choose 2 -proportion z-test 2) Enter the observed numbers (sometimes you may have to multiply np for each x value. ) (For example p=81/495 times 495 = 81, so 81 is “successes for p 1) 3) Toggle the alternative hypothesis and then calculate the result. 4) Example: X 1 =. 28 * 506 (p-hat = 28% and n = 506) [Round whole] N 1 = 506 X 2 =. 14 * 520 (p-hat of second proportion and n of second) [Round] N 2 = 520 C-level =. 95 (95% confidence level) Calculate Answer: (. 09101, . 18948) P 1 =. 281 P 2 =. 14 N 1 = 506 Now explain what you see. We are 95% confident that the N 2 = 520 (relate back to problem)…is between 9. 1% and 18. 9%.

Using the Calculator to find a 2 Proportion Z-Test 1) Go to STAT, curser

Using the Calculator to find a 2 Proportion Z-Test 1) Go to STAT, curser to TESTS, select 6: 2 -Prop. ZTest 2) Enter the observed numbers and sample sizes for both groups. (You may have to enter data by using np here also. ) 3) Remember to indicate which inequality your alternative hypothesis test is using, then calculate. 4) Example: X 1 = 318 N 1 = 811 X 2 = 48 N 2 = 184 ≠ P 1 = p 2 Calculate Answer: p 1 ≠ p 2 z = 3. 333 p =. 0008594 p 1 =. 3921 p 2 =. 2609 We interpret the result and state a conclusion. We see a z-score of 3. 333 and the p-value of. 00086. Such a small p-value indicates that the observed difference is unlikely to be sampling error.