Maths4UBETA

Goodness of fit with a specified discrete model

Compare complete frequency patterns, using model probabilities rather than observed proportions.

Try the quick check →
Lesson 1 of 4

Section 1 of 6 · Core · about 6 min

How do probabilities become expected counts?

The expected total equals the observed total because all possible outcomes are accounted for.

Worked example

Expected count from a uniform model

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 11717
Stage 21515
Stage 31212
Stage 41616

Find the expected frequency for Stage 2. Give an exact value.

  1. Ei=60P(X is in class i)E_i=60\mathrm{P}(X\text{ is in class }i)

  2. Final classObservedExpectedContribution
    Stage 117171515415\frac{4}{15}
    Stage 21515151500
    Stage 31212151535\frac{3}{5}
    Stage 416161515115\frac{1}{15}
  3. The statistic is 1415\frac{14}{15} with ν=4−1−0=3\nu=4-1-0=3 degrees of freedom. The 5% upper critical value is 7.8157.815.

    There is insufficient evidence against the claim that the stated model fits the data.

Worked example

A fractional expectation

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 310, 15, 110, 25\frac{3}{10},\ \frac{1}{5},\ \frac{1}{10},\ \frac{2}{5}.

CategoryObserved
Amber2121
Blue1919
Coral1414
Denim1111

Find the expected frequency for Blue. Give an exact value.

Try it on paper first.

  1. Ei=65P(X is in class i)E_i=65\mathrm{P}(X\text{ is in class }i)

  2. Final classObservedExpectedContribution
    Amber2121392\frac{39}{2}326\frac{3}{26}
    Blue191913133613\frac{36}{13}
    Coral1414132\frac{13}{2}22526\frac{225}{26}
    Denim1111262622526\frac{225}{26}
  3. The statistic is 52526\frac{525}{26} with ν=4−1−0=3\nu=4-1-0=3 degrees of freedom. The 5% upper critical value is 7.8157.815.

    There is evidence against the claim that the producer’s model gives the colour proportions.

Your turn

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 310, 15, 110, 25\frac{3}{10},\ \frac{1}{5},\ \frac{1}{10},\ \frac{2}{5}.

CategoryObserved
Amber1818
Blue2222
Coral1414
Denim66

Find the expected frequency for Blue. Give an exact value.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 2 of 6 · Core · about 7 min

What makes a class contribute strongly?

The same absolute difference matters more when the expected count is small.

Worked example

A single contribution

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 25, 310, 15, 110\frac{2}{5},\ \frac{3}{10},\ \frac{1}{5},\ \frac{1}{10}.

CategoryObserved
Amber2424
Blue1818
Coral1313
Denim55

Find the contribution of Amber to the statistic. Give an exact value.

  1. Ei=60P(X is in class i)E_i=60\mathrm{P}(X\text{ is in class }i)

  2. Final classObservedExpectedContribution
    Amber2424242400
    Blue1818181800
    Coral13131212112\frac{1}{12}
    Denim556616\frac{1}{6}
  3. The statistic is 14\frac{1}{4} with ν=4−1−0=3\nu=4-1-0=3 degrees of freedom. The 5% upper critical value is 7.8157.815.

    There is insufficient evidence against the claim that the producer’s model gives the colour proportions.

Your turn

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 11111
Stage 21313
Stage 31919
Stage 41717

Find the contribution of Stage 3 to the statistic. Give an exact value.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 3 of 6 · Core · about 7 min

When do classes need pooling?

Inspect the expected counts before the test.

Worked example

Pool the rare categories

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber2929
Blue3434
Coral1818
Denim33

Apply the expected frequency rule. Give the number of classes left and the expected frequency for Coral–Denim.

  1. Ei=84P(X is in class i)E_i=84\mathrm{P}(X\text{ is in class }i)

  2. Pool adjacent classes before finding contributions, keeping both totals fixed.

    Final classObservedExpectedContribution
    Amber29292828128\frac{1}{28}
    Blue3434282897\frac{9}{7}
    Coral–Denim2121282874\frac{7}{4}
  3. The statistic is 4314\frac{43}{14} with ν=3−1−0=2\nu=3-1-0=2 degrees of freedom. The 5% upper critical value is 5.9915.991.

    There is insufficient evidence against the claim that the producer’s model gives the colour proportions.

Your turn

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber2525
Blue3131
Coral2424
Denim44

Apply the expected frequency rule. Give the number of classes left and the expected frequency for Coral–Denim.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 4 of 6 · Core · about 7 min

How do I count degrees of freedom?

The fixed total is one constraint across the final counts.

Worked example

The final number of classes

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber2727
Blue3131
Coral2222
Denim44

Give the degrees of freedom after any grouping.

  1. Ei=84P(X is in class i)E_i=84\mathrm{P}(X\text{ is in class }i)

  2. Pool adjacent classes before finding contributions, keeping both totals fixed.

    Final classObservedExpectedContribution
    Amber27272828128\frac{1}{28}
    Blue31312828928\frac{9}{28}
    Coral–Denim2626282817\frac{1}{7}
  3. The statistic is 12\frac{1}{2} with ν=3−1−0=2\nu=3-1-0=2 degrees of freedom. The 5% upper critical value is 5.9915.991.

    There is insufficient evidence against the claim that the producer’s model gives the colour proportions.

Your turn

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 199
Stage 21111
Stage 377
Stage 41313

