Home / DOE / Create Designs / N Level Factorial Design / Math Details
Math Details¶
This page gives how a general factorial design is enumerated and coded: the order the level combinations are generated in, the coded value each level receives, the run count, and what replicating does. One engine builds this design and the three level full factorial; the three level design is the case where every factor has exactly three levels, and everything below applies to both.
Notation¶
| Term | Description |
|---|---|
| \(k\) | the number of factors |
| \(L_j\) | the number of levels of factor \(j\), for \(j = 1, 2, \dots, k\) |
| \(d_j\) | the level index of factor \(j\) in a given run, from \(0\) to \(L_j - 1\) |
| \(R\) | the number of replicates |
| \(N\) | the number of distinct level combinations, the run count of one replicate |
The run count¶
The design visits every combination of every factor's levels exactly once, so
and the finished sheet holds \(N \cdot R\) rows. The run count is not chosen in the dialog: it is whatever that product comes to, and it is reported back rather than requested. Adding one level to a single factor multiplies the run count by \(\tfrac{L_j + 1}{L_j}\), and adding a factor multiplies it by that factor's level count.
The design description block reports the factor count, the run count, and a Levels: line listing each factor's level count in order.
The order the runs are generated in¶
The combinations are enumerated as a mixed radix count, the same way an odometer advances: the last factor's index increases first, and when it reaches its own limit it resets to \(0\) and the next index to its left increases.
Formally, run \(r\) carries the level indices given by
so for three factors with 2, 3 and 2 levels the first runs are \((0,0,0)\), \((0,0,1)\), \((0,1,0)\), \((0,1,1)\), \((0,2,0)\) and onward.
This design always uses that order. The two level designs, the central composite design and the Box Behnken design read a per-user setting that can reverse the enumeration so the first factor varies fastest. The general factorial does not read it: the order above is fixed in the code that builds this design, so the setting has no effect here. The set of runs would be identical either way; only the sequence they are listed in would differ.
The coded value of a level¶
A level index is turned into a coded value by a map built from the factor's own level count. The coded values are consecutive integers placed symmetrically about zero, and zero is used only when the level count is odd:
which comes out as:
| Levels \(L\) | Coded values |
|---|---|
| 2 | \(-1,\ +1\) |
| 3 | \(-1,\ 0,\ +1\) |
| 4 | \(-2,\ -1,\ +1,\ +2\) |
| 5 | \(-2,\ -1,\ 0,\ +1,\ +2\) |
| 6 | \(-3,\ -2,\ -1,\ +1,\ +2,\ +3\) |
The coded values of a factor with an even number of levels are not equally spaced. The step from \(-1\) to \(+1\) is \(2\) while every other step is \(1\), because zero is skipped. A factor with an odd number of levels is evenly spaced throughout. This is a property of the coding, not of the levels themselves: the actual values or level names written on the design sheet are whatever was entered for the factor, and it is the coded column that carries the gap.
The map is applied per factor, so a design mixing a 3 level factor with a 4 level one carries an evenly spaced coded column for the first and an unevenly spaced one for the second.
The uncoded design¶
The uncoded matrix is written from the level indices directly: the entry for factor \(j\) in a run is that factor's level at index \(d_j\), taken from the factor's own list of levels. It is built independently of the coded matrix rather than converted from it, so the two are two writings of the same level indices.
Replicates¶
Replicating joins whole copies of the coded design end to end, so replicate 2 is the same \(N\) rows in the same order as replicate 1, and the finished design holds \(N \cdot R\) rows. The uncoded matrix is filled the same way, one block of \(N\) rows per replicate.
No center points are added to this design. A factor with an odd number of levels already has a middle level that every run can visit, and the center point machinery that the two level designs use is not part of this engine.
Blocking¶
The design carries a block count, and blocking is either in the design or on the replicates. The description block reports which of the two is in use along with the block count.
Shared Math Details used here¶
This design uses shared formulas defined once in Shared Math Details. See those pages for the exact definitions.
| Shared concept | Used here for | Reference |
|---|---|---|
| Design coding | turning a coded level into the value written on the design sheet | Design Coding |
See Also¶
- N Level Factorial Design
- Three Level Factorial Designs Math Details, the same engine with three levels on every factor
- Two Level Factorial Designs Math Details, a different engine, which supports fractions and folding
References¶
- Montgomery, D. C. (2013). Design and Analysis of Experiments, 8th edition. Wiley.
- Box, G. E. P., Hunter, J. S., and Hunter, W. G. (2005). Statistics for Experimenters: Design, Innovation, and Discovery, 2nd edition. Wiley.