Use Cases & Study Tips

Where Do Expected Values Come From in a Biological Chi-Squared Test?

Written by:Benedek Herman
Published on:9 / 15 / 2026
Original decorative study illustration for Where Do Expected Values Come From in a Biological Chi-Squared Test?

The observed counts are easy to find: they are printed in the question. The expected counts are where many biology students hesitate. Should you divide the total equally? Use a ratio? Copy another column? The answer depends on the null model, not on which calculation happens to produce neat numbers.

Before touching the chi-squared formula, write the expected proportions in words. You are describing what the model predicts across categories. Only then convert those proportions into expected counts for the sample size in the question.

Begin with the hypothesis

For a goodness-of-fit test with specified category probabilities, each expected count is the sample total multiplied by the probability assigned to that category. The chi-squared statistic sums (observed − expected)² ÷ expected across categories. The NIST handbook describes this comparison and the conditions needed for its usual approximation. NIST, Chi-Square Goodness-of-Fit Test

“No difference” does not always mean equal categories. If the biological model predicts a 3:1 ratio, the expected proportions are three quarters and one quarter. An equal split would test a different model. State the proposed model clearly enough that another reader could reconstruct your expected column.

Worked example: a 3:1 model

In an invented classroom dataset, 160 offspring fall into two categories. A specified inheritance model predicts a 3:1 ratio. The observations are 112 in category A and 48 in category B. These are fictional counts for arithmetic practice, not results from a published experiment.

The ratio contains four parts in total. Each part represents 160 ÷ 4 = 40 offspring. Therefore the expected counts are:

Category Model proportion Expected Observed
A 3/4 120 112
B 1/4 40 48
Total 1 160 160

The expected counts sum to the observed sample total. That is a quick check on the construction of the table, not evidence that the observations fit the model well.

Calculate the two contributions separately. For A, (112 − 120)² ÷ 120 = 64 ÷ 120 = 0.5333. For B, (48 − 40)² ÷ 40 = 64 ÷ 40 = 1.6. The statistic is approximately 2.1333.

The raw deviations have equal size, but their contributions differ because the expected denominators differ. Do not average the two contributions, and do not let the positive and negative raw deviations cancel before squaring.

Interpret using the correct decision rule

For this simple example, the two category probabilities were specified in advance and no model parameters were estimated from the sample. The usual degrees of freedom are therefore 2 − 1 = 1. At a 5% significance level, the commonly used critical value is approximately 3.841. Since 2.1333 is smaller, the test does not reject this null model at that threshold. NIST, Chi-Square Distribution

That conclusion does not prove the model true. It says the test did not provide enough evidence to reject it under the stated setup. Check the expected-count requirements, independent sampling and any qualification-specific instructions before applying the standard procedure to a different dataset.

A second model: unequal categories again

Suppose another fictional model assigns probabilities of 0.50, 0.30 and 0.20 to three categories in a sample of 90. The expected counts are 45, 27 and 18. You do not divide by three just because there are three categories.

If the observations are 42, 30 and 18, the contributions are 9/45, 9/27 and 0/18. Their sum is 0.2 + 0.3333 + 0 = 0.5333, approximately. Before interpreting it, specify the degrees of freedom and threshold appropriate to that model.

Expected counts do not need to be whole numbers. With a total of 91, the same probabilities produce 45.5, 27.3 and 18.2. These are model expectations, not a claim that someone counted a fraction of an organism. Retain sufficient precision in working rather than rounding each category prematurely.

Do not confuse two kinds of chi-squared question

A goodness-of-fit problem compares one categorical distribution with a specified model. A test of independence in a contingency table asks a different question, and its expected counts are derived from row and column totals. For that setting, an expected cell count is row total × column total ÷ grand total. NIST, Contingency Tables

If a memorised formula suddenly feels unfamiliar, identify which question is being asked before calculating. Using the right arithmetic for the wrong statistical question still produces the wrong analysis.

Self-test

1. A model predicts 1:2:1 in 200 observations. What are the expected counts?

Answer: 50, 100 and 50. Four ratio parts share the total, and the middle category receives two parts.

2. Why must the expected counts add to the sample total?

Answer: The category probabilities cover the whole distribution and sum to one. Multiplying each by the same total preserves that total.

3. Does a non-significant result establish that the null model is correct?

Answer: No. Failure to reject is not proof. The conclusion depends on the data, assumptions and chosen test.

4. Is an expected count of 27.3 invalid because organisms are whole?

Answer: No. An expectation is a model quantity, not a directly observed count.

Practise constructing expected columns before calculating a statistic. Use one equal-probability model and one unequal ratio, then explain why their denominators differ. Our active recall guide can help turn these decisions into prompts you revisit, with your course’s statistical guidance beside you.

Sources and further reading

Recent articles

Expected Values in Biology Chi-Squared Tests