Steply

Chi-square: a die is rolled 300 times: 42, 55, 38, 61, 50, 54; is it…

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

Step by step

The question

Question: a die is rolled 300 times, and the faces 1 to 6 come up 42, 55, 38, 61, 50, 54 times: at the 5% level, is the die fair?

a die, 300 rolls: 42, 55, 38, 61, 50, 54; fair? α = 0.05

1 Write the hypotheses

H₀ is the "nothing new" idea.

Here: the die is fair.

H0 : the die is fair

Hₐ is what we want to show.

Here: the die is not fair.

Ha : the die is not fair

2 Expected counts

If H zero is true, each cell expects n times its part.

E = n × p (if H0 is true)

Each face: 300 times 1/6 is 50.

E = 300 × 16 = 50

Every expected count is at least 5, so the test works.

all E at least 5: the test works

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

42 minus 50 is −8.

Squared, 64.

Over 50: 1.28.

55 minus 50 is 5.

Squared, 25.

Over 50: 0.5.

38 minus 50 is −12.

Squared, 144.

Over 50: 2.88.

61 minus 50 is 11.

Squared, 121.

Over 50: 2.42.

50 minus 50 is 0.

Squared, 0.

Over 50: 0.

54 minus 50 is 4.

Squared, 16.

Over 50: 0.32.

Careful!

We always divide by the expected count, not the observed one.

Careful: divide by E (expected), not by O

4 Add them

1.28 plus 0.5 plus 2.88 plus 2.42 plus 0 plus 0.32 is 7.4.

χ2 = 1.28 + 0.5 + 2.88 + 2.42 + 0 + 0.32 = 7.4

5 The cut-off

df is the number of cells minus 1: 6 minus 1 is 5.

df = k − 1 = 6 − 1 = 5

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

Row 5, column 0.05.

Row 5, column .05: the cut-off is 11.070.

6 Decide

The chi-square curve for df 5.

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

7.4 is not past the cut-off.

So we do not reject H zero.

= χ2 = 7.4 < 11.070 → do not reject H0

7 Say it in words

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

In words: at the 5% level, there is not enough evidence that the die is not fair.

the die is not fair.

This does not prove H zero is true.

We just cannot rule it out.

not rejecting H0 does not prove H0

8 Check

Let's check: the expected counts add up to 300, like the observed ones.

E: 50 + 50 + 50 + 50 + 50 + 50 = 300 = n

And the differences O minus E add up to 0.

So it is right!

O − E: (−8) + 5 + (−12) + 11 + 0 + 4 = 0

Let's look back.

First: write the hypotheses.

Then: expected counts.

Then: each part.

Then: add them.

Then: the cut-off.

Then: decide.

Then: say it in words.

Last: check.

Answer
= χ2 = 7.4 < 11.070 → do not reject H0

Your turn

Try this one yourself, then check:

a die, 300 rolls: 54, 42, 55, 38, 61, 50; fair? α = 0.05
Show the answer
do not reject H0

More from Chi-square

The whole lesson: Chi-square →