Steply

Chi-square independence: small 12 low 18 high, medium 20 low 20…

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

Step by step

The question

Question: small: 12 low, 18 high; medium: 20 low, 20 high; large: 28 low, 12 high: at the 1% level, is the answer linked to the group?

small: 12 low, 18 high; medium: 20 low, 20 high; large: 28 low, 12 high; α = 0.01

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: small, 30; medium, 40; large, 40.

Each column's total: low, 60; high, 50.

And everyone: 110.

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

Small, low: 30 times 60, over 110, is about 16.3636.

= small, low: 30 × 60 ÷ 110 ≈ 16.3636

Small, high: 30 times 50, over 110, is about 13.6364.

= small, high: 30 × 50 ÷ 110 ≈ 13.6364

Medium, low: 40 times 60, over 110, is about 21.8182.

= medium, low: 40 × 60 ÷ 110 ≈ 21.8182

Medium, high: 40 times 50, over 110, is about 18.1818.

= medium, high: 40 × 50 ÷ 110 ≈ 18.1818

Large, low: 40 times 60, over 110, is about 21.8182.

= large, low: 40 × 60 ÷ 110 ≈ 21.8182

Large, high: 40 times 50, over 110, is about 18.1818.

= large, high: 40 × 50 ÷ 110 ≈ 18.1818

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.

12 minus 16.3636 is −4.3636.

Squared, 19.041.

Over 16.3636: 1.1636.

18 minus 13.6364 is 4.3636.

Squared, 19.041.

Over 13.6364: 1.3963.

20 minus 21.8182 is −1.8182.

Squared, 3.3059.

Over 21.8182: 0.1515.

20 minus 18.1818 is 1.8182.

Squared, 3.3059.

Over 18.1818: 0.1818.

28 minus 21.8182 is 6.1818.

Squared, 38.2147.

Over 21.8182: 1.7515.

12 minus 18.1818 is −6.1818.

Squared, 38.2147.

Over 18.1818: 2.1018.

5 Add them

1.1636 plus 1.3963 plus 0.1515 plus 0.1818 plus 1.7515 plus 2.1018 is 6.7465.

χ2 = 1.1636 + 1.3963 + 0.1515 + 0.1818 + 1.7515 + 2.1018 = 6.7465

6 The cut-off

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

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

Careful!

Not the number of cells minus 1.

Rows minus 1, times columns minus 1: 2.

Careful: not df = 5 ✗

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

Row 2, column 0.01.

Row 2, column .01: the cut-off is 9.210.

7 Decide

The chi-square curve for df 2.

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

6.7465 is not past the cut-off.

So we do not reject H zero.

= χ2 = 6.7465 < 9.210 → do not reject H0

8 Say it in words

At the 1% level, there is not enough evidence that

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

the group and the answer are not independent.

This does not prove H zero is true.

We just cannot rule it out.

not rejecting H0 does not prove H0

9 Check

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

Small: 16.3636 plus 13.6364 is 30.

small: E 16.3636 + 13.6364 = 30 = 30

Medium: 21.8182 plus 18.1818 is 40.

medium: E 21.8182 + 18.1818 = 40 = 40

Large: 21.8182 plus 18.1818 is 40.

So it is right!

large: E 21.8182 + 18.1818 = 40 = 40

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 = 6.7465 < 9.210 → do not reject H0

Your turn

Try this one yourself, then check:

small: 20 low, 20 high; medium: 13 low, 29 high; large: 18 low, 12 high; α = 0.01
Show the answer
do not reject H0

More from Chi-square

The whole lesson: Chi-square →