chi-square test of independence

147
Chi Square Test of Independence Conceptual

Upload: byu-center-for-teaching-learning

Post on 20-Jun-2015

313 views

Category:

Education


0 download

DESCRIPTION

Chi-Square Test of Independence

TRANSCRIPT

Page 1: Chi-Square Test of Independence

Chi Square Test of Independence

Conceptual

Page 2: Chi-Square Test of Independence

Questions of Independence

Page 3: Chi-Square Test of Independence

Questions of independence are actually the flip side of questions of relationship. If a variable is independent of another variable, then functions in one will not be accompanied by functions in the other.

Page 4: Chi-Square Test of Independence

Like the higher the temperature the stronger people are.

Page 5: Chi-Square Test of Independence

Like the higher the temperature the stronger people are.

Page 6: Chi-Square Test of Independence

Questions of Independence are often posed as questions of bias.

Page 7: Chi-Square Test of Independence

For example, the question, “Are admissions decisions at a local community college fair?” can reasonably be interpreted as a question of independence (or bias).

Page 8: Chi-Square Test of Independence

If fairness is taken to mean that there is proportional representation of minority and majority students that mirrors the local proportions, then a test of independence can estimate whether admissions are “fair”.

Page 9: Chi-Square Test of Independence

The question becomes “Are admissions decisions independent of majority/minority status?”

Page 10: Chi-Square Test of Independence

Assuming that majority students are similar in their preparation and motivation as minority students and they apply to the community college in proportionally similar numbers as minority students, then a fair admissions process should be independent of majority status and render proportions of admissions that are similar to proportions of majority and minority students in the local populations

Page 11: Chi-Square Test of Independence

INDEPENDENT EXAMPLE: If you are a minority you are neither more likely nor less likely to be admitted.

Page 12: Chi-Square Test of Independence

Failure to be independent would indicate bias.

Page 13: Chi-Square Test of Independence

Failure to be independent would indicate bias.

BIAS EXAMPLE: If you are a minority you are more likely to be admitted.

Page 14: Chi-Square Test of Independence

Failure to be independent would indicate bias.

BIAS EXAMPLE: If you are a minority you are more likely to be admitted.

BIAS EXAMPLE: If you are a minority you less likely to be admitted

Page 15: Chi-Square Test of Independence

Failure to be independent would indicate bias.

BIAS EXAMPLE: If you are a minority you are more likely to be admitted.

BIAS EXAMPLE: If you are a minority you less likely to be admitted.

You will use certain statistical methods (like the chi square test of independence) to determine if independence is significant or not.

Page 17: Chi-Square Test of Independence

Here is an example taken from http://omega.albany.edu:8008/mat108dir/chi2independence/chi2in-m2h.html:

In a certain town, there are about one million eligible voters. A simple random sample of 10,000 eligible voters was chosen to study the relationship between gender and participation in the last election.

Page 18: Chi-Square Test of Independence

Here is an example taken from http://omega.albany.edu:8008/mat108dir/chi2independence/chi2in-m2h.html:

In a certain town, there are about one million eligible voters. A simple random sample of 10,000 eligible voters was chosen to study the relationship between gender and participation in the last election. The results

are summarized in the following 2X2 (read two by

two) contingency table:

Page 19: Chi-Square Test of Independence

In a certain town, there are about one million eligible voters. A simple random sample of 10,000 eligible voters was chosen to study the relationship between gender and participation in the last election. The results are summarized in the following 2X2 (read two by two) contingency table:

Men Women__________________________Voted 2792 3591Didn't vote 1486 2131

Page 20: Chi-Square Test of Independence

We want to check whether being a man or a woman (columns) is independent of having voted in the last election (rows). In other words is “gender and voting independent”?

Men Women__________________________Voted 2792 3591Didn't vote 1486 2131

Page 21: Chi-Square Test of Independence

Solution:

Page 22: Chi-Square Test of Independence

Solution:In order to answer the question we need to build a test of hypothesis. We have

Page 23: Chi-Square Test of Independence

Solution:In order to answer the question we need to build a test of hypothesis. We haveNull Hypothesis = ‘Gender is independent of Voting’

Page 24: Chi-Square Test of Independence

Solution:In order to answer the question we need to build a test of hypothesis. We haveNull Hypothesis = ‘Gender is independent of Voting’Alternative Hypothesis = ‘Gender and Voting are dependent’

