chi square test of association independence

10
Comparing Several Props The chi-square test for Homogeneity allows us to test if many populations and/or treatments have the same proportional distributions H 0 : p1 = p2 = p3 … or “no difference in the proportions of successes for various populations or treatments” H a : at least two p i ’s are different or “there is a difference in the proportions of successes for various populations or treatments” Example on page 710 The chi-square statistic χ 2 of a 2x2 table is equivalent to a two-sample z test statistic squared z 2 .

Upload: amylute

Post on 21-Jan-2015

259 views

Category:

Education


7 download

DESCRIPTION

using chi-square test of association/independence to determine association between two variables

TRANSCRIPT

Page 1: Chi square test of association independence

Comparing Several PropsThe chi-square test for Homogeneity allows us to test if many populations and/or treatments have the same proportional distributionsH0: p1 = p2 = p3 … or “no difference in the proportions of successes for various populations or treatments”Ha: at least two pi’s are different or “there is a difference in the proportions of successes for various populations or treatments”

Example on page 710

The chi-square statistic χ2 of a 2x2 table is equivalent to a two-sample z test statistic squared z2.

Page 2: Chi square test of association independence

Comparing Several PropsIt is also common to take a single random sample of a single population and classify the data in two categorical variables.

A study followed a random sample of 8474 people with normal blood pressure for about four years. All the individuals were free of heart disease at the beginning of the study. Each person took the Spielberger Trait Anger Scale Test, which measures how prone a person is to sudden anger. Researchers also recorded whether each individual developed coronary hear disease (CHD). This includes people who had heart attacks and those who needed medical treatment for heart disease. Low Anger Moderate Anger High Anger Total

CHD 53 110 27 190

NO CHD 3057 4621 606 8284

Total 3110 4731 663 8474

Page 3: Chi square test of association independence

Comparing Several PropsRandom sample of 8474 people with normal blood pressure. All the individuals were free of heart disease at the beginning of the study. Each person took the Spielberger Trait Anger Scale Test, which measures how prone a person is to sudden anger. Whether each individual developed coronary hear disease (CHD, including people who had heart attacks and those who needed medical treatment for heart disease.

Calculate appropriate conditional distributions to describe the relationship between anger and CHD status

Low Anger Moderate Anger High Anger Total

CHD 53 110 27 190

NO CHD 3057 4621 606 8284

Total 3110 4731 663 8474

Page 4: Chi square test of association independence

Comparing Several Props

Make a well-labeled graph that compares the conditional distributions in part A

Write a few sentences describing the relationship between the two variables.

Do these data provide convincing evidence of an association between the variables in the larger population? … need new test!!

Low Anger Moderate Anger High Anger Total

CHD 53 110 27 190

NO CHD 3057 4621 606 8284

Total 3110 4731 663 8474

Page 5: Chi square test of association independence

Comparing Several PropsChi-Square Test for Association/IndependenceNull – no association between categorical variablesAlternative – there is an association between variables

H0: there is no association between anger level and heart disease in the population of people with normal blood pressureHa: there is an association between anger level and heart disease in the population of people with normal blood pressure

No association means one variable does not occur in common with the other; the variables are independentGoal – analyze the relationship between two variables.

Page 6: Chi square test of association independence

Comparing Several PropsH0: there is no association between anger level and heart disease in the population of people with normal blood pressureHa: there is an association between anger level and heart disease in the population of people with normal blood pressure

Similarly:

H0: anger and heart disease are independent in the population of people with normal blood pressureHa: anger and heart disease are not independent in the population of people with normal blood pressure.

Begin by comparing observed counts with the expected counts if null is true.

Page 7: Chi square test of association independence

Comparing Several PropsFind expected countsThe null hypothesis is that there is no association between anger level and heart disease in the population of interest. If we assume that H0 is true, then anger level and heart disease are independent. We can find the expected cell counts Low Anger Moderate Anger High Anger Total

CHD 53 110 27 190

NO CHD 3057 4621 606 8284

Total 3110 4731 663 8474

Page 8: Chi square test of association independence

Comparing Several PropsChi-Square Test for Association/IndependenceIf Large Sample Size, Random, & Independent conditions are metH0: There is no association between two categorical variables in the population of interestHa: there is an association between two categorical variables in the population of interest OrH0: two categorical variables are independent in the population of interestHa: two categorical variables are not independent in the population of interestFind expected counts, then calculate chi-square statisticDegree of freedom = (number of rows – 1)(number of columns – 1)P-value area to the right of the statistic

Page 9: Chi square test of association independence

Comparing Several PropsDo the data provide convincing evidence of an association between anger level and heart disease in the population of interest? Carry out an appropriate test to help answer the question.

Observed counts: Expected Counts:

State:

Plan:

Do:

Conclude:Pg. 717

Low Mod. High Low Mod. High

CHD 53 110 27 69.73 106.08 14.19

NO CHD 3057 4621 606 3040.27 4624.92 618.81

Page 10: Chi square test of association independence

Comparing Several PropsCan we conclude that being prone to anger causes heart disease?- Observational study- Lurking variables