Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inference for Relationships

Similar presentations


Presentation on theme: "Inference for Relationships"— Presentation transcript:

1 Inference for Relationships
Lesson 4: Section 11.2 (part 2)

2 Lesson 1 & 2 HW answers P – 695 #1, 3, 5, 8-10, 12, 13, 15-17, 19-22 8.) H0: psand = 0.56, pmud = 0.29, procks= 0.15 Ha: At least one of the p’s is incorrect, chi-square gof test, check conditions:Random, expected counts (112, 58, and 30) are at least 5, Independent (10(200) = 2000 reasonable to assume at least 2000 seagulls) X2 = , P-value = , Reject that seagulls have a preference of location where they stand. 10.) The same 50 students were used each day, so the observations are not independent.

3 Lesson 1 & 2 HW answers P – 695 #1, 3, 5, 8-10, 12, 13, 15-17, 19-22 8.) H0: psand = 0.56, pmud = 0.29, procks= 0.15 Ha: At least one of the p’s is incorrect, chi-square gof test, check conditions:Random, expected counts (112, 58, and 30) are at least 5, Independent (10(200) = 2000 reasonable to assume at least 2000 seagulls) X2 = , P-value = using df = 2, Reject the null and conclude that seagulls have a preference of location where they stand. 10.) The same 50 students were used each day, so the observations are not independent.

4 Lesson 1 & 2 HW answers P – 695 #1, 3, 5, 8-10, 12, 13, 15-17, 19-22 12.) H0: The distribution of ethnic background in the housing complex follows the same distribution of ethnic background in New York City population Ha: The distribution of ethnic background in the housing complex does NOT follow the same distribution of ethnic background in New York City population chi-square gof test, check conditions: Random, expected counts (224, 192, 280, 96 and 8) are at least 5, Independent (10(800) = 8000 reasonable to assume at least 8000 residents in housing complex) X2 = , P-value = using df = 4, Reject the null and conclude that the housing complex does NOT follow the ethnic background distribution of NYC as a whole. Follow up analysis: The largest contributor to the chi-square statistic is for the Other category. There were many more residents in the sample in this category that we would have predicted.

5 Lesson 1 & 2 HW answers P – 695 #1, 3, 5, 8-10, 12, 13, 15-17, 19-22 16.) H0: The distributions of Kellogg’s Froot Loops cereal flavors are equal. Ha: The distributions of Kellogg’s Froot Loops cereal flavors are not equal. chi-square gof test, check conditions: Random, expected counts (20 for all flavors) are at least 5, Independent (10(120) = 1200 reasonable to assume at least 1200 Froot Loops) X2 = 7.9, P-value = using df = 5, Fail to reject the null. There is NOT convincing evidence that the distributions of Kellogg’s Froot Loops cereal flavors are not equal. Follow up analysis: Not necessary since we failed to reject. 20. A 22.D

6 objectives Interpret computer output for a chi-square test based on a two-way table. Show that the two-sample z test for comparing two proportions and the chi-square test for a 2-by-2 two way table given equivalent results. Use a Chi Square test of association/independence to determine whether there is convincing evidence of an association between two categorical variables. Distinguish between the three types of chi-square tests.

7 Example: ibuprofen or acetaminophen?
In a study reported by the Annals of Emergency Medicine (March 2009), researcher conducted a randomized, double-blind clinical trial to compare the effects of ibuprofen and acetaminophen plus codeine as a pain reliever for children recovering from arm fractures. There were many response variables recorded, including the presence of any adverse effect such as nausea, dizziness, and drowsiness. Here are the results: Ibu-profen Acetaminophen plus codeine Total Adverse Effects 36 57 93 No adverse effects 86 55 141 122 112 234

8 Example: ibuprofen or acetaminophen?
(a) Explain why it was important to investigate this question with a randomized, double-blind clinical trial. Randomized – two treatment groups are roughly equivalent in the beginning AND it avoids lurking variables. Double Blind – Expectations from both the patients and the ones administering the drug will keep the expectations the same for both groups.

9 Example: ibuprofen or acetaminophen?
(b) Is the difference between the two groups statistically significant? Conduct an appropriate chi-square test to find out. STATE: We want to perform a test of the following hypotheses using a significance level of 0.05: H0: There is no difference in the proportions of patients like these who suffer adverse effects when taking ibuprofen or acetaminophen plus codeine. Ha: There is a difference in the proportions of patients like these who suffer adverse effects when taking ibuprofen or acetaminophen plus codeine.

