Steply

Chi-square goodness of fit: observed 28, 22, 50; expected 25%, 25%…

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

Step by step

The question

Question: we saw the counts 28, 22, 50, and expected 25%, 25%, 50%: at the 10% level, do the data fit?

observed 28, 22, 50; expected 25%, 25%, 50%; α = 0.1

1 Write the hypotheses

H₀ is the "nothing new" idea.

Here: the data fit the expected parts.

H0 : the data fit the expected parts

Hₐ is what we want to show.

Here: the data do not fit.

Ha : the data do not fit

2 Expected counts

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

E = n × p (if H0 is true)

A: 100 times 0.25 is 25.

E(A) = 100 × 0.25 = 25

B: 100 times 0.25 is 25.

E(B) = 100 × 0.25 = 25

C: 100 times 0.5 is 50.

E(C) = 100 × 0.5 = 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.

28 minus 25 is 3.

Squared, 9.

Over 25: 0.36.

22 minus 25 is −3.

Squared, 9.

Over 25: 0.36.

50 minus 50 is 0.

Squared, 0.

Over 50: 0.

Careful!

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

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

4 Add them

0.36 plus 0.36 plus 0 is 0.72.

χ2 = 0.36 + 0.36 + 0 = 0.72

5 The cut-off

df is the number of cells minus 1: 3 minus 1 is 2.

df = k − 1 = 3 − 1 = 2

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.

6 Decide

The chi-square curve for df 2.

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

0.72 is not past the cut-off.

So we do not reject H zero.

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

7 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 data do not fit.

the data do not fit.

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 100, like the observed ones.

E: 25 + 25 + 50 = 100 = n

And the differences O minus E add up to 0.

So it is right!

O − E: 3 + (−3) + 0 = 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 = 0.72 < 4.605 → do not reject H0

Your turn

Try this one yourself, then check:

observed 22, 28, 50; expected 25%, 25%, 50%; α = 0.1
Show the answer
do not reject H0

More from Chi-square

The whole lesson: Chi-square →