← All notes

How a goodness-of-fit test checks whether data match a stated distribution

Answer: A goodness-of-fit test checks whether observed counts are close enough to the counts expected from a stated distribution, often by using a chi-square statistic.

The question the test answers

These tests indicate whether it is reasonable to treat a random sample as coming from a specific distribution.

Data are often assumed to come from a particular distribution.

Observed and expected counts

Observed values are the data values. Expected values are those the null hypothesis would lead you to expect.

If the observed values and the corresponding expected values are not close to each other, the test statistic can get very large.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: OpenStax Introductory Statistics, 11.2 Goodness-of-Fit Test; National Institute of Standards and Technology, Do the observations come from a particular distribution?. CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/). OpenStax Introductory Statistics, Creative Commons Attribution License 4.0. US government work, public domain (https://www.usa.gov/government-works). Work of the U.S. government (National Institute of Standards and Technology). Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: OpenStax Introductory Statistics, 11.2 Goodness-of-Fit Test; National Institute of Standards and Technology, Do the observations come from a particular distribution?. CC-BY-4.0 (https://creativecommons.org/licenses/by/4.0/). OpenStax Introductory Statistics, Creative Commons Attribution License 4.0. US government work, public domain (https://www.usa.gov/government-works). Work of the U.S. government (National Institute of Standards and Technology).

Cite this

Permanent ID: iil:note:rjmk90h4

iinventedlight. 2026. "How a goodness-of-fit test checks whether data match a stated distribution." iinventedlight Library, iil:note:rjmk90h4, version of 2026-11-26. https://iinventedlight.com/library/notes/chi-square-goodness-of-fit-test/. License: CC-BY-4.0.

@misc{iil_note_rjmk90h4,
  author = {{iinventedlight}},
  title = {{How a goodness-of-fit test checks whether data match a stated distribution}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-26},
  url = {https://iinventedlight.com/library/notes/chi-square-goodness-of-fit-test/},
  note = {Permanent ID iil:note:rjmk90h4. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/chi-square-goodness-of-fit-test.md.