<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>FAQ/df</title><revhistory><revision><revnumber>6</revnumber><date>2013-03-08 10:17:44</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>5</revnumber><date>2010-05-11 14:40:05</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>4</revnumber><date>2010-05-11 14:39:38</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>3</revnumber><date>2010-05-11 14:38:56</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>2</revnumber><date>2010-05-11 14:35:27</date><authorinitials>PeterWatson</authorinitials></revision><revision><revnumber>1</revnumber><date>2010-05-11 14:34:22</date><authorinitials>PeterWatson</authorinitials></revision></revhistory></articleinfo><section><title>How do I work out degrees of freedom for terms in an ANOVA?</title><para>For N subjects and g group variables (factors) with respective levels L1, L2, ... , Lg and a within subjects factors, W, the table below gives the degrees of freedom for various types of sources variation in an analysis of variance. </para><informaltable><tgroup cols="3"><colspec colname="col_0"/><colspec colname="col_1"/><colspec colname="col_2"/><tbody><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> <emphasis role="strong">Source of variation</emphasis></para></entry><entry colsep="1" rowsep="1"><para> <emphasis role="strong">df</emphasis> </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Factor </para></entry><entry colsep="1" rowsep="1"><para> L1-1 </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> 2-way interaction </para></entry><entry colsep="1" rowsep="1"><para> (L1-1)(L2-1) </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> K-way interaction of factors </para></entry><entry colsep="1" rowsep="1"><para> $$\prod_text{k} (L_text{k}-1)$$ </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> <emphasis>Between subjects error terms</emphasis> </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (one-way anova between subjects) </para></entry><entry colsep="1" rowsep="1"><para> N - L1 </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (between subjects) </para></entry><entry colsep="1" rowsep="1"><para> N - df of terms involving between subjects factors - 1 </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> <emphasis>Within subjects error terms</emphasis> </para></entry><entry colsep="1" rowsep="1"/></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (subjects x W1), no between subjects factor </para></entry><entry colsep="1" rowsep="1"><para> (N-1)(L1-1) </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (subjects x W1 x W2, no between subjects factor ) </para></entry><entry colsep="1" rowsep="1"><para> (N-1)(L1-1)(L2-1) </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (subjects x W1 x W2, 1 between subjects factor) </para></entry><entry colsep="1" rowsep="1"><para> (N-L1)(L2-1)(L3-1) </para></entry></row><row rowsep="1"><entry align="center" colsep="1" nameend="col_1" namest="col_0" rowsep="1"><para> Error (subjects x Within subjects interaction) </para></entry><entry colsep="1" rowsep="1"><para> df of Error (between subjects) x df(Within subjects interaction term) </para></entry></row></tbody></tgroup></informaltable><para><emphasis role="underline">Reference</emphasis> </para><para>Boniface DR (1995) Experiment design and statistical methods for behavioural and social research. Chapman and Hall:London. (This book contains further details about computing degrees of freedom and also SS in balanced designs for terms in an ANOVA).  </para></section></article>