liveBook · Manning

Quadratic term

As explained in Experimentation for Engineers

A model term involving the square or pairwise product of predictor variables to represent curvature or interaction.

A quadratic term extends a regression model beyond straight-line effects. For parameters x1 and x2, squared terms x1² and x2² represent curvature, while the pairwise product x1x2 models behavior between parameters along diagonals. section 4.2.2

In a two-parameter response-surface model:

  • β3x1² and β4x2² allow a maximum to occur inside the parameter range rather than only at its edges. section 4.2.2
  • β5x1x2 captures joint behavior between the center and corner measurements of a central-composite design. section 4.2.2
  • With d parameters, one quadratic pair term is needed for every parameter pair: d(d−1)/2 terms. section 4.2.2

Trading-parameter optimization

A fitted model using threshold and order_size estimated maximum markout profit at threshold = 1.12 and order_size = 3.0, with estimated profit 0.41. The candidate required a separate validation measurement and 95% confidence check. section 4.2.2

Listing 4.9 Linear regression for two parameters
def linear_regression_2D(parameters, aggregate_measurements):
    parameters = np.array(parameters)                    #1
    x0 = parameters[:,0]                                 #2
    x1 = parameters[:,1]                                 #3
    y = aggregate_measurements
    X = np.array([np.ones(len(y)), x0, x1, x0**2, x1**2, x0*x1]).T
    beta = np.linalg.inv(X.T @ X) @ (X.T @ y)            #4
    return beta

The regression design matrix makes the constant, linear, squared, and cross-product terms explicit before fitting coefficients with the normal equation. section 4.2.2

How Experimentation for Engineers covers it

How deep it goes
Explains model structure, coefficient fitting, dimensional growth, surrogate interpolation, optimization, and validation, stopping at two practical parameters.
Examples
Uses threshold and order_size experiments, surrogate interpolation, and an estimated optimum at 1.12 and 3.0.
What you can do after
Apply via linear regression to fit and optimize a two-parameter quadratic surrogate, then validate its predicted optimum.
How it connects
Connects quadratic terms to response surface methodology, linear regression, central composite design, cross terms, and Bayesian optimization.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Experimentation for Engineers. The section links point to the parts of the book it draws on.