Page 25: Chi-Square Test of Independence

Solution:In order to answer the question we need to build a test of hypothesis. We haveNull Hypothesis = ‘Gender is independent of Voting’Alternative Hypothesis = ‘Gender and Voting are dependent’After specifying the Null Hypothesis, we need to compute the expected table under the assumption that rows and columns are in fact independent.

Page 26: Chi-Square Test of Independence

As you can see we have the observed table below:

Page 27: Chi-Square Test of Independence

As you can see we have the observed table below:

We need to create an expected table and then determine if the difference between the observed and expected are significant:

Men Women__________________________Voted 2792 3591Didn't vote 1486 2131

Page 28: Chi-Square Test of Independence

As you can see we have the observed table below:

We need to create an expected table and then determine if the difference between the observed and expected are significant:

Men Women__________________________Voted 2792 3591Didn't vote 1486 2131

Page 29: Chi-Square Test of Independence

As you can see we have the observed table below:

We need to create an expected table and then determine if the difference between the observed and expected are significant:

Men Women__________________________Voted 2792 3591Didn't vote 1486 2131

Observed Numbers Expected Numbers Difference

Page 30: Chi-Square Test of Independence

Remember that the smaller the DIFFERENCE, the better the fit which in this case would favor INDEPENDENCE between gender and voting tendencies.

Page 31: Chi-Square Test of Independence

Remember that the smaller the DIFFERENCE, the better the fit which in this case would favor INDEPENDENCE between gender and voting tendencies.

Observed Numbers Expected Numbers Difference

Page 32: Chi-Square Test of Independence

Inversely, the larger the DIFFERENCE the worse the fit which in this case would indicate that gender and voting tendencies are dependent upon one another.

Page 33: Chi-Square Test of Independence

Inversely, the larger the DIFFERENCE the worse the fit which in this case would indicate that gender and voting tendencies are dependent upon one another.

Observed Numbers Expected Numbers Difference

Page 34: Chi-Square Test of Independence

We use Chi-Square distribution to determine if that difference is significant or not.

Page 35: Chi-Square Test of Independence

We use Chi-Square distribution to determine if that difference is significant or not.We will now show you how to compute the chi-square statistic for a test of independence.

Page 36: Chi-Square Test of Independence

We use Chi-Square distribution to determine if that difference is significant or not.We will now show you how to compute the chi-square statistic for a test of independence. First, we compute the row and column totals along with the grand total.

Page 37: Chi-Square Test of Independence

Men Women________________________________________Voted 2792 3591Didn't vote 1486 2131

Page 38: Chi-Square Test of Independence

Total Who Voted

Men Women________________________________________Voted 2792 + 3591 = 6386Didn't vote 1486 2131

Page 39: Chi-Square Test of Independence

Men Women________________________________________Voted 2792 3591 6386Didn't vote 1486 + 2131 = 3617

Total Who Did Not

Vote

Page 40: Chi-Square Test of Independence

Men Women________________________________________Voted 2792 3591 6386Didn't vote + 1486 2131 3617

= 4278

Total Men

Page 41: Chi-Square Test of Independence

Men Women________________________________________Voted 2792 3591 6386Didn't vote 1486 + 2131 3617

4278 = 5722

Total Women

Page 42: Chi-Square Test of Independence

Total Men & Women or Total Voted/Not Voted

Men Women________________________________________Voted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Page 43: Chi-Square Test of Independence

Now we have the information we need to create an expected table. Here is the equation for calculating the expected value for the cell “Men who Voted”:

Page 44: Chi-Square Test of Independence

Now we have the information we need to create an expected table. Here is the equation for calculating the expected value for the cell “Men who Voted”:

Expected Value (Men who voted) =

(Number (all who voted) * Number (all men))Number (total number)

Page 45: Chi-Square Test of Independence

Observed Men Women_Voted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men Who Voted

Page 46: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

(6386 (all who voted) * Number (all men))Number (total number)

Page 47: Chi-Square Test of Independence

Expected Value (Men who voted) =

(6386 (all who voted) * 4278 (all men) )Number (total number)

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Page 48: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

(6386 (all who voted) * 4278 (all men) )10000 (total number)

Page 49: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

(27306474 (all who voted * all men))10000 (total number)

Page 50: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

