Steply

Chi-square independence: boys 10 math 15 art 25 sport, girls 15 math…

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

Step by step

The question

Question: boys: 10 math, 15 art, 25 sport; girls: 15 math, 20 art, 15 sport: at the 10% level, is the answer linked to the group?

boys: 10 math, 15 art, 25 sport; girls: 15 math, 20 art, 15 sport; α = 0.1

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: boys, 50; girls, 50.

Each column's total: math, 25; art, 35; sport, 40.

And everyone: 100.

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

Boys, math: 50 times 25, over 100, is 12.5.

= boys, math: 50 × 25 ÷ 100 = 12.5

Boys, art: 50 times 35, over 100, is 17.5.

= boys, art: 50 × 35 ÷ 100 = 17.5

Boys, sport: 50 times 40, over 100, is 20.

= boys, sport: 50 × 40 ÷ 100 = 20

Girls, math: 50 times 25, over 100, is 12.5.

= girls, math: 50 × 25 ÷ 100 = 12.5

Girls, art: 50 times 35, over 100, is 17.5.

= girls, art: 50 × 35 ÷ 100 = 17.5

Girls, sport: 50 times 40, over 100, is 20.

= girls, sport: 50 × 40 ÷ 100 = 20

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.

10 minus 12.5 is −2.5.

Squared, 6.25.

Over 12.5: 0.5.

15 minus 17.5 is −2.5.

Squared, 6.25.

Over 17.5: 0.3571.

25 minus 20 is 5.

Squared, 25.

Over 20: 1.25.

15 minus 12.5 is 2.5.

Squared, 6.25.

Over 12.5: 0.5.

20 minus 17.5 is 2.5.

Squared, 6.25.

Over 17.5: 0.3571.

15 minus 20 is −5.

Squared, 25.

Over 20: 1.25.

5 Add them

0.5 plus 0.3571 plus 1.25 plus 0.5 plus 0.3571 plus 1.25 is 4.2142.

χ2 = 0.5 + 0.3571 + 1.25 + 0.5 + 0.3571 + 1.25 = 4.2142

6 The cut-off

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

df = (rows − 1)(columns − 1) = (2 − 1)(3 − 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.1.

Row 2, column .10: the cut-off is 4.605.

7 Decide

The chi-square curve for df 2.

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

4.2142 is not past the cut-off.

So we do not reject H zero.

= χ2 = 4.2142 < 4.605 → do not reject H0

8 Say it in words

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

In words: at the 10% 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.

Boys: 12.5 plus 17.5 plus 20 is 50.

boys: E 12.5 + 17.5 + 20 = 50 = 50

Girls: 12.5 plus 17.5 plus 20 is 50.

So it is right!

girls: E 12.5 + 17.5 + 20 = 50 = 50

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.2142 < 4.605 → do not reject H0

Your turn

Try this one yourself, then check:

boys: 16 math, 16 art, 20 sport; girls: 10 math, 25 art, 15 sport; α = 0.1
Show the answer
do not reject H0

More from Chi-square

The whole lesson: Chi-square →