Factors as numerical explanatory variables

A factor with two levels can be equivalently modelled as a numerical or categorical variable. In 2k factorial experiments, it is convenient to treat each factor as a numerical variable with values -1 and +1 denoting its two levels. For example, a model for the main effects of four 2-level factors can be written in the form:

yi  =  µ   +   β1 xi(1)   +   β2 xi(2)   +   β3 xi(3)   +   β4 xi(4)   +   εi

where

xi(k)  =   -1   if the k'th factor is at its low level
+1   if the k'th factor is at its high level

When written in this form, the model is an ordinary linear multiple regression model. Standard regression methods can therefore be used to estimate parameters and perform inference.

Uncorrelated explanatory variables

In a factorial experiment, the sums of the values for xi(1), xi(2), xi(3) and xi(4) are all zero — there are equal numbers of +1 and -1. It can also be shown that are all uncorrelated since

xi(k)xi(l)   =   0       for all k and l

Uncorrelated explanatory variables in multiple regression correspond to orthogonal factors.

Least squares estimates

Because the explanatory variables are uncorrelated, the least squares estimates for each factor's coefficient is the same whether or not the other variables are in the model. The least squares estimate for βk is therefore:

xi(k)yi    /   xi(k)2

Since all xi(k) are +1 or -1, depending on whether factor k is at its high or low level,

The least squares estimate of βk is half the difference between the mean responses at the two levels of factor k.


Sugar reduction study

A food manufacturer wanted to reduce the sugar content of a sauce without altering the taste and without any additive. The first part of a study into this problem was an experiment to evaluate the influence of Saltiness, Acidity, Thickness (viscosity) and Hotness (piquancy) on the perceived sweeness of the sauce.

Two levels for each of these four factors were chosen by the scientists to cover values that were considered to be feasible for the variables:

Factor  Low level   High level 
Saltiness     0.10 g% 0.20 g%
Acidity 0.00 g% 0.05 g%
Thickness 3.00 g% 4.00 g%
Hotness     0.05 g% 0.15 g%

The low level for each factor is coded as -1 and the high level as +1. The table below shows the treatment levels for a 24 factorial experiment and average sweetness of each sauce as perceived by a panel of tasters.

 Saltiness   Acidity   Thickness   Hotness   Sweetness 
+1
+1
+1
+1
+1
+1
+1
+1
-1
-1
-1
-1
-1
-1
-1
-1
+1
+1
+1
+1
-1
-1
-1
-1
+1
+1
+1
+1
-1
-1
-1
-1
+1
+1
-1
-1
+1
+1
-1
-1
+1
+1
-1
-1
+1
+1
-1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
+1
-1
7.60
7.92
7.72
7.27
8.09
7.87
7.52
6.89
8.02
8.34
8.20
8.21
8.14
7.82
8.04
7.00

The main effects (coefficients βk in the model) are estimated from the cross-products of the columns of ±1 and the response.

Factor Estimate of main effect
Saltiness -0.181
Acidity 0.119
Thickness 0.184
Hotness 0.126

These values for the main effects are half the difference between the mean sweetness at the high and low values of the factors.

The changes to saltiness and thickness have more effect on perceived sweetness than the changes to acidity and hotness.