The sources of variation are: age, trials, the Age x Trials interaction, and two error terms. One error term is used to test the effect of age whereas a second error term is used to test the effects of trials and the Age x Trials interaction.

The degrees of freedom for age is equal to the number of ages minus one. That is: 2 - 1 = 1. The degrees of freedom for the error term for age is equal to the total number of subjects minus the number of groups: 8 - 2 = 6. The degrees of freedom for trials is equal to the number of trials - 1: 5 - 1 = 4. The degrees of freedom for the Age x Trials interaction is equal to the product of the degrees of freedom for age (1) and the degrees of freedom for trials (4) = 1 x 4 = 4. Finally, the degrees of freedom for the second error term is equal to the product of the degrees of freedom of the first error term (6) and the degrees of freedom for trials (4): 6 x 4 = 24.