# Full factorial and two-level fractional factorial designs in standard or seeded randomised order, with the defining relation, resolution and aliases, version 1.1.1

doe-factorial\@1.1.1: this version's equations with their symbols, each constant's value, their sources and whether each was read, a worked example where the record holds one, its level and what it was checked against, the number of cases, and what was not checked. This version's record is not rewritten; a correction is added under Changes.

## What this page can and cannot show

**Level: Checked against a reference; Two-level fractions against NIST and pyDOE3, multi-level pyDOE3 only; run order against our independently written code. Reference kind: a published dataset, NIST/SEMATECH e-Handbook of Statistical Methods 5.3.3.4.7 design files, Dataplot files of December 1988; an outside program, pyDOE3, 1.6.2; our own exact-arithmetic script and a hand-worked case; an outside program, stored reference values (independent implementation of the prng record) and exact arithmetic (Python fractions), stored reference values SHA-256 7e51ed51ebf432a7fdd920500745bfeebff5501f29f26756ad91ef5f6bdd78f0.**

Not fully recorded, and not independently reviewed. Items marked "Not recorded" are missing from this project's records for the version named. Apart from any worked example shown, the cases and their values are not printed, so a reader cannot re-run these checks. No independent scientist has yet reviewed these methods or checks.

[Every version of this method](https://www.drybench.com/methods/m/doe-factorial) · [Every method](https://www.drybench.com/methods/m) · [What the levels mean](https://www.drybench.com/methods/levels)

## Version 1.1.1

**Level: Checked against a reference; Two-level fractions against NIST and pyDOE3, multi-level pyDOE3 only; run order against our independently written code. Reference kind: a published dataset, NIST/SEMATECH e-Handbook of Statistical Methods 5.3.3.4.7 design files, Dataplot files of December 1988; an outside program, pyDOE3, 1.6.2; our own exact-arithmetic script and a hand-worked case; an outside program, stored reference values (independent implementation of the prng record) and exact arithmetic (Python fractions), stored reference values SHA-256 7e51ed51ebf432a7fdd920500745bfeebff5501f29f26756ad91ef5f6bdd78f0.** `doe-factorial@1.1.1`

Built, not hosted. Generated from a snapshot of the library's records taken on 2026-11-25, as committed on 2026-11-25. A later snapshot replaces this one, so these records and this page can change.

**Verification statement:** Two-level fractions against the NIST/SEMATECH e-Handbook 5.3.3.4.7 design files, with pyDOE3 1.6.2 as second party; multi-level full factorials against pyDOE3 1.6.2; coding, and layout by the method record's stated convention, by exact arithmetic, worked by hand; randomised run order as the oracle's standard order permuted by an independent Python implementation of the prng record, seven designs, seeds 0 to 2^53 − 1 including a rejecting draw, and one 2^2 order worked by hand from the PCG authors' published seed-42 stream.

The runs of a full factorial (2 to 5 levels per factor) or of a two-level fraction from stated generators, in standard order or a seeded completely randomised order, coded and in natural units, with replicates, centre points, and for a fraction its defining relation, resolution and the aliases of every main effect and two-factor interaction.

- **How results are reported:** none: coded values as exact as double precision allows; natural values as given, centre points their arithmetic midpoint
- **Uncertainty:** A design has no uncertainty: it is a construction.
- **Reference, as its record states it:** NIST/SEMATECH e-Handbook design files (published data) and pyDOE3 1.6.2; the run order against an independent PCG32 implementation
- **Computes through:** `prng@1.0.2`
- **Level confirmed by this project's ruling of** 14 November 2026

[What this page can and cannot show](#what-this-page-can-and-cannot-show)

### What was checked

432 cases in 6 files, linked by this exact version.

Run through the tool at build against a published dataset, NIST/SEMATECH e-Handbook of Statistical Methods 5.3.3.4.7 design files, Dataplot files of December 1988; an outside program, pyDOE3, 1.6.2; our own exact-arithmetic script and a hand-worked case; an outside program, stored reference values (independent implementation of the prng record) and exact arithmetic (Python fractions), stored reference values SHA-256 7e51ed51ebf432a7fdd920500745bfeebff5501f29f26756ad91ef5f6bdd78f0: 339 agree within the tolerance the file states, 93 refuse as the case expects, 0 differ, 0 were not run.

- **File 1, 30 cases**
  - **Where the expected values came from:** a published dataset, NIST/SEMATECH e-Handbook of Statistical Methods 5.3.3.4.7 design files Dataplot files of December 1988
  - **Recorded on:** 2026-11-10
  - **Reference:** NIST/SEMATECH e-Handbook of Statistical Methods 5.3.3.4.7 design files, Dataplot files of December 1988; licence To be checked
  - **Tolerance as the file states it:** exact: run indices, counts, words of the relation, alias sets, resolution, statuses and codes; coded values to 1e-15 absolute; natural values exact

- **File 2, 28 cases**
  - **Where the expected values came from:** an outside program, pyDOE3 1.6.2
  - **Recorded on:** 2026-11-10
  - **Reference:** pyDOE3, 1.6.2; licence BSD-3-Clause
  - **Tolerance as the file states it:** exact: run indices, counts, words of the relation, alias sets, resolution, statuses and codes; coded values to 1e-15 absolute; natural values exact

- **File 3, 33 cases**
  - **Where the expected values came from:** our own exact-arithmetic script and a hand-worked case
  - **Recorded on:** 2026-11-10
  - **Reference:** exact arithmetic (Python fractions), 3.13.18; licence PSF-2.0
  - **Tolerance as the file states it:** exact: run indices, counts, words of the relation, alias sets, resolution, statuses and codes; coded values to 1e-15 absolute; natural values exact

- **File 4, 15 cases**
  - **Where the expected values came from:** an outside program, stored reference values (independent implementation of the prng record) and exact arithmetic (Python fractions) stored reference values SHA-256 7e51ed51ebf432a7fdd920500745bfeebff5501f29f26756ad91ef5f6bdd78f0
  - **Recorded on:** 2026-11-11
  - **Reference:** stored reference values (independent implementation of the prng record) and exact arithmetic (Python fractions), stored reference values SHA-256 7e51ed51ebf432a7fdd920500745bfeebff5501f29f26756ad91ef5f6bdd78f0; licence LicenseRef-drybench-internal
  - **Tolerance as the file states it:** exact: run indices, counts, the permutation, words, aliases, statuses and codes; coded values to 1e-15 absolute; natural values exact

- **File 5, 99 cases**
  - **Where the expected values came from:** our own exact-arithmetic script and a hand-worked case
  - **Recorded on:** 2026-11-14
  - **Reference:** second implementation (Python 3.13, standard library), checked with Python fractions, 2026-11-14; licence PSF-2.0
  - **Tolerance as the file states it:** exact: run orders, counts, points, statuses and codes; coded values to 1e-15 absolute (the record's tolerance: -1 + 2j/(m - 1) in double may sit an ulp from the nearest fraction); natural values exact (each a given level or the double nearest the exact midpoint)

- **File 6, 227 cases**
  - **Where the expected values came from:** our own exact-arithmetic script and a hand-worked case
  - **Recorded on:** 2026-11-14
  - **Reference:** second implementation by a fresh agent (Python 3.13, standard library), checked with Python fractions, 2026-11-14; licence PSF-2.0
  - **Tolerance as the file states it:** exact: run orders, counts, points, words of the relation and alias lists in their stated order, resolution, statuses and codes; coded values to 1e-15 absolute (the record's tolerance: -1 + 2j/(m - 1) in double may sit an ulp from the nearest fraction); natural values exact (each a given level or the double nearest the exact midpoint)

Apart from the worked example, the cases and their values are not printed here. This shows agreement with this project's recorded cases. It does not show that a method suits your work, and it is not a qualification.

### What was not checked

Restricted randomisation (within replicate or block), split-plot designs and hard-to-change factors are not offered; a seed's order is not checked against any other generator; fractions above 11 factors; blocking; the choice of generators, which is the caller's (no table look-up); designs with more than 5 levels per factor; NIST's misprinted or abridged relations and chains are not asserted (the pyDOE3 companions cover those designs).

### Definition or model

A closed form: the result follows from the inputs by the equations alone.

### Equations

**Equation 1**

```equation
run r (counted from 0) sets base factor i to level index ⌊r / Π_{j<i} m_j⌋ mod m_i: the first factor changes fastest
runs N = R·(n_base + n_c), n_base = Π m_i for a full factorial and 2^(k − p) for a fraction. In the reply, run numbers count from 1
list positions count from 0 (entry i of every design column is run i + 1)
point is 'factorial' for a design run and 'centre' for a centre point
resolution is 'full' for a full factorial
```

| Symbol | Meaning and unit |
| --- | --- |
| r | run index within a replicate, counted from 0 |
| i, j | base factor positions in the order given, counted from 0 |
| m\_i | levels of factor i |
| N | runs in all |
| R | replicates |
| n\_base | runs per replicate before centre points |
| n\_c | centre points per replicate |
| k | factors |
| p | generators (added factors) of a fraction |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.3.3.3.1, standard order; Table 3.3, the online e-Handbook as served on the read date (page bytes pinned); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 89b6cc060b32. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

**Equation 2**

```equation
coding is by position in the list as given, never sorted: numeric level j of m (j counted from 0, levels listed ascending): x = −1 + 2j/(m − 1)
categorical: x = −1, +1 at two levels, and x = j + 1 (codes 1 … m) above two
```

| Symbol | Meaning and unit |
| --- | --- |
| x | coded value |
| j | level position in the list as given, counted from 0 |
| m | levels of the factor |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.3.3.3.2: low −1, high +1; the multi-level and categorical rules as ruled by Drybench (ruling of 10 November 2026, point 5), the online e-Handbook as served on the read date (page bytes pinned); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning f2e0d675dffb. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

**Equation 3**

```equation
an added factor's column is the product of its generator's base columns: X_a = Π_{b ∈ word} X_b
```

| Symbol | Meaning and unit |
| --- | --- |
| X | coded column |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.3.3.4.2 (X3 = X1\*X2) and 5.3.3.4.3 (design generator, "3 = 12", I = 123), the online e-Handbook as served on the read date (page bytes pinned); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning 49766821e7f4. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

**Equation 4**

```equation
the words {a} ∪ word_a and all their products under symmetric difference (x·x = I), 2^p − 1 words
resolution = the length of the shortest word
the aliases of an effect e are e·w for every word w. Order in the reply: a word (in definingRelation, an effect, or an alias) lists its factors' names in the order the factors are given
definingRelation lists its words shortest first, and words of one length in lexicographic order of their factor positions (at the first position where two words differ, the word with the earlier factor comes first: ABE before ACD)
aliases has one entry for each main effect in factor order, then for each two-factor interaction (i, j), i < j, in lexicographic order ((1, 2), (1, 3), …, (k − 1, k))
each entry's aliasedWith lists e·w for every word w, sorted by the same rule as definingRelation (shortest first, then lexicographic in factor positions), not in the order of the words w
```

| Symbol | Meaning and unit |
| --- | --- |
| p | number of generators |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.3.3.4.4: the construction (6 = 345), the defining relation (2^p − 1 words) and resolution (the length of the shortest word), the online e-Handbook as served on the read date (page bytes pinned); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning b7793616ebe9. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

**Equation 5**

```equation
a centre point is coded 0 on every factor, and its natural value for a factor is the midpoint of the factor's two levels, (low + high)/2, in the levels' unit. In standard order a replicate's centre points follow its runs (the suite's convention)
NIST 5.3.3.3.2 recommends centre points at the beginning, the middle and the end of the experiment, which standard order does not do: choose the randomised order, or place them yourself
```

| Symbol | Meaning and unit |
| --- | --- |
| low | the factor's first (lower) level (in the caller's unit), as-given |
| high | the factor's second (higher) level (in the caller's unit), as-given |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.7, glossary: Center Points (points at the center value of all factor ranges) and Coding Factor Levels (a = (X\_h + X\_L)/2; the center point, where the coded value is 0, at a), the online e-Handbook as served; sha256 is of the page bytes read on 10 November 2026, kept as historical, not re-matchable after 14 November 2026: per-request challenge script. Text re-read at source on 14 November 2026 and pinned by hash: SHA-256 e95bd1ddc777bc6f159263f3a677fc78b7786ac542733670761ddf32d5b8ecb9 of the page text extracted by pipeline/library/statistics-design/nist\_page\_text.py (SHA-256 afe282c1aaa05be3a46a41a2f99f220e0152425c9dc235f57a3bcfdc7dae575b; Python 3.13 html.parser, script, style and noscript dropped, Unicode NFC, whitespace collapsed to one space); read in full on 2026-11-14 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning ecaf5dfd4516. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

**Equation 6**

Definition: the order in which the tool checks a call, the suite's convention, stated so that a call meeting two rules has one answer.

```equation
a call is checked in this order, and the first rule it meets answers: (1) the kit's schema and argument checks, all invalid input (an unknown or misspelt argument, a type, a count, a unit
a seed given with runOrder 'standard' is UNKNOWN_ARGUMENT, a missing seed with 'randomised' MISSING_ARGUMENT)
(2) each factor in the order given: a numeric factor without levels, or a categorical one without levelNames, MISSING_ARGUMENT, and the other list given as well INVALID_OPTION
(3) DUPLICATE_NAME
(4) each factor in the order given: LEVELS_TOO_FEW, then LEVELS_EQUAL or LEVELS_NOT_ASCENDING at the first adjacent pair of levels that fails (a categorical factor: LEVELS_EQUAL for a repeated name)
(5) a fraction without generators MISSING_ARGUMENT, a full factorial with generators INVALID_OPTION
(6) refused: the number of factors OUT_OF_RANGE, then a full factorial's levels above five OUT_OF_RANGE, or a fraction's factor not at two levels NOT_TWO_LEVEL
(7) with centre points: CENTRE_CATEGORICAL, then CENTRE_NOT_TWO_LEVEL
(8) each generator in the order given: GENERATOR_INVALID
then a word that uses an added factor GENERATOR_INVALID
then GENERATORS_DEPENDENT
(9) the runs in all OUT_OF_RANGE
```

| Symbol | Meaning and unit |
| --- | --- |
| k | factors |

**Equation 7**

```equation
complete randomisation: one Fisher–Yates shuffle of all N runs (replicates and centre points included) by the shared generator prng 1.0.0 from the caller's seed
run k (1-based) is the standard-order run at the shuffle's position k − 1
a run's standard-order position (1-based) is (replicate − 1)·(n_base + c) + standardOrder, standardOrder restarting in each replicate (n_base base runs, c centre points per replicate)
```

| Symbol | Meaning and unit |
| --- | --- |
| N | runs |
| n\_base | runs per replicate before centre points |
| c | centre points per replicate |
| k | position in run order, counted from 1 |

Source: NIST/SEMATECH e-Handbook of Statistical Methods, section 5.3.3 (How do you select an experimental design?), section 5.7, glossary: randomization (the conditions in one run neither depend on the previous run nor predict the next) and blocking ("achieved by restricting randomization"; not offered); the shuffle is the prng record's; the placement of replicates and centre points in one permutation is the library's stated convention (Drybench ruling, 10 November 2026, randomisation), the online e-Handbook as served on the read date (page bytes pinned); read in full on 2026-11-10 by an AI-assisted session; not yet checked by a person. Read from the file itself, SHA-256 beginning ecaf5dfd4516. Free to read (US Government work, not subject to copyright in the United States), checked 2026-11-11. No erratum found (searched the e-Handbook pages read: no errata notice or revision note on them), 2026-11-11.

### Conventions

What each mode computes:

- `type = full`: Every combination of the factors' levels (2 to 5 each), in standard order; no relation or aliases (a full factorial aliases nothing): with report 'design-and-aliases', definingRelation and aliases are returned as empty lists, and resolution is 'full'.
- `type = fractional`: The two-level fraction 2^(k−p) in which each added factor is the product of its stated generator's base factors, in standard order of the base, with its defining relation, resolution and aliases.
- `runOrder = standard`: Standard order: the first factor changes fastest; each replicate's runs, then its centre points.
- `runOrder = randomised`: Complete randomisation of all N runs, replicates and centre points included: replicate numbers label copies of the design, not batches or days. Choose the seed before you see the order. This seed reproduces this order only with doe-factorial 1.1.0 or 1.1.1 (the same order) and pcg32-xsh-rr\@1.

### Constants

Constants: none used.

### Worked example

Worked example: one case of doe-factorial\@1.1.1, from its inputs through each step to the answer. Values are written as a person writes them; the working carries more digits, so your own figure may differ in the last digit shown.

**Inputs**

- type = full
- factors\[0\].name = temperature
- factors\[0\].kind = numeric
- factors\[0\].levels\[0\] = 20 degC
- factors\[0\].levels\[1\] = 25 degC
- factors\[0\].levels\[2\] = 30 degC
- factors\[0\].levels\[3\] = 37 degC
- factors\[1\].name = medium
- factors\[1\].kind = categorical
- factors\[1\].levelNames\[0\] = A
- factors\[1\].levelNames\[1\] = B
- centrePoints = 0
- replicates = 1
- runOrder = standard
- report = design

**Steps**

1. n-runs = 8, from factors; by equation 1; gives runs.
2. c-first = -1, from factors\[0\].levels\[0\]; by equation 2; gives design.coded\[0\].values\[0\].
3. c-second = -0.33333333, from factors\[0\].levels\[1\]; by equation 2; gives design.coded\[0\].values\[1\].
4. c-medium-b = 1, from factors\[1\].levelNames\[1\]; by equation 2; gives design.coded\[1\].values\[4\].

The working, as the case writes it:

```equation
c_j = -1 + 2(j-1)/3: j = 1..4 gives -1, -1/3, 1/3, 1
the two-level categorical factor is coded -1 (A), +1 (B)
factor 1 fastest
```

**Answer**

- `runs` = **8**
- `design.coded[0].values[0]` = **-1**
- `design.coded[0].values[1]` = **-0.33333333**
- `design.coded[1].values[4]` = **1**

Where these values came from: our own exact-arithmetic script and a hand-worked case; exact arithmetic.

At build the tool returned this answer within the tolerance the file states: exact: run indices, counts, words of the relation, alias sets, resolution, statuses and codes; coded values to 1e-15 absolute; natural values exact.

Who worked this case: not recorded.

### What it refuses, and its input ranges

- `OUT_OF_RANGE`: a full factorial with fewer than 2 or more than 10 factors, or more than 5 levels for a factor; a fraction with fewer than 3 or more than 11 factors; any design of more than 2048 runs in all, replicates and centre points included (Drybench ruling, 11 November 2026, the reply cap) Next: Use fewer factors, levels or runs within the stated limits, or a two-level fraction with your generators for more factors.
- `NOT_TWO_LEVEL`: a fraction with a factor not at two levels Next: Give every factor of a fraction exactly two levels, or ask for a full factorial.
- `GENERATOR_INVALID`: a generator naming an unknown or repeated factor, a word of one letter, or a word using an added factor Next: Write each generator as a product of two or more distinct base factors, each named once.
- `GENERATORS_DEPENDENT`: two added factors with the same word Next: Give each added factor a different generator word.
- `CENTRE_CATEGORICAL`: centre points with a categorical factor Next: Leave out centre points, or make every factor numeric.
- `CENTRE_NOT_TWO_LEVEL`: centre points with a factor not at two levels Next: Leave out centre points, or give every factor two levels.
- `DUPLICATE_NAME` (invalid input): two factors share a name
- `LEVELS_TOO_FEW` (invalid input): a factor with fewer than two levels
- `LEVELS_EQUAL` (invalid input): a factor with two equal levels
- `LEVELS_NOT_ASCENDING` (invalid input): a numeric factor's levels not listed ascending; they are never sorted, because coding is by position

### Changes

#### 2026-11-14-doe-factorial\@1.1.1-1

2026-11-14 · [`doe-factorial@1.1.1`](https://www.drybench.com/methods/m/doe-factorial) · Corrections to our methods

- **What was wrong:** A centre point's natural value was computed as (low + high)/2, which overflows when both levels are near the largest double (low 1e308, high 1.7e308): the call failed instead of answering.
- **Affected:** Calls to doe\_factorial\_design with centre points and a factor whose two levels sum beyond the largest finite double, in 1.1.0 and before. No call without centre points, or whose levels sum within the double range, is affected.
- **What changed:** In 1.1.1 the centre is low/2 + high/2 where low + high overflows (1.35e308 for these levels), the correctly rounded midpoint. Every other value is unchanged, bit for bit; no published case moved. The record now also states the order of the words in the defining relation and the alias lists, the order the tool always used.
- **How it was found:** A second implementation written from the record by a separate agent, in the raising run of 14 November 2026 (findings F-15 and F-17).
- **Cases added:** stored reference values: the agent's overflow case, two more at the ends of the double range, and the 34 cases with a defining relation and aliases, their word order checked against the stated rule.

## Tools that use it

- [`doe_factorial_design`](https://www.drybench.com/methods/tools/doe-factorial-design)

## Cite this version

Full factorial and two-level fractional factorial designs in standard or seeded randomised order, with the defining relation, resolution and aliases. Drybench; doe-factorial\@1.1.1; [https://www.drybench.com/methods/m/doe-factorial/1.1.1](https://www.drybench.com/methods/m/doe-factorial/1.1.1) (accessed \[date\]).
