kb/data/en.wikipedia.org/wiki/Factorial_experiment-2.md

4.5 KiB
Raw Blame History

title chunk source category tags date_saved instance
Factorial experiment 3/4 https://en.wikipedia.org/wiki/Factorial_experiment reference science, encyclopedia 2026-05-05T09:50:13.140941+00:00 kb-cron

A contrast vector belongs to the main effect of a particular factor if the values of its components depend only on the level of that factor. A contrast vector belongs to the interaction of two factors, say A and B, if (i) the values of its components depend only on the levels of A and B, and (ii) it is orthogonal (perpendicular) to the contrast vectors representing the main effects of A and B. Similar definitions hold for interactions of more than two factors. In the 2 × 3 example, for instance, the pattern of the A column follows the pattern of the levels of factor A, indicated by the first component of each cell. Similarly, the pattern of the B columns follows the levels of factor B (sorting on B makes this easier to see). The number of columns needed to specify each effect is the degrees of freedom for the effect, and is an essential quantity in the analysis of variance. The formula is as follows:

A main effect for a factor with s levels has s1 degrees of freedom. The interaction of two factors with s1 and s2 levels, respectively, has (s11)(s21) degrees of freedom. The formula for more than two factors follows this pattern. In the 2 × 3 example above, the degrees of freedom for the two main effects and the interaction — the number of columns for each — are 1, 2 and 2, respectively.

=== Examples === In the tables in the following examples, the entries in the "cell" column are treatment combinations: The first component of each combination is the level of factor A, the second for factor B, and the third (in the 2 × 2 × 2 example) the level of factor C. The entries in each of the other columns sum to 0, so that each column is a contrast vector.

A 3 × 3 experiment: Here we expect 3-1 = 2 degrees of freedom each for the main effects of factors A and B, and (3-1)(3-1) = 4 degrees of freedom for the A × B interaction. This accounts for the number of columns for each effect in the accompanying table. The two contrast vectors for A depend only on the level of factor A. This can be seen by noting that the pattern of entries in each A column is the same as the pattern of the first component of "cell". (If necessary, sorting the table on A will show this.) Thus these two vectors belong to the main effect of A. Similarly, the two contrast vectors for B depend only on the level of factor B, namely the second component of "cell", so they belong to the main effect of B. The last four column vectors belong to the A × B interaction, as their entries depend on the values of both factors, and as all four columns are orthogonal to the columns for A and B. The latter can be verified by taking dot products. A 2 × 2 × 2 experiment: This will have 1 degree of freedom for every main effect and interaction. For example, a two-factor interaction will have (2-1)(2-1) = 1 degree of freedom. Thus just a single column is needed to specify each of the seven effects.

The columns for A, B and C represent the corresponding main effects, as the entries in each column depend only on the level of the corresponding factor. For example, the entries in the B column follow the same pattern as the middle component of "cell", as can be seen by sorting on B. The columns for AB, AC and BC represent the corresponding two-factor interactions. For example, (i) the entries in the BC column depend on the second and third (B and C) components of cell, and are independent of the first (A) component, as can be seen by sorting on BC; and (ii) the BC column is orthogonal to columns B and C, as can be verified by computing dot products. Finally, the ABC column represents the three-factor interaction: its entries depend on the levels of all three factors, and it is orthogonal to the other six contrast vectors. Combined and read row-by-row, columns A, B, C give an alternate notation, mentioned above, for the treatment combinations (cells) in this experiment: cell 000 corresponds to +++, 001 to ++, etc. In columns A through ABC, the number 1 may be replaced by any constant, because the resulting columns will still be contrast vectors.
For example, it is common to use the number 1/4 in 2 × 2 × 2 experiments to define each main effect or interaction, and to declare, for example, that the contrast

is "the" main effect of factor A, a numerical quantity that can be estimated.