2730.6474 ((all who voted * all men)/total number)

Page 51: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

2731 ((all who voted * all men)/total number)

Page 52: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Men who voted) =

2731 ((all who voted * all men)/total number)

Page 53: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

What is the expected value for Women who

Voted?

Page 54: Chi-Square Test of Independence

Women who voted:

Page 55: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Page 56: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(6386 (all who voted) * 5722 (all women) )10000 (total number)

Page 57: Chi-Square Test of Independence

Women who voted:OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Expected Value (Women who voted) =

(6386 (all who voted) * 5722 (all women) )10000 (total number)

Page 58: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(6386 (all who voted) * 5722 (all women) )10000 (total number)

Page 59: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(36523526 ((all who voted) * (all women)) )10000 (total number)

Page 60: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(3652.3526 ((all who voted) * (all women)))/total number

Page 61: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(3652 ((all who voted) * (all women)))/total number

Page 62: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3652 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

Expected Value (Women who voted) =

(3652 ((all who voted) * (all women)))/total number

Page 63: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3652 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who voted:

What is the expected value for Men who

Didn’t Vote?

Page 64: Chi-Square Test of Independence

Men who didn’t vote:

Page 65: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Page 66: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(3617 (all who didn’t vote) * 4278 (all men) )10000 (total number)

Page 67: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(3617 (all who didn’t vote) * 4278 (all men) )10000 (total number)

Page 68: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(3617 (all who didn’t vote) * 4278 (all men) )10000 (total number)

Page 69: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(15473526 ((all who didn’t vote) * (all men)) )10000 (total number)

Page 70: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(1547.3526 ((all who didn’t vote) * (all men)) / (total number))

Page 71: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3652 6386Didn't vote 1547 2131 3617

4278 5722 10000

Men who didn’t vote:

Expected Value (Men who didn’t vote) =

(1547 ((all who didn’t vote) * (all men)) / (total number))

Page 72: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3652 6386Didn't vote 1547 2131 3617

4278 5722 10000

Men who didn’t vote:

What is the expected value for Women who

Didn’t Vote?

Page 73: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Page 74: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(3617 (all who didn’t vote) * 5722 (all women) )10000 (total number)

Page 75: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(3617 (all who didn’t vote) * 5722 (all women) )10000 (total number)

Page 76: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(3617 (all who didn’t vote) * 5722 (all women) )10000 (total number)

Page 77: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(20696474 (all who didn’t vote) * (all women) )10000 (total number)

Page 78: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(2069.6474 (all who didn’t vote) * (all women)) /(total number)

Page 79: Chi-Square Test of Independence

OBSERVED Men Women_ TABLEVoted 2792 3591 6386Didn't vote 1486 2131 3617

4278 5722 10000

Women who didn’t vote:

Expected Value (Women who didn’t vote) =

(2070 (all who didn’t vote) * (all women)) /(total number)

Page 80: Chi-Square Test of Independence

EXPECTED Men Women_ TABLEVoted 2731 3652 6386Didn't vote 1547 2070 3617

4278 5722 10000

Men who didn’t vote:

Page 81: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

Page 82: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

With the information above, we can now plug in the numbers using the Chi-square independence test.

Page 83: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

With the information above, we can now plug in the numbers using the Chi-square independence test. Note – this is the same equation that is used with the Chi-square goodness of fit test:

Page 84: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

With the information above, we can now plug in the numbers using the Chi-square independence test. Note – this is the same equation that is used with the Chi-square goodness of fit test:

𝑥2=Σ(𝑂−𝐸)2

𝐸

Page 85: Chi-Square Test of Independence

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Page 86: Chi-Square Test of Independence

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Page 87: Chi-Square Test of Independence

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

Page 88: Chi-Square Test of Independence

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

