A factorial experiment combines the settings of several factors. With two factors, each at two settings, there are four combinations. Three factors give eight combinations. Plotting the two settings along each axis turns the combinations into the corners of a square or cube.

Try the combinations

The starting example uses wing length and body length for a paper helicopter. Its response is flight time in seconds. These numbers are illustrative data, not measurements. Paper type stays Standard in the two-factor design; the three-factor design also compares Heavy paper.

Red edges identify factor A, green edges factor B, and blue edges factor C. The (−) end marks the low setting, and the (+) end marks the high setting. The two-factor square uses A and B.

Use Swap A/B, Swap A/C, or Swap B/C to exchange the factors' positions in the cube. The square offers Swap A/B. Each design's axis layout is saved in your browser separately for two and three factors. Swapping axes leaves your data and equations unchanged; Reset axes restores the default axis placement.

Change the factor settings or responses, then calculate the equation. You can add repeated observations at each combination. Switching between two and three factors restores the separate data for each design.

DESIGN OF EXPERIMENTS

Explore a factorial experiment with two or three factors: flight-demo

Starting dataset

Compare every combination of two settings for each factor. Enter your observations, explore the square or cube, and calculate an equation for the response.

YOUR EXPERIMENT, IN SPACE

One corner for each combination

Drag to rotate · select a corner
    Swap axes

    Select a corner or run to inspect its measurements.

    Colored edges show the factor directions: (−) is low and (+) is high. The shared (−) corner has every factor at its low setting. Corner colors show the responses. Space between category labels does not represent an intermediate category.

    01 · DEFINE THE DESIGN

    Factors and settings

    Give each factor two distinct settings: numbers such as temperature, or category names such as material. Low and high are coded as −1 and +1 in the equation.

    FactorTypeLow (−1)High (+1)Unit optional

    02 · RECORD THE RESPONSE

    Measurements at each combination

    Enter at least one response at every corner. Add measurements to keep repeated observations together; leave unfinished measurements blank.

    Your working data is saved in this browser. Refresh data restores this page's starting dataset.

    A two-level experiment can describe factor effects and interactions. It cannot establish curvature. With one numeric observation per corner, a perfect fit does not show predictive accuracy or statistical significance. Category probabilities are model estimates, not certainty.

    This article widget saves its own working copy in your browser. The DOE workbench has a separate record. Refresh data restores both designs to the article's starting values already loaded into this page.

    Code the settings

    The equations use -1 for a factor's low setting and +1 for its high setting. For a numeric factor with low value \(L\) and high value \(H\), the coded value is

    \[ x=\frac{u-(L+H)/2}{(H-L)/2}. \]

    For wing lengths of 4 and 6 cm, this maps 4 cm to -1 and 6 cm to +1. A categorical factor uses a label mapping instead: Standard paper is -1 and Heavy paper is +1. Positions between category settings describe the picture's layout; they do not define an intermediate kind of paper.

    Separate effects from interactions

    A full two-factor numeric equation contains the intercept, both factors, and their interaction:

    \[ \widehat{y}=b_0+b_Ax_A+b_Bx_B+b_{AB}x_Ax_B. \]

    For the illustrative two-factor values, the fitted equation in seconds is

    \[ \widehat{t}=1.975+0.225x_A-0.075x_B+0.025x_Ax_B. \]

    The average low-to-high change in wing length is 0.45 s, twice its coded coefficient. The corresponding body-length effect is -0.15 s. The interaction means the change associated with one factor depends on the other factor's setting. These are summaries of the entered illustration; they do not establish effects in a physical experiment.

    Adding a third factor adds its main term, two more pair interactions, and the three-factor interaction. The NIST factorial model describes this relationship between coded coefficients and factorial effects.

    A perfect fit needs context

    The full model has as many coefficients as corner means: four in the square and eight in the cube. With one result at every corner, it fits those results exactly and has zero residual error degrees of freedom. A perfect fit alone supplies neither a significance test nor evidence of predictive accuracy.

    Repeated measurements preserve each observation and help describe variation within a combination. The numeric equation is fitted to the corner means. The widget requires at least one numeric result at every corner before calculating that full equation. Two settings cannot establish numeric curvature; extra experimental settings would be needed.

    Responses can be categories

    A response such as Pass or Fail remains a named outcome. Select Categorical and enter the allowed labels to collect such observations. The run table shows category counts and proportions, including repeats.

    The fitted categorical equation estimates probabilities using a regularized logistic or multinomial model. It does not assign arbitrary measurement values to the labels. Regularization affects the fitted probabilities, so the result identifies its penalty setting and reports convergence problems. The logistic regression documentation describes the probability-model equations.

    Every corner needs a response, and every declared category must have an observation before this widget fits a categorical model. Its probability changes and logit coefficients have different meanings from the numeric DOE effects. Small samples can still produce uncertain predictions.

    Keep an editable record

    Your edits save in this browser and survive a normal reload. They do not update this article or appear on another device. Reset view changes the camera; Refresh data replaces the current widget's saved drafts with its loaded article seed after confirmation when necessary.

    An author can use Copy article data, paste the generated fragment into the article's Markdown frontmatter, and publish it through the normal content workflow. Those authored starting values become part of the article, while each reader's working copy stays local.

    References

    1. NIST: Factorial models
    2. scikit-learn: Logistic regression