Why Conditions Matter
A Pearson chi-square goodness-of-fit statistic measures how far observed category counts lie from the counts expected under a specified probability model. But comparing that statistic with a chi-square distribution is an approximation. The approximation is useful only when the data and the null model meet conditions that make the reference distribution reasonable. Checking those conditions is part of the analysis, not a formality to complete after calculating a statistic.
For a one-way goodness-of-fit problem, the data are counts in \(k\) categories. Under the null model, category \(i\) has probability \(p_i\), where the probabilities are specified in advance and sum to 1. The sample size is \(n\), and the expected count in category \(i\) is \(E_i=np_i\). For a fixed probability model, the chi-square reference distribution has \(k-1\) degrees of freedom, as established in the earlier material on degrees of freedom. The question here is whether the conditions justify using that calibration.
Independence of Observations
Independence concerns how the observations were generated or sampled. In a one-way goodness-of-fit analysis, each observational unit should contribute one outcome, and the outcomes from different units should not be dependent in a way that materially changes the count variation. For example, separate independent spins of a well-mixed spinner may reasonably be treated as independent trials. Several measurements from the same person generally cannot be treated as independent observations merely because they appear as separate rows.
A random sample can support independence when the sampling design is appropriate. If sampling without replacement from a finite population, a common practical check is that the sample is less than 10% of the population. This is a guideline for treating the dependence induced by sampling without replacement as negligible; it does not repair other dependence, such as sampling people in tightly connected groups.
Random selection and random assignment answer different questions. Random selection can help make a sample representative of a population, while random assignment is used in experiments to create treatment groups. A goodness-of-fit calculation does not require a randomized experiment. It does require that the count data be produced under a design and unit definition that support the independence assumption.
Worked Example: Checking Independent Spinner Outcomes
Suppose a hypothetical spinner is spun 120 times, with each spin recorded once. The null model assigns probabilities \(0.50, 0.25, 0.15,\) and \(0.10\) to four outcomes. The observed counts are 54, 34, 20, and 12. Assess the conditions relevant to chi-square calibration.
Independent outcomes. Assume the spinner is reset and spun separately each time, with no mechanism that makes one result affect the next. Under that stated setup, treating the 120 spins as independent is reasonable. If the same 120 entries instead came from repeated readings of a process that retained information from one trial to the next, independence would need further justification.
Expected counts. Multiply the total number of spins by each null probability:
All four expected counts are at least 5, so the usual expected-count guideline is satisfied. The observed counts sum to \(54+34+20+12=120\), matching the number of spins. That total check is necessary for the data description, although it does not by itself establish independence or adequate expected counts.
Categories Must Form a Complete Partition
The categories should be mutually exclusive: an observational unit belongs to no more than one category. They should also be collectively exhaustive: every unit in the analysis belongs to one of the listed categories. Together, these properties mean the categories form a partition of the possible outcomes. The observed counts must then account for the full sample, so their sum is \(n\).
A category scheme that allows overlap can count some units more than once. A scheme that omits possible outcomes can leave some units uncounted. Either problem makes the counts a poor representation of one categorical outcome per unit, and the null probabilities cannot be applied as intended. Definitions should be set before counting, and ambiguous responses should have a planned, defensible classification.
Worked Example: Auditing a Patient-Reason Classification
A hypothetical clinic samples 80 different patients from a population of 3,000 patients. For each sampled patient, a record is classified by one primary reason for a visit: infection, injury, chronic-condition care, or other. Under a specified null model, the probabilities are \(0.50, 0.30, 0.15,\) and \(0.05\). Suppose the recorded counts are 38, 25, 13, and 4. Check the design and category conditions.
Independence check. There is one record per patient, and the 80 patients are assumed to have been randomly sampled. Since \(0.10(3000)=300\) and \(80<300\), the sample is less than 10% of the population. Treating the observations as independent is reasonable under these assumptions. If some patients contributed multiple records, that conclusion would not follow.
Category check. The rule assigns exactly one primary reason to each patient, so no patient is counted in two categories. The “other” category ensures that a patient whose reason does not match the first three is still represented. The counts sum to \(38+25+13+4=80\), as required.
Expected-count check. The null expected counts are
One expected count is below 5, so the common guideline described below is not met. Thus, the sampling and category checks look reasonable, but the expected-count check raises a concern about relying on the usual chi-square calibration. A valid category scheme and independent records do not, by themselves, guarantee adequate expected counts.
Expected Counts and the Approximation
Expected counts are calculated from the null probabilities, not from the observed counts. If the null model assigns probability \(p_i\) to category \(i\), then \(E_i=np_i\). The calculation uses the same total \(n\) for each category, and the expected counts sum to \(n\) because the null probabilities sum to 1:
A widely used practical guideline is that no expected count should be less than 1 and no more than 20% of the expected counts should be less than 5. A more conservative rule, often used in introductory settings, asks that every expected count be at least 5. These are guidelines for judging an approximation, not universal mathematical cutoffs; conventions can differ. When expected counts are borderline, the analyst should explain the concern rather than present a routine chi-square calibration as automatically trustworthy.
The reason expected counts matter can be seen from the count model. Let \(I_{ji}\) equal 1 when observational unit \(j\) falls in category \(i\), and 0 otherwise. The count \(O_i\) is the sum of these indicators across the \(n\) units. Under the null model, each indicator has expected value \(p_i\). Therefore, by adding expected values,
The Pearson statistic compares each observed count with this expected count using \((O_i-E_i)^2/E_i\). When expected counts are very small, counts are sparse and discrete: a category may have only a few possible observed values near its expectation. A smooth chi-square curve can then be a poor approximation to the statistic’s null distribution. Larger expected counts make the continuous approximation more plausible, though adequacy also depends on the overall setting.
Worked Example: Diagnosing Small Expected Counts
A hypothetical survey records one response from each of 40 respondents. A fixed null model assigns probabilities \(0.70, 0.20, 0.08,\) and \(0.02\) to four mutually exclusive and exhaustive response categories. Suppose the responses are independently sampled. Check the expected-count guideline.
The expected counts are
Two of the four expected counts are below 5, so 50% are below 5, exceeding the guideline’s 20% limit. In addition, one expected count is below 1. The expected-count condition is therefore doubtful even though the responses are assumed independent and the categories are properly defined. A routine chi-square approximation should not be treated as dependable on the basis of these conditions. The appropriate response is to flag the limitation and consider a method suited to the data and question, rather than assuming that the calculation is valid because the sample total is 40.
A Practical Condition-Checking Workflow
Check the design and the expected counts before proceeding with a chi-square calibration. A useful order is to establish what one observation represents, verify how observations are classified, and only then assess the approximation using the null model.
State what contributes one outcome. Confirm that units are distinct and that repeated observations or clustering do not create unaddressed dependence.
Check that every unit is assigned to exactly one category and that no possible outcome is left out. Confirm that the category counts sum to \(n\).
For each category, compute \(E_i=np_i\) using the probabilities in the stated null model, then check the expected-count guideline.
If independence, category coverage, or expected-count adequacy is doubtful, identify which condition is at issue. Do not describe a chi-square approximation as reliable without qualification.
Common Mistakes
- Checking observed counts instead of expected counts. The approximation guideline concerns \(E_i=np_i\) under the null model. A large observed count does not turn a small expected count into an adequate one.
- Assuming a large total sample settles every condition. Even a moderately sized \(n\) can produce small expected counts when the null model assigns a small probability to a category. Calculate each expected count.
- Treating repeated records as independent people. Multiple observations from one individual may be related. Define the observational unit and check the data collection design before counting.
- Leaving outcomes unclassified or double-counting them. Categories must be both exhaustive and mutually exclusive. A total that does not equal \(n\) is a warning to revisit the classification and data accounting.
- Reading a rule of thumb as a guarantee. Meeting an expected-count guideline does not validate the sampling design or prove the null model. It only supports one part of the approximation check.
Check Your Understanding
For each situation, identify the condition that should be checked and explain why it matters.
- A study records three clinic visits from each of 25 patients and treats all 75 visits as independent observations. What is the concern?
- A survey classifies responses as “agree,” “disagree,” or “unsure,” but some respondents may skip the question. What must be addressed for the categories to be exhaustive?
- A fixed null model has four category probabilities \(0.60, 0.25, 0.10,\) and \(0.05\), with \(n=100\). Calculate the expected counts and assess them using the common guideline.
- Why are expected counts, rather than observed counts, used to check the chi-square approximation?
- A random sample is taken without replacement from a population of 500 people. What sample-size check is commonly used when considering approximate independence?