Skip to content

Home / DOE / Charts / Cube Plot / Math Details

Math Details

This page gives the values a cube plot draws and how each one is formed: which corner is which, what number each corner carries under each of the two sources, when a corner is left blank, and how the corner labels are rounded.

Notation

Term Description
\(J\) the number of cube axes, \(2\) or \(3\)
\(A_j\) the factor on axis \(j\), for \(j = 0, 1, \dots, J - 1\), in the order the dialog lists them
\(\ell_j\), \(h_j\) the low and the high position of axis \(j\)
\(q\) a corner, numbered \(0\) to \(2^{J} - 1\)
\(p_{qj}\) the position of corner \(q\) on axis \(j\): \(0\) for low, \(1\) for high
\(t_k\) the set point typed or picked for factor \(k\)
\(\mathbf{z}\), \(z_k\) the vector of factor settings handed to the prediction equation, and its entry for factor \(k\)
\(\hat{y}_q\) the value at corner \(q\) from a regression sheet
\(R_q\), \(n_q\) the runs sitting at corner \(q\), and how many of them there are
\(y_r\) the response measured on run \(r\)
\(\bar{y}_q\) the value at corner \(q\) from a design sheet, on the response level
\(G_q\) the replicate groups the runs of \(R_q\) fall into
\(G^{+}_q\) those groups of \(G_q\) that hold two or more runs, the only ones that produce a standard deviation
\(R_{qg}\), \(n_{qg}\) the runs of replicate group \(g\) within \(R_q\), and how many of them there are
\(\bar{y}_{qg}\) the mean of the responses in \(R_{qg}\)
\(s_{qg}\) the sample standard deviation of the responses in \(R_{qg}\)
\(\bar{s}_q\) the value at corner \(q\) from a design sheet, on the standard deviation level
\(c_j\), \(b_j\) the coded value and the coefficient of model term \(j\)

Which corner is which

A corner is a choice of low or high on every axis, and the corners are numbered in binary. Corner \(q\) sits at the low position of axis \(j\) when bit \(j\) of \(q\) is zero and at the high position when it is one:

\[ p_{qj} = \left\lfloor \frac{q}{2^{j}} \right\rfloor \bmod 2, \qquad q = 0, 1, \dots, 2^{J} - 1 \]

So two axes give four corners and three give eight. Axis \(0\) is the horizontal one, axis \(1\) the vertical one, and axis \(2\), when present, the depth one.

The two positions of an axis are decided by the kind of factor. For a categorical factor they are its two levels, in the order the model holds them, and the corner labels are the level names. For the block they are its two blocks, labelled with the block numbers \(1\) and \(2\). For a quantitative factor they are the two distinct values that factor actually took across the loaded runs, with the smaller taken as the low position:

\[ \ell_j = \min\left(\text{the two observed values}\right), \qquad h_j = \max\left(\text{the two observed values}\right) \]

It is the loaded data that decides, not the design. The engine walks the loaded runs and collects the distinct values of the factor; a factor that shows three of them cannot be an axis, and one that shows exactly two can be, whatever the design declared. This is also why a design with centre points cannot carry a cube on the factors those centre points move: a centre point is a third distinct value.

A value predicted from a regression sheet

The engine takes the set points as they stand, overwrites the entries belonging to the axis factors with that corner's own positions, and hands the result to the prediction equation:

\[ z_k = \begin{cases} \ell_j, & k = A_j \text{ and } p_{qj} = 0 \\ h_j, & k = A_j \text{ and } p_{qj} = 1 \\ t_k, & k \text{ is not an axis factor} \end{cases} \]

The set points of the axis factors are overwritten at every corner, so they are never read. The dialog leaves those factors off the set-point list for that reason.

Each entry is then coded, and the coded values are combined with the coefficients already on the regression sheet:

Every quantitative factor is put on a common scale before the regression runs. One expression does it, whichever coding is in force, using a centre \(m_c\) and a scale \(s_c\) that the coding chooses:

\[ x_{\text{coded}} = \frac{x - m_c}{s_c} \]

A categorical factor is never coded this way. Its coded value is \(1\), and the level it sits at selects which coefficient is used instead.

An interaction's coded value is the product of the coded values of the factors in it.

A prediction is the sum, over every term in the model, of that term's coded value times its coefficient:

