Degrees of Freedom

Degrees of freedom (df) is the number of values in a calculation that are free to vary after constraints are applied. On AP Stats, df picks the exact t or chi-square distribution you use, with formulas like n-1 (one-sample t), n-2 (regression slope), categories-1 (GOF), and (rows-1)(columns-1) (two-way tables).

Verified for the 2027 AP Statistics examLast updated June 2026

What is Degrees of Freedom?

Degrees of freedom is the number of independent pieces of information left over after you've used up some of your data estimating things. Here's the intuition. If five numbers must average 10, you can pick the first four freely, but the fifth is locked in. Four values were free to vary, so df = 4, which is n - 1. Every parameter you estimate from the data "uses up" one degree of freedom.

In AP Stats, df does one practical job. It tells you exactly which curve in a family of distributions to use. The t-distribution and the chi-square distribution aren't single curves; they're families, and df is the label that picks the right member. A t-distribution with low df has heavier tails (more uncertainty from a small sample), and as df grows it looks more and more like a normal curve. Chi-square distributions are skewed right with only positive values, and the skew becomes less pronounced as df increases. Pick the wrong df and your critical value t* and your p-value both come out wrong, which means your interval and your conclusion are wrong too.

Why Degrees of Freedom matters in AP Statistics

Degrees of freedom shows up in three straight units of inference. In Unit 7, t-procedures for means need df = n - 1 for one sample (Topic 7.3) and a technology-calculated df for two samples that falls between the smaller of n₁-1 and n₂-1 and n₁+n₂-2 (LO 7.9.A). In Unit 8, chi-square tests need df = number of categories - 1 for goodness of fit (LO 8.3.A) and df = (rows - 1)(columns - 1) for homogeneity and independence (LO 8.6.A). In Unit 9, inference for the slope of a regression line uses df = n - 2, because you estimate two parameters (slope and intercept) before measuring leftover variation (LOs 9.2.D and 9.5.A). The CED makes the why explicit in 8.2.A. Within a family of density curves, df controls the shape, so it directly determines critical values, margins of error, and p-values across all of these procedures.

How Degrees of Freedom connects across the course

T-distribution (Units 7 & 9)

Degrees of freedom is what makes one t-distribution different from another. With small df the tails are fat, so t* is bigger and your confidence interval is wider. Same procedure, different df, different answer. That's also why bigger samples give narrower intervals (LO 7.3.C).

Chi-Square Distribution (Unit 8)

Chi-square df comes from the table structure, not the sample size. A goodness-of-fit test with 6 categories has df = 5 whether you sampled 60 people or 6,000. The df then sets the shape of the right-skewed curve you read your p-value from (LO 8.3.B).

Confidence Intervals for the Slope (Unit 9)

Slope inference uses df = n - 2, the odd one out. Fitting a regression line estimates two things, a slope and an intercept, so you spend two degrees of freedom before you can measure scatter around the line. The interval b ± t*(SE_b) needs t* from a t-distribution with n - 2 df (LO 9.2.D).

Sample Size (Units 6-9)

For t-procedures, df is basically sample size minus the number of estimated parameters, so n and df move together. But they're not the same number, and for chi-square tests they're not even related in the same way. Knowing which formula applies is half the battle.

Is Degrees of Freedom on the AP Statistics exam?

Degrees of freedom is mostly tested as a step inside a bigger inference problem, not as a standalone definition. Multiple choice questions love asking you to identify both the test statistic and its null distribution. For example, a regression question with n = 25 expects you to say the statistic follows a t-distribution with 23 degrees of freedom, and the wrong answers will bait you with n - 1 = 24. On FRQs, df shows up whenever you carry out a full test. The 2017 FRQ (chi-square on a two-way table of age at diagnosis for 207 men and women) required (rows - 1)(columns - 1) df, the 2023 FRQ (omega-3 supplement experiment with 19 patients) involved a two-sample t-procedure where df comes from technology, and regression-based FRQs like 2026 Q6 lean on n - 2. Stating the correct df is part of earning credit for the "mechanics" portion of an inference response, so memorize all four formulas cold.

Degrees of Freedom vs Sample size (n)

Sample size is how much data you collected; degrees of freedom is how much of that information is still free after estimating parameters. For a one-sample t-test, df = n - 1 because estimating x̄ uses one df. For slope inference, df = n - 2 because the line has two parameters. And for chi-square tests, df ignores n entirely and counts categories or cells instead, like (rows - 1)(columns - 1). Writing n where df belongs is one of the most common point-losers on inference FRQs.

Key things to remember about Degrees of Freedom

  • Degrees of freedom is the number of values free to vary after constraints, and each parameter you estimate from the data costs one degree of freedom.

  • For t-procedures, use df = n - 1 for one sample or matched pairs, df = n - 2 for the slope of a regression line, and a technology-calculated df for two samples that falls between the smaller of n₁-1 and n₂-1 and n₁+n₂-2.

  • For chi-square tests, use df = number of categories - 1 for goodness of fit and df = (rows - 1)(columns - 1) for homogeneity or independence.

  • Chi-square df depends on the number of categories or the table's dimensions, not on the sample size.

  • Degrees of freedom controls the shape of the distribution. T-distributions with more df have thinner tails and look more normal, and chi-square distributions become less right-skewed as df increases.

  • Using the wrong df changes your critical value, p-value, and confidence interval width, so always state the df explicitly when you carry out an inference procedure.

Frequently asked questions about Degrees of Freedom

What are degrees of freedom in AP Stats?

Degrees of freedom (df) is the number of independent values that can vary in a calculation after constraints are applied. In practice, it's the number that picks which t or chi-square curve you use to find critical values and p-values.

Why is degrees of freedom n - 2 for regression but n - 1 for a t-test?

You lose one df for each parameter estimated from the data. A one-sample t-test estimates one thing (the mean), so df = n - 1. A regression line estimates two things (slope and intercept), so slope inference uses df = n - 2.

Does sample size affect degrees of freedom for a chi-square test?

No. Chi-square df depends only on the structure of the data. It's categories - 1 for goodness of fit and (rows - 1)(columns - 1) for homogeneity or independence. A 3x4 table has df = 6 whether n is 100 or 10,000. Sample size matters for the large counts condition instead.

How do I find degrees of freedom for a two-sample t-test?

Use technology (your calculator computes it with a messy formula). The CED says the df falls between the smaller of n₁-1 and n₂-1 and n₁+n₂-2. A safe conservative shortcut by hand is the smaller of n₁-1 and n₂-1.

What happens to the t-distribution as degrees of freedom increase?

The tails get thinner and the curve approaches the standard normal distribution. That's why small samples need bigger critical values t* and produce wider confidence intervals than large samples at the same confidence level.