From a Category Question to Hypotheses
A one-way goodness-of-fit question asks whether the outcomes of one categorical variable follow a specified distribution. For example, a manufacturer might ask whether defects occur equally often in four locations, or a clinic might ask whether appointment requests follow a stated distribution across weekdays. Before any test can be carried out, the distribution being proposed must be written precisely.
The key is to state a probability for every category under the null hypothesis. The alternative then represents any departure from that complete set of probabilities. This is a global question: it asks whether the overall category distribution differs from the proposed one, not whether a particular category is larger or smaller.
In words, the standard form is:
The equality in \(H_0\) means every category probability has the stated value: \(p_i=p_{0i}\) for all \(i\). The inequality in \(H_a\) means that at least one category probability is different. It does not specify in advance which category differs or in which direction.
Writing a Complete Null Probability Vector
Start by naming the categories and making sure they cover all possible outcomes without overlap. Then translate the proposed distribution into a probability for each category, in the same order throughout the hypotheses. A valid null vector must have nonnegative entries and total probability one. If a description gives percentages, convert each percentage to a proportion by dividing by 100.
For instance, suppose the categories are A, B, and C and the proposed probabilities are 0.50, 0.30, and 0.20, respectively. The null is not merely “the distribution follows the proposed pattern.” It is the precise claim \(p_A=0.50,\ p_B=0.30,\ p_C=0.20\). The alternative is that at least one of these three equalities fails.
Worked Example: A Fair Six-Sided Die
A hypothetical study records the face shown on each roll of a six-sided die. The question is whether the die produces all six faces with equal probability. Define the categories and write both hypotheses.
Categories. The outcomes are faces 1, 2, 3, 4, 5, and 6. They are mutually exclusive, and every roll produces one of them. Under the proposed equal-probability model, each face has probability \(1/6\).
Check the null vector. Its six entries are nonnegative, and their sum is \(6(1/6)=1\). Thus it is a valid probability distribution.
Hypotheses. In the category order 1 through 6, write \(\mathbf{p}=(p_1,p_2,p_3,p_4,p_5,p_6)\). Then \(H_0:\mathbf{p}=(1/6,1/6,1/6,1/6,1/6,1/6)\), and \(H_a:\mathbf{p}\neq(1/6,1/6,1/6,1/6,1/6,1/6)\). The alternative says that at least one face does not have probability \(1/6\). It does not say that any particular face is more likely.
The Alternative Is Global, Not Category-by-Category
A common feature of goodness-of-fit hypotheses is that the alternative does not list a single competing distribution. Instead, it includes every valid probability vector other than the null vector. For three categories, for example, any nonnegative vector summing to one that is not exactly the null vector belongs to the alternative.
This is different from a directional claim such as “category A is more likely than category B.” Such a statement compares selected probabilities and is not the standard global alternative for a goodness-of-fit question. Use the global alternative when the research question asks whether the distribution as a whole departs from the specified model.
Worked Example: A Specified Distribution Across Three Days
A hypothetical clinic plans to compare appointment requests across Monday, Tuesday, and Wednesday with a planning model that assigns probabilities 0.50, 0.30, and 0.20, respectively. Write the hypotheses in the stated category order.
Check the proposed probabilities. Each is nonnegative, and \(0.50+0.30+0.20=1.00\). The proposal is a valid probability vector.
Null hypothesis. Let \(p_M\), \(p_T\), and \(p_W\) denote the population probabilities that a request falls on Monday, Tuesday, or Wednesday. Then \(H_0:(p_M,p_T,p_W)=(0.50,0.30,0.20)\).
Alternative hypothesis. \(H_a:(p_M,p_T,p_W)\neq(0.50,0.30,0.20)\). Equivalently, at least one of \(p_M=0.50\), \(p_T=0.30\), or \(p_W=0.20\) is false. The alternative does not assert that Monday has the highest probability; for example, a departure could instead involve Tuesday or Wednesday.
These hypotheses describe population probabilities, not a particular set of observed requests. No observed counts are needed to define the null model.
Why a Departure in One Category Requires a Departure Elsewhere
The probabilities must continue to sum to one under both hypotheses. Consequently, if one category's probability changes from its null value, at least one other category's probability must also change. This dependence is why the global alternative is naturally written as a difference between probability vectors rather than as several unrelated claims.
To see this directly, write \(p_i=p_{0i}+d_i\), where \(d_i\) is the difference between the population probability and its null value for category \(i\). Both vectors sum to one, so:
Subtracting the second equality from the first gives:
If one \(d_i\) is nonzero, the sum of the differences would not be zero if every other difference were zero. Therefore at least one other difference must offset it. For example, if one category is 0.04 above its null probability, the combined differences in the remaining categories must total \(-0.04\). This is a constraint on any alternative probability vector, not an extra claim that the changes have a particular pattern.
Worked Example: Converting a Proposed Ratio to Probabilities
A hypothetical genetics exercise proposes that three phenotype categories occur in the ratio 1:2:3. Write the null probabilities and the global alternative.
Convert the ratio. The ratio contains \(1+2+3=6\) total parts. The probability for each category is its number of parts divided by six: \(1/6\), \(2/6\), and \(3/6\). These are approximately 0.1667, 0.3333, and 0.5000, and their exact sum is \((1+2+3)/6=1\).
State the hypotheses. If the categories are ordered as first, second, and third, then \(H_0:(p_1,p_2,p_3)=(1/6,2/6,3/6)\), while \(H_a:(p_1,p_2,p_3)\neq(1/6,2/6,3/6)\). The alternative includes any valid probability vector that differs from this ratio, rather than only alternatives in which the third category is most common.
Keep the Hypotheses Separate From the Observed Sample
The null vector comes from the model or claim being assessed. The sample provides evidence about that claim, but it does not define the claim. If the sample contains \(n\) observations, the observed proportion in category \(i\) is \(\hat{p}_i\), the observed count in that category divided by \(n\). These observed proportions need not equal the hypothesized probabilities.
This distinction matters even when the sample happens to look close to the proposed distribution. The hypotheses still describe the population probabilities, and they should be written before using the observed pattern to assess the model. Writing \(H_0:\mathbf{p}=\hat{\mathbf{p}}\) would make the observed sample the null model, which is usually not the scientific or practical claim the question asks to evaluate.
Worked Example: Do Not Use the Sample Proportions as the Null
A hypothetical survey records 100 respondents' preferred option among A, B, and C. The proposed distribution is 50%, 30%, and 20%. The observed counts are 46, 34, and 20. Write the hypotheses and distinguish the sample summary from the model.
Null model. The stated percentages give probabilities \(0.50\), \(0.30\), and \(0.20\), which sum to \(1.00\). Thus \(H_0:(p_A,p_B,p_C)=(0.50,0.30,0.20)\).
Alternative. \(H_a:(p_A,p_B,p_C)\neq(0.50,0.30,0.20)\). This means that at least one population category probability differs from the proposed value.
Observed proportions. Dividing each count by the sample size gives \(\hat{p}_A=46/100=0.46\), \(\hat{p}_B=34/100=0.34\), and \(\hat{p}_C=20/100=0.20\). They sum to \(0.46+0.34+0.20=1.00\), as observed proportions must. But they are not the null vector: the null remains \((0.50,0.30,0.20)\). The sample proportions describe what happened in these 100 responses; the null probabilities state the proposed population distribution.
A Reliable Hypothesis-Writing Process
A short sequence of checks helps prevent incomplete or contradictory hypotheses. The goal is not to calculate a test statistic here, but to express exactly what probability model is being assessed.
Use mutually exclusive categories that cover every possible observation for the categorical variable.
Write one null probability for each category, using the same order as the category list.
Confirm that every probability is nonnegative and that the probabilities sum to one.
Write that the probability vector differs from the null vector, meaning at least one specified probability is not correct.
Common Mistakes
- Writing only “the categories are equally likely.” This is precise only when equal probabilities are actually the model. If there are \(k\) categories and equality is proposed, write each null probability as \(1/k\).
- Leaving out a category. A null vector must account for every category in the variable. Omitting an outcome can make the listed probabilities fail to sum to one and can change the question.
- Using an incomplete null. Saying “the probabilities are 0.50 and 0.30” for a three-category variable leaves the third category unstated. Give the probability for every category and check that the total is one.
- Making the alternative too specific. The standard global alternative is not “category A is more common.” It is that at least one category probability differs from its null value, in either direction.
- Using observed proportions in place of the null values. The \(\hat{p}_i\) values summarize the sample. The null probabilities must come from the proposed distribution being examined.
- Writing probabilities that cannot form a distribution. A set of values that adds to 0.92, for example, is not a complete probability vector. Recheck the stated percentages, conversions, and category list.
Check Your Understanding
For each question, focus on the category probability model and the hypotheses.
- A hypothetical model assigns probabilities 0.40, 0.35, and 0.25 to three named categories. Write \(H_0\) and \(H_a\), and verify that the null vector is valid.
- Four outcomes are proposed to be equally likely. Write the null probability vector and explain in words what the global alternative means.
- A proposed three-category ratio is 2:1:1. Convert it to probabilities and write both hypotheses.
- Explain why observed sample proportions should not be substituted for the null probabilities when writing a goodness-of-fit hypothesis.
- Suppose one category's population probability is greater than its null value. What must be true about the combined differences in the other categories? Explain using the fact that probabilities sum to one.