Maths4UBETA

Goodness of fit for continuous distributions

Calculate class probabilities from areas or a CDF and retain the entire model support.

Try the quick check →
Lesson 3 of 4

Section 1 of 6 · Core · about 6 min

How do interval widths affect expected counts?

A uniform model puts equal probability into equal lengths.

Worked example

Use a uniform distribution on four intervals

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 10.

CategoryObserved
0–11111
1–42727
4–84040
8–102222

Find the expected frequency for 1–4. Give an exact value.

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

  2. Final classObservedExpectedContribution
    0–111111010110\frac{1}{10}
    1–427273030310\frac{3}{10}
    4–84040404000
    8–102222202015\frac{1}{5}
  3. The statistic is 35\frac{3}{5} 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 distribution models the drying times.

Worked example

Two intervals with distinct widths

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 2 to 12.

CategoryObserved
2–41919
4–62424
6–92323
9–123434

Find the contribution of 4–6 to the statistic. Give an exact value.

Try it on paper first.

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

  2. Final classObservedExpectedContribution
    2–419192020120\frac{1}{20}
    4–62424202045\frac{4}{5}
    6–9232330304930\frac{49}{30}
    9–1234343030815\frac{8}{15}
  3. The statistic is 18160\frac{181}{60} 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 distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 10.

CategoryObserved
0–11010
1–32525
3–84545
8–102020

Find the expected frequency for 3–8. Give an exact value.

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

Section 2 of 6 · Core · about 7 min

How can I turn a density into a frequency?

The area under the density over a class gives its probability.

Worked example

Find the expected count from a rising density

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–31111
3–61919
6–83030
8–104040

Find the expected frequency for 3–6. Give an exact value.

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

  2. Final classObservedExpectedContribution
    0–311119949\frac{4}{9}
    3–6191927276427\frac{64}{27}
    6–83030282817\frac{1}{7}
    8–104040363649\frac{4}{9}
  3. The statistic is 643189\frac{643}{189} 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 distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–31010
3–52020
5–83434
8–103636

Find the expected frequency for 8–10. Give an exact value.

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

Section 3 of 6 · Core · about 7 min

Which CDF values do I subtract?

For a continuous distribution the exact class endpoint conventions do not affect the probability.

Worked example

Use a CDF difference over the middle class

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50−150f(x)=\frac{x}{50} - \frac{1}{50} on the stated range, and zero elsewhere on the range 1 to 11.

CategoryObserved
1–444
4–61616
6–93535
9–114545

Find the contribution of 6–9 to the statistic. Give an exact value.

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

  2. Final classObservedExpectedContribution
    1–44499259\frac{25}{9}
    4–61616161600
    6–9353539391639\frac{16}{39}
    9–114545363694\frac{9}{4}
  3. The statistic is 2545468\frac{2545}{468} 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 distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–31111
3–62020
6–83737
8–103232

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

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

Section 4 of 6 · Core · about 7 min

What happens when the first interval is too small?

Intervals at the edge of a continuous model may carry little probability.

Worked example

Join the first two intervals

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–244
2–52020
5–83434
8–104242

Apply the expected frequency rule. Give the number of classes left and the expected frequency for 0–2–2–5.

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

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

    Final classObservedExpectedContribution
    0–2–2–524242525125\frac{1}{25}
    5–8343439392539\frac{25}{39}
    8–104242363611
  3. The statistic is 1639975\frac{1639}{975} 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 stated distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–122
1–41717
4–83737
8–104444

Find the contribution of 0–1–1–4 to the statistic. Give an exact value.

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

Section 5 of 6 · Core · about 7 min

How do I complete a continuous-model test?

Once the expected counts are in the table the same goodness-of-fit procedure applies.

Worked example

A right-tailed test from continuous class counts

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 10.

CategoryObserved
0–21010
2–42626
4–72626
7–103838

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

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

  2. Final classObservedExpectedContribution
    0–21010202055
    2–42626202095\frac{9}{5}
    4–726263030815\frac{8}{15}
    7–10383830303215\frac{32}{15}
  3. The right-tail probability is 0.02370.0237.

  4. The statistic is 14215\frac{142}{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 distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–233
2–51919
5–73030
7–104848

Give the degrees of freedom after any grouping.

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

Section 6 of 6 · Extension · about 6 min

Can unequal widths be used in a full test?

Show both the parameter assumptions and the class boundaries. Compute each expectation using its own interval.

Worked example

Test a full set of unequal-width classes

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–277
2–31616
3–63333
6–104444

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

  1. Use CDF differences on the stated support P(l<X<u)=F(u)−F(l)\mathrm P(l<X<u)=F(u)-F(l).

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

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

    Final classObservedExpectedContribution
    0–2–2–32323991969\frac{196}{9}
    3–63333272743\frac{4}{3}
    6–1044446464254\frac{25}{4}
  3. The statistic is 105736\frac{1057}{36} with ν=3−1−0=2\nu=3-1-0=2 degrees of freedom. The 5% upper critical value is 5.9915.991.

    There is evidence against the claim that the stated distribution models the drying times.

Your turn

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 10.

CategoryObserved
0–21616
2–42020
4–74545
7–101919

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

Areas, expectations and a complete statistic

3 marks

The specified density is x2\frac{x}{2} on [0,2][0,2], zero elsewhere. In 80 independent readings, the counts below and at/above 1 are (18,62)(18,62). Give both 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).

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

Interpret equal-width intervals

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 8.

CategoryObserved
0–22828
2–41919
4–62727
6–82626

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

Find a shifted-support expectation

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50−125f(x)=\frac{x}{50} - \frac{1}{25} on the stated range, and zero elsewhere on the range 2 to 12.

CategoryObserved
2–599
5–71818
7–102828
10–124545

Find the expected frequency for 5–7. Give an exact value.

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

Combine first and second classes

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–111
1–377
3–63636
6–105656

Apply the expected frequency rule. Give the number of classes left and the expected frequency for 0–1–1–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).

Check a model with gaps in counts

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 0 to 10.

CategoryObserved
0–200
2–42424
4–73131
7–104545

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

Evaluate a larger grouping discrepancy

The table records a sample of independent drying times in minutes. The distribution is proposed to have density f(x)=x50f(x)=\frac{x}{50} on the stated range, and zero elsewhere on the range 0 to 10.

CategoryObserved
0–222
2–32525
3–72727
7–104646

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

Use all the class widths at once

The table records a sample of independent drying times in minutes. The distribution is proposed to be uniform on the range 2 to 12.

CategoryObserved
2–355
3–499
4–84141
8–124545

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.