Steply

Chi-square independence: east 50 agree 50 disagree, west 65 agree 35…

Step by step, with the reason for every step · Chi-square · University Statistics

Step by step

The question

Question: east: 50 agree, 50 disagree; west: 65 agree, 35 disagree: at the 5% level, is the answer linked to the group?

east: 50 agree, 50 disagree; west: 65 agree, 35 disagree; α = 0.05

1 Write the hypotheses

H₀ is the "nothing new" idea.

Here: the group and the answer are independent.

H0 : the group and the answer are independent

Hₐ is what we want to show.

Here: the group and the answer are not independent.

Ha : the group and the answer are not independent

Independent means no link: the answer does not depend on the group.

independent: no link, the answer does not depend on the group

2 Totals

The counts in a table.

Each row's total: east, 100; west, 100.

Each column's total: agree, 115; disagree, 85.

And everyone: 200.

3 Expected counts

If there is no link, each cell expects its row total times its column total, over the grand total.

E = row total × column totaltotal

East, agree: 100 times 115, over 200, is 57.5.

= east, agree: 100 × 115 ÷ 200 = 57.5

East, disagree: 100 times 85, over 200, is 42.5.

= east, disagree: 100 × 85 ÷ 200 = 42.5

West, agree: 100 times 115, over 200, is 57.5.

= west, agree: 100 × 115 ÷ 200 = 57.5

West, disagree: 100 times 85, over 200, is 42.5.

= west, disagree: 100 × 85 ÷ 200 = 42.5

4 Each part

Chi-square adds up, for each cell, the observed minus the expected, squared, over the expected.

χ2 = add up all (O − E)2E

A table: each cell, what we saw, O, and what we expected, E.

50 minus 57.5 is −7.5.

Squared, 56.25.

Over 57.5: 0.9783.

50 minus 42.5 is 7.5.

Squared, 56.25.

Over 42.5: 1.3235.

65 minus 57.5 is 7.5.

Squared, 56.25.

Over 57.5: 0.9783.

35 minus 42.5 is −7.5.

Squared, 56.25.

Over 42.5: 1.3235.

5 Add them

0.9783 plus 1.3235 plus 0.9783 plus 1.3235 is 4.6036.

χ2 = 0.9783 + 1.3235 + 0.9783 + 1.3235 = 4.6036

6 The cut-off

df is rows minus 1, times columns minus 1: 1 times 1 is 1.

df = (rows − 1)(columns − 1) = (2 − 1)(2 − 1) = 1

Careful!

Not the number of cells minus 1.

Rows minus 1, times columns minus 1: 1.

Careful: not df = 3 ✗

Chi-square is always a right-tail test: big means far from what we expected.

Row 1, column 0.05.

Row 1, column .05: the cut-off is 3.841.

7 Decide

The chi-square curve for df 1.

Past the cut-off, 3.841, is the reject part.

4.6036 is past the cut-off.

So we reject H zero.

= χ2 = 4.6036 > 3.841 → reject H0

8 Say it in words

At the 5% level, there is enough evidence that

In words: at the 5% level, there is enough evidence that the group and the answer are not independent.

the group and the answer are not independent.

9 Check

Let's check: the expected counts give the same row totals.

East: 57.5 plus 42.5 is 100.

east: E 57.5 + 42.5 = 100 = 100

West: 57.5 plus 42.5 is 100.

So it is right!

west: E 57.5 + 42.5 = 100 = 100

Let's look back.

First: write the hypotheses.

Then: totals.

Then: expected counts.

Then: each part.

Then: add them.

Then: the cut-off.

Then: decide.

Then: say it in words.

Last: check.

Answer
= χ2 = 4.6036 > 3.841 → reject H0

Your turn

Try this one yourself, then check:

east: 100 agree, 101 disagree; west: 70 agree, 131 disagree; α = 0.05
Show the answer
reject H0

More from Chi-square

The whole lesson: Chi-square →