Why the experiment needs new factor locations
Four corners of a two-factor design can describe interaction but cannot estimate independent curvature along both axes. At every corner A² = B² = 1, linking both quadratic terms to the intercept. A centre point at A = B = 0 partly breaks that dependence. It permits comparison of the centre against the corner mean but still cannot separate A² from B². Additional axial points provide the missing geometric information.
The new case extends the question from the factorial comparison: which setting within −1 ≤ A,B ≤ +1 combines high product mass with Q ≥ 0.90? Bounds and quality index remain teaching assumptions. The response surface is an empirical approximation within this region, not a biological mechanism or a validated design space.
The second file is a separate synthetic experimental stage. The previous 24 observations are not silently pooled with its 13 rows. A real sequential design would need shared reference points and a suitable block model to address changes between stages. The ability to merge files does not establish that every observation represents the same process state.
A face-centred design with 13 runs
The design contains four corners, four axial points and five conceptually independent centre replicates. Axial points lie at the midpoints of the boundary edges: (−1,0), (+1,0), (0,−1), (0,+1). None exceeds the specified factor bounds. This central composite variant is face-centred with axial distance α = 1. It should not be described as rotatable. The NIST comparison of CCD variants distinguishes it from circumscribed and inscribed alternatives.
Five centre observations provide four degrees of freedom for estimating repeatability at the centre. They do not establish the same variance at the corners. Equality can fail when concentrations approach an analytical detection limit or a treatment produces highly variable cultures. The design creates opportunities for checking assumptions; it does not make them true automatically.
| A | B | Y / g | Q |
|---|---|---|---|
| -1 | -1 | 22.4 | 0.9708 |
| 1 | -1 | 29.3 | 0.9486 |
| -1 | 1 | 28.2 | 0.9604 |
| 1 | 1 | 44.5 | 0.8210 |
| 0 | -1 | 29.8 | 0.9746 |
| 1 | 0 | 41.1 | 0.9002 |
| 0 | 1 | 39.7 | 0.9044 |
| -1 | 0 | 29.0 | 0.9800 |
| 0 | 0 | 38.4; 38.7; 39.0; 39.3; 39.6 | 0.9538 to 0.9562 |
Quadratic model and coefficients
The model row is [1, A, B, AB, A², B²]. Each response is fitted separately. Rounded mass coefficients give Ŷ = 38.9586 + 5.8833A + 5.1500B + 2.3500AB − 3.8052A² − 4.1052B², in g. Quality is fitted as Q̂ = 0.954917 − 0.040233A − 0.034700B − 0.029300AB − 0.014610A² − 0.015210B². The script retains unrounded coefficients for subsequent calculations.
Removing a main effect solely because of an isolated significance statistic while retaining its interaction or square term can be unhelpful. The meaning of other coefficients depends on coding and model structure. This transparent teaching case retains the complete pre-specified quadratic model. The NIST response-surface case study illustrates model hierarchy and separate consideration of multiple responses; none of its observations is reused here.
The six columns are independent, so the matrix has rank six. Thirteen observations leave seven residual degrees of freedom. For mass, SSE = 1.1654 g² and MSE = 0.16649 g². Residual standard deviation is approximately 0.4080 g. These are properties of this synthetic dataset and fit, not claims about real fermentation variability.
Compare model discrepancy with replication variability
The five centre masses have mean 39.0 g. Their squared deviations sum to 0.9 g², giving pure replication variance 0.225 g² with four degrees of freedom. Subtracting this from the total residual sum of squares leaves 1.1654 − 0.9 = 0.2654 g² for lack of fit. Nine distinct factor locations and six model parameters leave three degrees of freedom for this component. The resulting ratio is F = (0.2654/3)/(0.9/4) ≈ 0.3932.
This ratio compares two conditional estimates of variance. Its small value means that differences between location means and the quadratic surface do not look large relative to centre-point variation here. It does not guarantee the absence of important structure elsewhere. Interpretation assumes, among other things, comparable error variances and suitable independent replication. The NIST explanation of lack-of-fit testing describes the decomposition and the additional value of residual examination.
In real experiments, examine residuals against predictions, factor settings and actual execution order. Curvature can indicate missing model structure; a step in chronological order may indicate a process or measurement change. Investigate an observation with a large residual. Removing it merely because R² subsequently increases is not a sound reason. Equally, apparently normal residuals from only 13 observations do not robustly establish a distributional assumption.
A mathematical maximum can be inadmissible
A stationary point has zero partial derivatives. For the mass model, solve 5.8833 + 2.35B − 7.6103A = 0 and 5.15 + 2.35A − 8.2103B = 0 together. The unrounded solution is A ≈ 1.06049 and B ≈ 0.93080. The Hessian has negative eigenvalues, so the quadratic surface is concave and its stationary point is the unconstrained maximum.
That calculation does not settle the decision. First, A exceeds the investigated upper bound of +1. Second, predicted quality is only Q̂ ≈ 0.82142. The predicted mass of approximately 44.4750 g is therefore neither an admissible setting within the design nor a setting meeting the quality condition. Calling it an optimum does not justify recommending it.
Even a stationary point inside the bounds would initially be a model prediction. A few observations or another plausible model form can shift its location. Where a surface is flat, locating the exact maximum may matter less than identifying a broad region with adequate quality and limited sensitivity. Many reported decimal places must not imply an equally precise biological operating recommendation.
Consider the quality limit and operating margin together
The script searches the square on a grid of 0.005 coded units and initially retains only points with predicted Q ≥ 0.90. The best grid point is A = 0.570, B = 0.465, with Ŷ ≈ 43.2058 g and Q̂ ≈ 0.900047. This is a grid result, not an exact continuous optimum. More importantly, it leaves essentially no model margin above the quality boundary.
The separate confirmation deliberately selects A = 0.6, B = 0.3 instead. Predictions are Ŷ ≈ 42.7173 g and Q̂ ≈ 0.908465. Predicted mass is approximately 0.4885 g below the best grid point, while predicted distance from the quality boundary is larger. This is an explicit teaching decision favouring quality margin, not a universally appropriate safety margin inferred from data.
In actual development, margin must reflect measurement uncertainty, run variation and allowable setting deviations. A mean quality prediction above the boundary is insufficient by itself. Pre-specified rules might use an appropriate lower prediction or tolerance bound when data and model support that approach. A confidence interval for the mean is not interchangeable with an interval for the next individual batch.
Evaluate confirmation separately from fitting
The six confirmation rows were not used for fitting. Three candidate runs yield mean mass 42.86 g; their day-matched references average 29.80 g. Mean paired difference is 13.06 g. Mean candidate mass is approximately 0.143 g above its model prediction. All three quality observations meet the teaching condition, the minimum being 0.90435. These quantities illustrate comparing predictions with genuinely separate observations.
Confirmation observations are also constructed. Their paired mass differences are deliberately identical, so no formal significance claim is calculated from them. Real confirmation must capture observed variation and apply pre-specified mass and quality criteria. Three successful demonstrations establish neither long-term process capability nor a general failure probability.
If confirmation fails, identify which prediction failed: mass, quality, reproducibility or transfer to the new day. Do not silently include the new observations in the fit and continue calling them independent confirmation. Updating the model with new data is reasonable, but it creates a new development stage requiring further independent assessment. See paired confirmation for the day-matching structure.
Model limitations and useful follow-up experiments
| Observation | Possible interpretation | Useful additional information |
|---|---|---|
| Maximum lies beyond the bounds | The experiment does not contain the stationary point | First establish biological and engineering acceptability of expansion |
| High mass but inadequate Q | Multiple objectives are not jointly improved | Investigate quality mechanism and an acceptable trade-off |
| Candidates vary more than references | A shared residual variance may be unsuitable | Add independent replication at relevant locations |
| New days shift only one treatment | Treatment-by-day interaction may exist | Compare treatments within additional shared blocks |
| Good fit but poor confirmation | Check model selection, temporal change or extrapolation | Review raw data, execution records and the prediction basis together |
| Flat surface near the boundary | The point maximum may be unstable | Assess sensitivity to realistic setting deviations |
A response surface is most useful when it sharpens the next investigation. The result here is not “release 43.2058 g”. It is to select a candidate with an explicit quality margin, test it independently against the reference, and investigate as-yet unestablished variability and transferability. Do not equate an investigated operating region with a design space.
Coded distance is a defined computational quantity
A and B are dimensionless coded factors, obtained by subtracting the physical midpoint and dividing by the respective half-step. A 0.1 step in A therefore has no universal physical size. Only the recorded inverse transformation converts it into a concentration or time change, for example. Transferring the calculation to another experiment requires midpoint, step size and underlying measurement definition together.
The teaching design is face-centred: four corners, four face centres and five centre observations remain within the square from −1 to +1. It is not automatically rotatable. Under an appropriate model, rotatability means prediction variance depends on distance from the centre but not direction. The NIST account of central composite designs distinguishes these properties. Choosing inner axial points here respects the selected region without providing every property of an outer-star design.
Consequently, two points at equal coded distance from the centre need not have equal prediction uncertainty in this design. A circular contour of predicted response likewise says nothing about circular uncertainty contours. Selecting a candidate near a quality boundary therefore requires both the predicted response and the information distribution of the actual executed design.
Verify the stationary point using derivatives
For the fitted model Y = b₀ + b₁A + b₂B + b₁₂AB + b₁₁A² + b₂₂B², gradient components are b₁ + b₁₂B + 2b₁₁A and b₂ + b₁₂A + 2b₂₂B. Setting them to zero gives a linear system with two unknowns. The Python calculation solves it independently of grid search, clearly separating an algebraic stationary point from an admissible discrete candidate.
The Hessian contains 2b₁₁ and 2b₂₂ on its diagonal and b₁₂ off the diagonal. Both diagonal terms in the teaching fit are negative and the determinant is about 56.961. The matrix is therefore negative definite, so the stationary point is a strict maximum of this quadratic model in unrestricted space. Its A coordinate, about 1.0605, nevertheless lies outside the investigated square. Its estimated Q also violates the quality condition.
This check prevents two mistakes. A zero gradient alone does not guarantee a maximum: a different Hessian could identify a minimum or saddle point. Even a mathematically unique maximum does not establish performance outside experimentally supported conditions. Constrained optimisation must explicitly include boundaries and other responses.
As an algebraic exercise, set b₁₁ and b₂₂ to zero while preserving other coefficients. With non-zero b₁₂, the Hessian then has eigenvalues of opposite signs, so any stationary point is a saddle. This purely mathematical change explains why the appearance of a coloured surface cannot replace classification of its curvature.
Predicting a mean and predicting a new run
At a chosen point, regression vector x₀ contains 1, A, B, AB, A² and B². Under the usual linear-model assumptions, estimated variance of the fitted mean is s²x₀ᵀ(XᵀX)⁻¹x₀. Predicting a new independent observation adds another s². A prediction interval for a new run is consequently usually wider than a confidence interval for the modelled mean at the same point.
This distinction matters particularly for a quality requirement. Estimated mean Q of 0.908 exceeds 0.900, but does not establish that a new process run will reliably meet the boundary. New-run variation, model uncertainty and unrepresented day or material effects are different contributions. The small 0.008 distance is therefore an unresolved assessment quantity, not a universal margin.
Disturbances in this dataset are deliberately constructed. Their residual variance demonstrates calculation without estimating real biological variability. Even a numerically narrow interval remains conditional on this teaching model. It cannot serve as experimental evidence of actual product quality. An actual decision needs suitable independent runs and a justified distributional or uncertainty assessment.
The reference file includes the inverse model matrix so prediction variances can be recalculated. Compare the centre, a corner and the chosen candidate. Also examine doubling assumed residual standard deviation: standard errors and corresponding interval half-widths double, while the already fitted mean surface remains unchanged.
Choose a follow-up that resolves a remaining question
A follow-up series can pursue different objectives. Local quality reliability calls for independent confirmations near the candidate and targeted nearby points. Uncertain curvature needs additional intermediate levels. Suspected day dependence requires new days with suitable comparisons. More repeats at the existing centre do not answer these three questions equally well.
Consider the candidate A = 0.6, B = 0.3. During computational planning, examine A ± 0.1 at constant B and B ± 0.1 at constant A. Differences in model response indicate local sensitivity. They are not observed robustness data, but help justify new measurement locations. Subsequent execution preserves a reference, randomisation and independent experimental units.
A multi-response decision can initially keep quantity and quality separate. The NIST overview of multiple-response optimisation describes different approaches. A combined desirability score may be useful but requires explicitly chosen weights and limits; it is not a natural law. With a hard quality constraint, favourable quantity must not hide a violation.
Compare new observations with the predictions specified before the follow-up. Only afterwards may an updated combined fit be appropriate. Immediately fitting confirmation data into the model and then calling them independent confirmation loses that distinction. A continuing development process therefore preserves the sequence of planning, prediction, new observation and model update.
Working case: local margins rather than one optimal coordinate
Assess a candidate together with small achievable setting deviations rather than only its two nominal coordinates. In this model the question can initially be examined computationally. Use (0.6, 0.3), alter one coordinate by ±0.1 at a time and keep the other fixed. Calculate both Y and Q for all five points using the same coefficients. Local differences reveal which direction approaches the quality boundary.
This is a model prediction across a small region, not an already confirmed robust operating space. If actual setting uncertainty exceeds ±0.1, the neighbourhood is inadequate. If A and B vary together, a cross of four neighbouring points additionally omits diagonal combinations. A realistic disturbance model should use observed dependencies and setting limits.
A useful decision record therefore separates modelled mean response, assumed actual setting variation and additional new-run variation at identical settings. Only the first follows directly from the six fitted coefficients. The other two need their own data or explicit assumptions. A coloured mean-response contour does not answer them.
Also consider grid-search resolution. The supplied script examines increments of 0.005 in A and B inside the investigated square. Its best point is the best member of that discrete grid under the fitted quality condition, not automatically the exact mathematical maximum of the continuous constrained problem. Finer search may slightly move the coordinate without proportionally improving biological knowledge.
Coordinate rounding also matters. If a boundary-near point is rounded to practically achievable settings, recalculate Y and Q at that rounded combination. Do not retain the original Q next to a new coordinate. With little margin, even modest rounding can cross the model boundary. Choosing a deliberately more interior candidate is therefore a defensible engineering decision when its quantity cost and expected extra distance are explicit.
Before a follow-up, record selected neighbouring points, the predicted directional pattern and the criterion that would trigger another question. A reversed observed local difference, for example, could suggest inadequate curvature, changed culture state or unsuitable measurement. Compare the new data with that specific prior expectation before using them to update the model.
Files and methodological follow-up
- 13 synthetic response-surface observations
- Six separate confirmation runs
- Python calculation with rank, fit and constrained grid search
- Coefficients and results before table rounding
- Data dictionary, units and modelling assumptions
The teaching calculation uses standard-library functions and a small linear equation system. Numerically robust statistical routines are preferable for real ill-conditioned or large datasets. The transparent solver explains the calculation rather than replacing general statistical software. It stops when rank deficiency is detected; a mathematically solvable model still requires scientific scrutiny.
The linked NIST pages on CCD variants, model hierarchy and lack of fit provide methodological follow-up. The separate explanation of confirmation runs addresses the decision after fitting. Every number in this chapter comes from the disclosed synthetic case.
Terms in this chapter
29 terms explained in the glossary
- Central composite design
- Coefficient of determination
- Confidence interval
- Degrees of freedom
- Detection limit
- Eigenvalue
- Experimental factor
- Extrapolation
- Factor coding
- Fermentation and fermenter
- Hessian
- Independent replication
- Lack of fit
- Main effect
- Mean square error
- Measurement uncertainty
- Model matrix
- Prediction interval
- Randomisation
- Residual sum of squares
- Response surface
- Response variable
- Rotatability
- Saddle point
- Standard deviation
- Stationary point
- Statistical interaction
- Statistical residual
- Variance