Degrees of freedom within groups: what it means and how to read it

In the report: dfWithin — The second degrees of freedom of F. For the classic test — all values minus the number of groups; for Welch it is smaller and usually fractional.

How to read it

The second number in F(…, …): roughly the number of values minus the number of groups.

After Welch it is fractional, for example 96.4 — that is normal; report it rounded to one decimal: Welch's F(2, 96.4) = 4.30.

In plain words

The same teacher saw a second small number next to the main result of her test and wondered what it was. She looked up the degrees of freedom within groups and found 147. Now she knows it is close to the number of pupils minus the number of groups, so 150 pupils in 3 groups give 147. When the add-on used Welch's version, the number came out as 96.4, with a decimal point. That is normal for that version, not a mistake. In her report she rounds it to one digit after the point and writes it right after the first small number.

How it is computed

Classic: dfWithin = N − k, N — all values of all groups.
Welch: dfWithin = (k² − 1) / (3 · Σ (1 − wᵢ/W)² / (nᵢ − 1)).

Example

The cell with dfWithin is selected in each report; point at a label to see its note.

  • — the sample data (50 rows) the examples use
  • — classic one-way ANOVA =STATS_ANOVA(Data!A1:T51, "x1,x2")
  • — new syntax, 3 reports =STATS_ANALYZE(Data!A1:T51, "PAIRED('before,after', 0.99, 'greater') ANOVA('x1,x2,x') DESCRIPTIVE('mean,std,n', 'x1,x2')")

Where you see it

Get it in your sheet

One formula in a cell gives the whole report, Degrees of freedom within groups included. ALS Stats is a free add-on for Google Sheets™.

Install ALS Stats from Google Workspace Marketplace (opens in a new tab)