---
source: https://iinventedlight.com/library/notes/chi-square-goodness-of-fit-test.md
title: "How a goodness-of-fit test checks whether data match a stated distribution"
license: CC-BY-4.0
license_url: https://creativecommons.org/licenses/by/4.0/
source_license: "CC-BY-4.0 (OpenStax Introductory Statistics); US government work, public domain (National Institute of Standards and Technology); prose restates cited source lines in own words"
license_family: mixed-green
attribution: "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)."
author: "iinventedlight (synthesis of cited sources); text drafted with AI assistance"
date: 2026-11-26
status: published
approved_by: "Cole Withington, 2026-11-27 14:30 PT: \"Yes, publish all of that now\""
checked_on: 2026-11-26
as_of: 2026-11-26
confidence: medium
untested: "Not reproduced (2026-11-26). Official texts and source files were read; no classroom, exam, or official filing was done for this note."
category: coverage-gaps
topic_area: "tutor-math: chi-square-goodness-of-fit-test"
tags: [goodness-of-fit, chi-square, expected-counts, hypothesis-testing, introductory-statistics, tutoring]
client: Librarian
sources:
  - id: S1
    title: "11.2 Goodness-of-Fit Test"
    publisher: OpenStax Introductory Statistics
    url: https://openstax.org/books/introductory-statistics/pages/11-2-goodness-of-fit-test
    accessed: 2026-11-26
    license: "CC-BY-4.0"
  - id: S2
    title: "Do the observations come from a particular distribution?"
    publisher: National Institute of Standards and Technology
    url: https://www.itl.nist.gov/div898/handbook/prc/section2/prc21.htm
    accessed: 2026-11-26
    license: "US government work, public domain"
---
# 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

- [goodness-of-fit-test](https://iinventedlight.com/library/notes/goodness-of-fit-test/)
- [chi-square-distribution](https://iinventedlight.com/library/notes/chi-square-distribution/)
- [test-of-independence](https://iinventedlight.com/library/notes/test-of-independence/)

## Claims

- id: C1
  claim: The test checks whether a sample comes from a stated distribution.
  source: S2
  evidence: "a random sample comes from a specific distribution"

- id: C2
  claim: Data are often assumed to come from a particular distribution.
  source: S2
  evidence: "Data are often assumed to come from a particular distribution."

- id: C3
  claim: Observed values are data, and expected values come from the theory or null model.
  source: S1
  evidence: "O = observed values (data) E = expected values (from theory)"

## Sources

- [S1] 11.2 Goodness-of-Fit Test. OpenStax Introductory Statistics. https://openstax.org/books/introductory-statistics/pages/11-2-goodness-of-fit-test . License: CC-BY-4.0. Accessed 2026-11-26.

- [S2] Do the observations come from a particular distribution?. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/prc/section2/prc21.htm . License: US government work, public domain. Accessed 2026-11-26.

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.

---

Agents: [/agents.md](/agents.md) | [/.well-known/agent-library.json](/.well-known/agent-library.json).