Give the degrees of freedom after any grouping.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Section 5 of 6 · Core · about 7 min

Which tail measures disagreement?

Squaring each discrepancy makes the statistic non-negative.

Chi-squared curve with 3 degrees of freedom and the upper 5 per cent shaded.

With 3 degrees of freedom the upper 5% begins at about 7.8157.815.

Worked example

Use a right-tail probability

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 11010
Stage 21414
Stage 32424
Stage 41212

Find the upper-tail probability to 4 decimal places and decide at the 5% level.

  1. Ei=60P(X is in class i)E_i=60\mathrm{P}(X\text{ is in class }i)

  2. Final classObservedExpectedContribution
    Stage 11010151553\frac{5}{3}
    Stage 214141515115\frac{1}{15}
    Stage 324241515275\frac{27}{5}
    Stage 41212151535\frac{3}{5}
  3. The right-tail probability is 0.05190.0519.

  4. The statistic is 11615\frac{116}{15} with ν=4−1−0=3\nu=4-1-0=3 degrees of freedom. The 5% upper critical value is 7.8157.815.

    There is insufficient evidence against the claim that the stated model fits the data.

Your turn

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 11818
Stage 21414
Stage 31212
Stage 41616

Find the upper-tail probability to 4 decimal places and decide at the 5% level.

Keep intermediate values unrounded. Round the final answer to 4 decimal places.

Give your answer to 4 decimal places.

Decision

Section 6 of 6 · Extension · about 6 min

How do I present the complete test?

Give the hypotheses in words, retain enough working to justify the statistic, then interpret the decision.

Worked example

Decide whether the model fits

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 13030
Stage 21414
Stage 31010
Stage 466

Calculate the statistic and decide at the 5% level. Give the statistic exactly.

  1. Ei=60P(X is in class i)E_i=60\mathrm{P}(X\text{ is in class }i)

  2. Final classObservedExpectedContribution
    Stage 1303015151515
    Stage 214141515115\frac{1}{15}
    Stage 31010151553\frac{5}{3}
    Stage 4661515275\frac{27}{5}
  3. The statistic is 33215\frac{332}{15} with ν=4−1−0=3\nu=4-1-0=3 degrees of freedom. The 5% upper critical value is 7.8157.815.

    There is evidence against the claim that the stated model fits the data.

Your turn

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber1717
Blue3030
Coral3434
Denim33

Calculate the statistic and decide at the 5% level. Give the statistic exactly.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Decision

Worked examples

Practise the method

Core practice

Question 1 of 4

0 / 4 checked in this collection

Question list

Core practice

Fresh variants

Exam-style

All expectations and the full statistic

4 marks

A specified categorical model has probabilities (12,13,16)(\frac{1}{2},\frac{1}{3},\frac{1}{6}). For 120 independent observations, the counts are (54,44,22)(54,44,22). Give all three expected counts and Pearson’s statistic exactly.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Enter an exact number, for example 3/2 or 2-sqrt(3).

Full answer-format guide

Exact numbers: 3/2, sqrt(5), 2-sqrt(3), pi/6, 3*pi/2. Sets: {1,4}. Intervals: (3,5]; a round bracket excludes the endpoint. Infinity: inf; union: U; no solutions: empty. Separate coordinate pairs or triples with semicolons. Expressions: 2x^2+3x-1; equations: x^2=3x+1 or the polynomial equal to zero. Factors: x-1 ; x+2. Parameter fraction: numerator ; denominator. List integer answers individually.

Review the method

Progress stays in this browser. Create an account to save it or sign in.

Extra practice from this lesson

Find an expectation for Stage 4

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 12222
Stage 22020
Stage 31717
Stage 41616

Find the expected frequency for Stage 4. Give an exact value.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Compare a class with its model

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 15, 110, 25, 310\frac{1}{5},\ \frac{1}{10},\ \frac{2}{5},\ \frac{3}{10}.

CategoryObserved
Amber2626
Blue1717
Coral1212
Denim55

Find the contribution of Coral to the statistic. Give an exact value.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Use the reduced list of classes

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber2525
Blue3030
Coral2525
Denim44

Give the degrees of freedom after any grouping.

Enter an exact number, for example 3/2 or 2-sqrt(3).

A difference at the 1% level

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 12525
Stage 21616
Stage 31313
Stage 466

Calculate the statistic and decide at the 1% level. Give the statistic exactly.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Decision

Change the significance level

A device selects one of four equally likely stages under the proposed model. Independent selections were recorded.

CategoryObserved
Stage 12323
Stage 21616
Stage 31313
Stage 488

Calculate the statistic and decide at the 10% level. Give the statistic exactly.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Decision

Interpret a close fit

An independent sample of colour cards is compared with the producer’s proportions. Under the proposed model the class probabilities in order are 13, 13, 27, 121\frac{1}{3},\ \frac{1}{3},\ \frac{2}{7},\ \frac{1}{21}.

CategoryObserved
Amber3131
Blue3030
Coral2020
Denim33

Calculate the statistic and decide at the 5% level. Give the statistic exactly.

Enter an exact number, for example 3/2 or 2-sqrt(3).

Decision

Apply it · original exam-style problems

Show your working on paper and compare it with the worked solution and marking guidance.

Come back to what needs practice

Quick revision sheet (A4)

Your review plan starts after your first check.