𝑥2=(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 89: Chi-Square Test of Independence

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

𝑥2=(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 90: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

Page 91: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

4278 5722 10000

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722 10000

- = Difference

𝑥2=(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Voting Men

Page 92: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

𝑥2=(2792−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸

Voting Men

Page 93: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

Voting Men

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

𝑥2=(2792−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸

Voting Men

Page 94: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

Voting Men

- = Difference

𝑥2=(2792−2731)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Voting Men

Page 95: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

Voting Men

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

𝑥2=(2792−2731)2

2731+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Voting Men

Page 96: Chi-Square Test of Independence

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

Voting Men

- = Difference

𝑥2=(2792−2731)2

2731+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Voting Women

Page 97: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

Voting Men

- = Difference

𝑥2=(2792−2731)2

2731+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Voting Women

Page 98: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

Voting Men

- = Difference

𝑥2=(2792−2731)2

2731+(3591−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸

Voting Women

Page 99: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Voting Women

𝑥2=(2792−2731)2

2731+(3591−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸

Page 100: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Voting Women

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 101: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Non-Voting Men

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 102: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Non-Voting Men

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 103: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

- = Difference

Non-Voting Men

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

Page 104: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

- = Difference

Non-Voting Men

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(𝑂−𝐸)2

𝐸

Page 105: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Non-Voting Women

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(𝑂−𝐸)2

𝐸

Page 106: Chi-Square Test of Independence

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

- = Difference

Non-Voting Women

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(2131−𝐸)2

𝐸

Page 107: Chi-Square Test of Independence

EXPECTED Men Women TABLEVoted 2731 3652Didn't vote 1547 2070

4278 5722

Voting Men

OBSERVED Men Women TABLEVoted 2792 3591Didn't vote 1486 2131

- = Difference

Non-Voting Women

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(2131−2070)2

2070

Page 108: Chi-Square Test of Independence

Time to Calculate:

Page 109: Chi-Square Test of Independence

Time to Calculate:

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(2131−2070)2

2070

Page 110: Chi-Square Test of Independence

Time to Calculate:

𝑥2=(61)2

2731+

(3591−3652)2

3652+(1486−1547)2

1547+(2131−2070)2

2070

Page 111: Chi-Square Test of Independence

Time to Calculate:

𝑥2=37212731

+(3591−3652)2

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Page 112: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+(3591−3652)2

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Page 113: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+(−61)2

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Page 114: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+ 37213652

+(1486−1547 )2

1547+(2131−2070)2

2070

Page 115: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+(1486−1547)2

1547+(2131−2070)2

2070

Page 116: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+(61)2

1547+(2131−2070)2

2070

Page 117: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+ 37211547

+(2131−2070)2

2070

Page 118: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+2.4+(2131−2070)2

2070

Page 119: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+2.4+(61)2

2070

Page 120: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+2.4+37212070

Page 121: Chi-Square Test of Independence

Time to Calculate:

𝑥2=1 .4+1 .0+2.4+1.8

Page 122: Chi-Square Test of Independence

Time to Calculate:

𝑥2=6.6

Page 123: Chi-Square Test of Independence

Now we determine if a of 6.6 exceeds the critical for terms.

Page 124: Chi-Square Test of Independence

To calculate the critical we first must determine the degrees of freedom as well as set the probability level.

Page 125: Chi-Square Test of Independence

To calculate the critical we first must determine the degrees of freedom as well as set the probability level.The probability or alpha level means the probability of a type 1 error we are willing to live with (i.e., this is the probability of being wrong when we reject the null hypothesis). Generally this value is .05 which is like saying we are willing to be wrong 5 out of 100 times (.05) before we will reject the null-hypothesis.

Page 126: Chi-Square Test of Independence

Degrees of Freedom are calculated by taking the number rows and subtracting them by 1 and then multiplying the result by taking the number of columns and subtracting them by 1.

Page 127: Chi-Square Test of Independence

Degrees of Freedom are calculated by taking the number rows and subtracting them by 1 and then multiplying the result by taking the number of columns and subtracting them by 1. (Two rows -1) or (2-1) X (2-1) or 1X1=1. Degrees of Freedom = 1.

Page 128: Chi-Square Test of Independence

We now have all of the information we need to determine the critical .

Page 129: Chi-Square Test of Independence

We now have all of the information we need to determine the critical .We go to the Chi-Square Distribution Table and locate the degrees of freedom:

Page 130: Chi-Square Test of Independence

We now have all of the information we need to determine the critical .We go to the Chi-Square Distribution Table and locate the degrees of freedom:

df 0.100 0.050 0.025 1 2.71 3.84 5.02 2 4.61 5.99 7.38 3 6.25 7.82 9.35 4 7.78 9.49 11.14 5 9.24 11.07 12.83 6 10.64 12.59 14.45 7 12.02 14.07 16.10 8 13.36 15.51 17.54 9 14.68 16.92 19.20 … … … …

Page 131: Chi-Square Test of Independence

We now have all of the information we need to determine the critical .We go to the Chi-Square Distribution Table and locate the degrees of freedom:

df 0.100 0.050 0.025 1 2.71 3.84 5.02 2 4.61 5.99 7.38 3 6.25 7.82 9.35 4 7.78 9.49 11.14 5 9.24 11.07 12.83 6 10.64 12.59 14.45 7 12.02 14.07 16.10 8 13.36 15.51 17.54 9 14.68 16.92 19.20 … … … …

And then we locate the probability or alpha level:

Page 132: Chi-Square Test of Independence

We now have all of the information we need to determine the critical .We go to the Chi-Square Distribution Table and locate the degrees of freedom:

df 0.100 0.050 0.025 1 2.71 3.84 5.02 2 4.61 5.99 7.38 3 6.25 7.82 9.35 4 7.78 9.49 11.14 5 9.24 11.07 12.83 6 10.64 12.59 14.45 7 12.02 14.07 16.10 8 13.36 15.51 17.54 9 14.68 16.92 19.20 … … … …

And then we locate the probability or alpha level:Where these two values intersect in the table we find the critical .

Page 133: Chi-Square Test of Independence

Since the chi-square goodness of fit value (6.6) exceeds the critical (3.84) we will reject the null-hypothesis.

Page 134: Chi-Square Test of Independence

Since the chi-square goodness of fit value (6.6) exceeds the critical (3.84) we will reject the null-hypothesis.

Voting patterns and gender status are not statistically significantly dependent on one

another.

Page 135: Chi-Square Test of Independence

Since the chi-square goodness of fit value (6.6) exceeds the critical (3.84) we will reject the null-hypothesis.

Voting patterns and gender status are not statistically significantly dependent on one

another.

Page 136: Chi-Square Test of Independence

Since the chi-square goodness of fit value (6.6) exceeds the critical (3.84) we will reject the null-hypothesis.

There actually is a significant difference.

Voting patterns and gender status are not statistically significantly dependent on one

another.

Page 137: Chi-Square Test of Independence

So what is the difference between chi-square test of goodness of fit and test of independence?

Page 138: Chi-Square Test of Independence

A goodness-of-fit test is a one variable Chi-square test.

Page 139: Chi-Square Test of Independence

A goodness-of-fit test is a one variable Chi-square test.In this example, a department chair wants to know if the enrollments across three professors are equally distributed.

Page 140: Chi-Square Test of Independence

A goodness-of-fit test is a one variable Chi-square test.In this example, a department chair wants to know if the enrollments across three professors are equally distributed.Here is the actual, or observed, data:

Page 141: Chi-Square Test of Independence

A goodness-of-fit test is a one variable Chi-square test.In this example, a department chair wants to know if the enrollments across three professors are equally distributed.Here is the actual, or observed, data:

OBSERVED TABLE

Prof A’s Class

Prof B’s Class

Prof C’s Class

Students enrolled 31 25 10

Page 142: Chi-Square Test of Independence

A goodness-of-fit test is a one variable Chi-square test.

OBSERVED TABLE

Prof A’s Class

Prof B’s Class

Prof C’s Class

Students enrolled 31 25 10

Page 143: Chi-Square Test of Independence

OBSERVED TABLE

Prof A’s Class

Prof B’s Class

Prof C’s Class

Students enrolled 31 25 10

A goodness-of-fit test is a one variable Chi-square test.

Page 144: Chi-Square Test of Independence

A test of independence is a two variable Chi-square test.

Page 145: Chi-Square Test of Independence

A test of independence is a two variable Chi-square test.For example, a department chair wants to know if women and men enrollments are equally distributed across three professor classes.

Page 146: Chi-Square Test of Independence

A test of independence is a two variable Chi-square test.For example, a department chair wants to know if women and men enrollments are equally distributed across three professor classes.

OBSERVED TABLE

Prof A’s Class

Prof B’s Class

Prof C’s Class

Men 21 7 7Women 10 18 3

Page 147: Chi-Square Test of Independence

A test of independence is a two variable (gender) Chi-square test.

OBSERVED TABLE

Prof A’s Class

Prof B’s Class

Prof C’s Class

Men 21 7 7Women 10 18 3