Table 2 

Degrees of freedom associated with common statistical tests. 

Test 
Degrees of Freedom 


Ttest 

Independent 
n_{1 }+ n_{2 } 2 
Paired 
n  1 
Oneway ANOVA 
G  1 and n  G 
Twoway Anova 

Main effect of A 
G_{A 1} 
Main effect of B 
G_{B 1} 
A × B interaction 
(G_{A 1})(G_{B 1}) 
Error 
n  G_{A}G_{B} 
Oneway RMAnova 

Between subjects 
G  1 
Error 
(n 1)(G 1) 
Twoway Mixed^{† }ANOVA 

Between subjects 
n(G  1) 
Groups 
G1 
Error 
G(n1) 
Within subjects 
N  nG 
Obs 
Obs  1 
Group × Obs Interaction 
(G  1)(Obs  1) 
Error 
N  nG  G (Obs  1) 
Linear Regression 
1 and n  2 
Chisquare 
(R  1)(C 1) 


n_{1 }= sample size of group one; n_{2 }= sample size of group two; n = total sample size; N = total number of observations (equal to n × Obs); G = number of groups; G_{A }= number of groups for Factor A; G_{B }= number of groups for Factor B; Obs = number of repeated observations on the same subject; R = number of rows; C = number or columns. † "Mixed" refers to the presence of both between and within subjects effects, and should not be confused with mixed effects models described in the text. 

Lazic BMC Neuroscience 2010 11:5 doi:10.1186/14712202115 