GARETH GRANTTECHNOLOGY · DATA · INNOVATION
Explore

42 / Quality & reliability

Factorial experiments and interaction effects

A factorial experiment deliberately varies several factors together so their separate effects and interactions can be estimated. It helps a business learn whether a combination of settings, rather than one setting alone, changes accepted output or another response.

AdvancedLive exploration + Python

The business question

Does a process setting work differently when another setting changes?

  • Test combinations of processing temperature, setup method or material choice in a controlled pilot.
  • Discover whether a training or workflow change depends on another operating condition.

How the method works

A two-level full factorial runs every combination of low and high levels for the chosen factors. For two factors there are four treatment combinations before replication. Coding levels as −1 and +1 makes comparisons and the regression model convenient, but the actual temperatures, methods or speeds must still be clearly defined in operational terms.

A main effect compares the average response at a factor’s high level with its low level, averaged across the other factor. An interaction means that this difference depends on the other factor. In a two-factor coded model, the interaction term is the product of the factor codes. Looking only at main effects can miss a useful combination or recommend a setting that performs poorly in one condition.

Randomise the run order where feasible and replicate genuinely independent runs to estimate experimental error. Repeated readings of the same unchanged run are measurement repetitions, not independent process replication. Block predictable nuisance conditions such as day or batch when the design requires it. Two levels estimate a local contrast and interaction; they do not establish curvature or a global optimum outside the tested range.

The calculation

y = beta0 + betaA A + betaB B + betaAB AB + error, with A,B in {−1,+1}; two-level effect A = 2 betaA, effect B = 2 betaB, interaction effect = 2 betaAB.
Read the symbols
SymbolMeaning
yChosen response, such as accepted parts per run.
A, BCoded low/high settings of the two experimental factors.
betaABCoefficient describing how the effect of one factor changes with the other.

A worked business example

ILLUSTRATIVE SCENARIO

Illustrative manufacturing pilot: two setup factors are tested at low and high levels, with two independent runs per combination.

Inputs

  • Cell means: A− B− = 90; A+ B− = 100; A− B+ = 95; A+ B+ = 125 accepted units.
  • Each cell has responses two units below and above its mean: 88/92, 98/102, 93/97 and 123/127.

Work through the numbers

  1. A main effect = (100+125)/2 − (90+95)/2 = 20 units.
  2. B main effect = (95+125)/2 − (90+100)/2 = 15 units.
  3. AB interaction effect = (90+125−100−95)/2 = 10 units.
  4. The effect of A is 100−90 = 10 units at B−, but 125−95 = 30 units at B+.
  5. The coded regression coefficients are intercept 102.5, A 10, B 7.5 and AB 5.
The effect of A depends materially on B in this constructed pilot; the highest observed cell mean is A+ B+.

Averaging A’s effect into one number hides its 10-versus-30-unit conditional effect. Confirm quality, cost and repeatability before adopting the combination.

Explore the decision

Explore a replicated two-factor experiment. The live explorer has its own example inputs; it is separate from the worked calculation above.

Enable JavaScript to use this calculator. The worked example and executable Python remain available.

Apply it at work

  1. Choose a measurable response, feasible factor levels, business minimum worthwhile effect and practical safety limits.
  2. Design independent replication, randomisation and any necessary blocking before running the experiment.
  3. Fit the model with interaction terms, examine residuals and calculate uncertainty for planned contrasts.
  4. Run a confirmation trial at the proposed combination and check quality, total cost and any operating constraints.

Check these assumptions

  • Factors can be deliberately assigned and implemented at their specified levels.
  • Errors are sufficiently independent with suitable variance and distribution for the selected inferential model.
  • The design and model include important interactions or acknowledge what remains confounded.
  • Operating conditions and measurement methods remain comparable across randomised or blocked runs.

Common mistakes and how to avoid them

  • Changing one factor at a time can miss interactions and use experimental effort inefficiently.
  • Unreplicated designs do not automatically provide an independent estimate of experimental error.
  • The best cell within two selected levels does not establish a continuous or global optimum.

How this can help the business

  • A factorial pilot can compare interacting operating choices with fewer blind adjustments than isolated sequential changes.
  • Explicit interactions can explain why a process improvement transfers poorly between products, shifts or equipment settings.
A decision rule to adapt

Adopt a tested combination only after its worthwhile response change, uncertainty, quality guardrails and cost are supported by a confirmation trial.

When to use another approach

Use fractional factorial screening for many factors with understood aliasing, and response-surface designs when curvature and local optimisation are the objective.

Reproduce the worked example in Python

The code is self-contained for this example. Dependencies and run instructions are included with the downloadable notebook.

Show executable code and recorded output
import numpy as np
settings = [(-1,-1),(1,-1),(-1,1),(1,1)]
means = [90,100,95,125]
rows, values = [], []
for (a,b), mean in zip(settings,means):
    for error in [-2,2]:
        rows.append([1,a,b,a*b])
        values.append(mean+error)
beta = np.linalg.lstsq(np.array(rows),np.array(values),rcond=None)[0]
print("Intercept:",round(beta[0],3))
print("A, B and AB effects:",np.round(2*beta[1:],3).tolist())
print("A effect at B low:",100-90,"at B high:",125-95)

Recorded output

Intercept: 102.5
A, B and AB effects: [20.0, 15.0, 10.0]
A effect at B low: 10 at B high: 30
Download all worked examples

Sources and further reading

Concepts are linked to primary teaching or technical sources. The business examples are illustrative applications, not reported client results.