\[ \hat{y} = \sum_{j} c_j \, b_j \]

where \(c_j\) is the coded value of term \(j\) at the settings you asked about and \(b_j\) is its coefficient from the regression table. The constant term has \(c_j = 1\), so its coefficient enters as itself.

A term that is absent from the regression table, or switched off for the level being predicted, contributes \(b_j = 0\).

For a binary output the same sum is formed and passed through the logistic function:

For a binary output the same sum is formed first, then passed through the logistic function to give a probability:

\[ p = \frac{1}{1 + e^{-\sum_j c_j b_j}} \]

That is the probability of the first level. The probability of the second is \(1 - p\).

For a nominal output there is one sum per level:

For a nominal output with \(L\) non-reference levels there is one sum per level, \(\eta_k = \sum_j c_j b_{jk}\), and the probability of level \(k\) is

\[ p_k = \frac{e^{\eta_k}}{1 + \sum_{l=1}^{L} e^{\eta_l}} \]

The \(1\) in the denominator is the reference level, whose \(e^{\eta}\) is \(1\) by construction. So the reference level's own probability is

\[ p_{\text{ref}} = \frac{1}{1 + \sum_{l=1}^{L} e^{\eta_l}} \]

and the probabilities across all levels sum to \(1\).

Which coefficients are used follows the level you ticked. On a quantitative output the Y-Hat level reads the response model's coefficients and the S-Hat level reads the standard deviation model's, so on that level each corner carries a fitted standard deviation.

Every corner of a regression-source cube carries a value. The model can be evaluated at any combination of settings, whether or not the experiment visited it, so a fractional design still fills all four or all eight corners.

A value read from a design sheet

A design-source cube reads no set point at all. Each corner is an average over every run that sits at it, whatever the remaining factors were doing in those runs, so there is nothing to hold constant and the dialog hides the set-point box entirely.

A run belongs to corner \(q\) when its value on every axis factor matches that corner's position on that axis. With the two-position rule in force there is no third possibility, so every loaded run belongs to exactly one corner.

The response level. The corner is the mean of the responses of its runs:

\[ \bar{y}_q = \frac{1}{n_q} \sum_{r \in R_q} y_r \]

The standard deviation level. The runs at the corner are first split into their replicate groups. Each group of two or more runs gives one sample standard deviation:

\[ s_{qg} = \sqrt{\frac{1}{n_{qg} - 1} \sum_{r \in R_{qg}} \left(y_r - \bar{y}_{qg}\right)^2} \]

and the corner is the mean of the standard deviations that were produced, which is one per group of two or more runs:

\[ \bar{s}_q = \frac{1}{\lvert G^{+}_q \rvert} \sum_{g \in G^{+}_q} s_{qg} \]

The divisor counts only the groups that produced a standard deviation, exactly as on the interaction family. A group holding a single run produces none, and it is left out of the sum and out of the divisor alike.

Corners that stay blank

Only a design-source cube can have one.

  • On the response level, a corner with no runs at all is left blank. A fractional design is the usual reason: the corners it did not run have nothing to average.
  • On the standard deviation level, a corner is blank when it holds no replicate group of two or more runs. A corner with runs but no replication is therefore blank rather than zero, which is the honest answer: one measurement says nothing about spread.
  • A corner whose average comes out as something other than a finite number is also left blank rather than printed.

A regression-source cube never has a blank corner.

The corner labels

Every corner is printed with the same number of decimal places, chosen once from the corners that carry a value. Blank corners take no part in the choice. The count is the most any one of those values needs under the product's nice-number rule, and the values are then written with exactly that many places, so a cube whose corners read 12.5 and 13.25 prints both to two places rather than printing one of them shorter.

This differs from the surface and contour charts, whose computed decimal counts reach the report and are never used, Excel's own General format deciding what their axis labels show. On a cube the count is read and applied.

Shared Math Details used here

This chart uses shared formulas defined once in Shared Math Details. See those pages for the exact definitions.

Shared concept Used here for Reference
Prediction equation the corner value when the source is a regression sheet Prediction Equation
Design coding turning a corner position or a set point into the coded value the prediction uses Design Coding

See Also

References

  1. Montgomery, D. C. (2013). Design and Analysis of Experiments, 8th edition. Wiley.