Skip to content
AP Statistics · Inference for Quantitative Data: Means

Degrees of freedom

Degrees of freedom appears in 24 reviewed AP Statistics questions and sits in Inference for Quantitative Data: Means. Below are worked examples showing exactly how the exam tests it, with the answer marked and every distractor explained.

How Degrees of freedom is tested

Example 1Easier
A student carries out a chi-square test of independence on a two-way table that classifies 150 randomly selected students by grade level (3 categories) and by whether they prefer a printed or digital textbook (2 categories). The conditions for inference are met. The test gives chi-square = 4.2 with 2 degrees of freedom and a p-value of about 0.122. Suppose instead that 300 students had been selected and every observed cell count was exactly double the original count, so all the sample proportions are unchanged. How would the results of the test change?
  1. AThe statistic stays 4.2 because the cell proportions are unchanged, so the p-value stays about 0.122.
  2. BThe statistic doubles to 8.4, but the degrees of freedom double to 4, so the p-value stays about 0.122.
  3. CThe statistic doubles to 8.4 and the p-value decreases.Correct
  4. DThe statistic halves to 2.1 because the expected counts double, so the p-value rises above 0.122.

Why C is right

When every observed count is doubled, every expected count also doubles. Each term (O - E)^2 / E becomes (2(O - E))^2 / (2E) = 2(O - E)^2 / E, so the chi-square statistic doubles from 4.2 to 8.4. The degrees of freedom depend only on the table's dimensions, (2 - 1)(3 - 1) = 2, so they do not change. With df = 2, the p-value for 8.4 is about 0.015, which is smaller than 0.122: the same proportions give stronger evidence of an association when they come from a larger sample.
Why the other 3 choices miss
A
Assumes the chi-square statistic depends only on proportions. It actually depends on counts, so the same proportions from a larger sample give a larger statistic.
B
Thinks degrees of freedom depend on sample size. For a two-way table, df = (rows - 1)(columns - 1) = 2 no matter how large n is.
D
Divides by the larger expected counts but forgets that the squared differences (O - E)^2 grow by a factor of 4. The net effect is that the statistic doubles, not halves.
Example 2Medium
A city transportation office surveyed a random sample of 300 adult commuters in the city. Each commuter reported their main commute mode and whether they are satisfied with their commute. The results are shown below. | | Car | Transit | Bike | Total | | --- | --- | --- | --- | --- | | Satisfied | 52 | 38 | 30 | 120 | | Not satisfied | 68 | 82 | 30 | 180 | | Total | 120 | 120 | 60 | 300 | A chi-square test of independence is carried out at the alpha = 0.05 level. All expected counts are at least 24, and the test statistic is chi-square = 6.53. Which of the following gives the correct degrees of freedom, p-value, and conclusion?
  1. Adf = 5 and the p-value is about 0.26; since 0.26 > 0.05, fail to reject H0; there is not convincing evidence of an association.
  2. Bdf = 2 and the p-value is about 0.04; since 0.04 < 0.05, reject H0; there is convincing evidence of an association between commute mode and satisfaction among the city's adult commuters.Correct
  3. Cdf = 2 and the p-value is about 0.04; reject H0; there is convincing evidence that a commuter's mode of travel causes a change in satisfaction.
  4. Ddf = 2 and the p-value is about 0.04; reject H0; there is about a 4% probability that commute mode and satisfaction are independent.

Why B is right

For a two-way table, df = (rows - 1)(columns - 1) = (2 - 1)(3 - 1) = 2. The expected counts are 48, 48, 24 in the Satisfied row and 72, 72, 36 in the Not satisfied row, so the contributions are 0.333 + 2.083 + 1.5 + 0.222 + 1.389 + 1.0, which gives chi-square = 6.53. With df = 2, P(chi-square >= 6.53) is about 0.038. That is less than 0.05, so we reject H0 and conclude that there is convincing evidence of an association between commute mode and satisfaction in the population of the city's adult commuters.
Why the other 3 choices miss
A
Uses df = (number of cells) - 1 = 5 instead of (r - 1)(c - 1) = 2. With df = 5 the p-value would be about 0.26, which leads to the wrong decision.
C
The df, p-value, and decision are right, but the conclusion claims causation. This was an observational survey with no random assignment, so it supports only an association.
D
Misreads the p-value as the probability that H0 is true. The p-value is the probability of getting a chi-square statistic of 6.53 or larger if H0 (independence) were true.

Studied alongside

Other concepts from Inference for Quantitative Data: Means.