10 Example: ibuprofen or acetaminophen?
(b) PLAN: If conditions are met, we will perform a chi-square test of homogeneity. Random: The treatments were assigned at random. Large Sample Size: The expected counts (listed below) are all at least 5: (93/234)(122) = (93/234)(112) =44.5 (141/234)(122) = (141/234)(112) = 67.5 Independent: Knowing whether one subject had an adverse effect shouldn’t give any additional information about the responses of other subjects, so the observations can be considered independent (clinical trial, so we’re not sampling!)

11 Example: ibuprofen or acetaminophen?
(b) DO: Test statistic: P-value: Using (2-1)(2-1) = 1 degrees of freedom and a calculator: X2cdf(11.15, 1000, 1) =

12 Example: ibuprofen or acetaminophen?
(b) CONCLUDE: Because the P-value is less than 0.05, we reject H0. We HAVE convincing evidence that there is a difference in the proportions of patients like these who suffer adverse effects when taking ibuprofen or acetaminophen plus codeine.

13 Example: ibuprofen or acetaminophen?
(c) Wait, we’re using two proportions (adverse effects for the two treatments) – that means we can use a two-sample z test for p1 – p2. Set up hypotheses and use technology to find the z statistic and P-value. Compare to what you found in part (b). H0: pI – pA = 0 Ha: pI – pA ≠ 0 Using technology, 2PropZTest, z = and P-value = The P-value is exactly the same as the P-value from the chi-square test. Further more, if you z2 = (-3.339)2 = (which was our X2)!

14 Chi-square test for homogeneity vs. two sample z test.
When you are doing a chi-square test for homogeneity based on a 2 x 2 table with 1 degree of freedom, you can compare 2 proportions and do a two-sample z test for p1 – p2!!

15 Types of chi square tests
Chi square goodness of fit test One way table of observed counts One categorical variable Chi square test for homogeneity Two way table of observed counts Tests to see if a distribution of ONE categorical variable is the same for each of several populations/treatments. Chi square test for association/independence Tests to see whether TWO categorical variables are associated in the population of interest.

16 Chi-Square Test for Association/Independence
Suppose the Random, Large Sample Size, and Independent conditions are met. You can use the chi-square test for association/independence to test: H0: There is NO association between two categorical variables in the population of interest. Ha: There is an association between two categorical variables in the population of interest. 1. Find the expected counts. 2. Find the Chi-Square Statistic: 3. With degrees of freedom: (number of rows – 1)(number of columns – 1) and Table C(or technology), find the P-value to give the area to the right of X2 using the X2 density curve 4. Reject (P value < significance level) or fail to reject.

17 Example of chi-square test for association: Allergies
A study investigated the relationship between gender and having allergies for a random sample of 40 students who completed a CensusAtSchool survey. Here is a two-way table that summarizes the data: Female Male Total Allergies 10 8 18 No allergies 13 9 22 23 17 40

18 Example of chi-square test for association: Allergies
Do these data provide convincing evidence of an association between gender and having allergies for U.S. high school students who filled out the CensusAtSchool survey? First, calculate the expected counts and write them in the table. STATE: We want to perform a test of the following hypotheses using a significance level = 0.05. H0: There is no association between gender and having allergies in the population of U.S. high school students who filled out the CensusAtSchool survey. Ha: There is an association between gender and having allergies in the population of U.S. high school students who filled out the CensusAtSchool survey.

19 Example of chi-square test for association: Allergies
PLAN: If conditions are met, we will perform a chi-square test for association/independence. Random: The sample was randomly selected. Large Sample Size: The expected counts are all at least 5 (see table) Independent: Knowing the response of one student shouldn’t tell us anything about the response of other students. Also, there are at least 10(40) = 400 students in the U.S. who filled out the CensusAtSchool survey. Female Male Total Allergies 10 (10.35) 8 (7.65) 18 No allergies 13 (12.65) 9 (9.35) 22 23 17 40

20 Example of chi-square test for association: Allergies
DO: Test statistic: P-value: Using (2-1)(2-1) = 1 degrees of freedom and the graphing calculator, P-value = X2cdf(0.051, 1000, 1) = 0.821 CONCLUDE: Because the P-value is much greater than 0.05, we fail to reject H0. We do NOT have convincing evidence that there is an association between gender and having allergies in the population of U.S. high school students who filled out the CensusAtSchool survey.

21 homework Assigned reading: p. 696 – 713 Complete HW problems: p #28, 30, 32, 33, 35, 36, 37, 39, 41, 43, 44, 46, 47, 49, 52, 53-58 Check answers to odd problems.


Download ppt "Inference for Relationships"

Similar presentations


Ads by Google