Chi-Square Test of Independence

Preview:

DESCRIPTION

Chi-Square Test of Independence

Citation preview

Chi Square Test of Independence

Conceptual

Questions 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.

Like the higher the temperature the stronger people are.

Like the higher the temperature the stronger people are.

Questions of Independence are often posed as questions of bias.

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

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”.

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

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

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

Failure to be independent would indicate bias.

Failure to be independent would indicate bias.

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

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

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.

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.

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:

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

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

Solution:

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

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

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’

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.

As you can see we have the observed table below:

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

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

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

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

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

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.

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

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

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.

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.

Men Women________________________________________Voted 2792 3591Didn't vote 1486 2131

Total Who Voted

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

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

Total Who Did Not

Vote

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

= 4278

Total Men

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

4278 = 5722

Total Women

Total Men & Women or Total Voted/Not Voted

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

4278 5722 10000

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”:

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)

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

4278 5722 10000

Men Who Voted

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)

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

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)

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)

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)

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)

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)

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

4278 5722 10000

What is the expected value for Women who

Voted?

Women who voted:

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

4278 5722 10000

Women who voted:

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)

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)

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)

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)

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

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

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

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?

Men who didn’t vote:

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

4278 5722 10000

Men who didn’t vote:

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)

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)

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)

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)

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))

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))

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?

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

4278 5722 10000

Women who didn’t vote:

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)

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)

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)

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)

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)

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)

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

4278 5722 10000

Men who didn’t vote:

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

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.

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:

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

𝐸

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

𝑥2=(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

𝑥2=𝚺 (𝑂−𝐸)2

𝐸𝑥2=𝚺 (𝑂−𝐸)2

𝐸

Or in this case:

𝑥2=(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸+

(𝑂−𝐸)2

𝐸+(𝑂−𝐸)2

𝐸

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

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

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

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

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

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

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

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

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

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

𝐸

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

𝐸

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

𝐸

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

𝐸

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

𝐸

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

𝐸

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

𝐸

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

𝐸

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

Time to Calculate:

Time to Calculate:

𝑥2=(2792−2731)2

2731+(3591−3652)2

3652+

(1486−1547)2

1547+(2131−2070)2

2070

Time to Calculate:

𝑥2=(61)2

2731+

(3591−3652)2

3652+(1486−1547)2

1547+(2131−2070)2

2070

Time to Calculate:

𝑥2=37212731

+(3591−3652)2

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Time to Calculate:

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

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Time to Calculate:

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

3652+(1486−1547)2

1547+

(2131−2070)2

2070

Time to Calculate:

𝑥2=1 .4+ 37213652

+(1486−1547 )2

1547+(2131−2070)2

2070

Time to Calculate:

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

1547+(2131−2070)2

2070

Time to Calculate:

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

1547+(2131−2070)2

2070

Time to Calculate:

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

+(2131−2070)2

2070

Time to Calculate:

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

2070

Time to Calculate:

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

2070

Time to Calculate:

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

Time to Calculate:

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

Time to Calculate:

𝑥2=6.6

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

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

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.

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.

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.

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

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:

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 … … … …

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:

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 .

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

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.

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.

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.

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

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

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.

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:

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

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

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.

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

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.

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

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

Recommended