4.4 Orthogonal polynomials

When the factor is quantitative with equally spaced levels and equal replication, the regression analysis of Example 3.7.2 can be done with contrasts. The coefficients of the orthogonal polynomials are chosen so that the \(k\)th contrast measures the component of the trend in the means that is a polynomial of degree \(k\) and is orthogonal to all lower degrees.

coefficients
\(t\) component
\(3\) linear \(-1\) \(0\) \(1\)
quadratic \(1\) \(-2\) \(1\)
\(4\) linear \(-3\) \(-1\) \(1\) \(3\)
quadratic \(1\) \(-1\) \(-1\) \(1\)
cubic \(-1\) \(3\) \(-3\) \(1\)
\(5\) linear \(-2\) \(-1\) \(0\) \(1\) \(2\)
quadratic \(2\) \(-1\) \(-2\) \(-1\) \(2\)
cubic \(-1\) \(2\) \(0\) \(-2\) \(1\)
quartic \(1\) \(-4\) \(6\) \(-4\) \(1\)

The coefficients come from applying the Gram–Schmidt process to the vectors \((x_1^k, \dots , x_t^k)\), \(k = 0, 1, \dots , t - 1\), for the coded levels \(x = 1, 2, \dots , t\), and scaling the results to integers. For \(t = 4\), for example, the linear vector must be orthogonal to \((1, 1, 1, 1)\), which gives \(x - \bar x = (-1.5, -0.5, 0.5, 1.5)\), or \((-3, -1, 1, 3)\); the quadratic is \(x^2\) minus its projection on the constant and linear vectors, which is proportional to \((1, -1, -1, 1)\). Because each successive vector is orthogonal to all lower powers, the \(k\)th contrast sum of squares is exactly the increase in the regression sum of squares when \(x^k\) is added to a polynomial of degree \(k - 1\).

Example 4.4.1. For the temperature data of Example 3.7.2 the totals at \(150\), \(160\), \(170\) and \(180\,^\circ \)C are \(190\), \(214\), \(228\) and \(227\), with \(r = 3\) and \(MSE = 2.00\). Then

component \(\sum c_iy_{i\cdot }\) \(SS_C = (\sum c_iy_{i\cdot })^2/(3\sum c_i^2)\) \(F_0\) \(p\)
linear \(125\) \(125^2/60 = 260.42\) \(130.2\) \(< 0.0001\)
quadratic \(-25\) \(25^2/12 = 52.08\) \(26.04\) \(0.0009\)
cubic \(-5\) \(5^2/60 = 0.42\) \(0.21\) \(0.66\)
total \(312.92 = SS_{\mathrm {Treatments}}\)

These are exactly the sums of squares found by regression in Example 3.7.2: \(260.42\) for the straight line, \(312.50 - 260.42 = 52.08\) for adding \(x^2\), and the lack of fit \(0.42\) of the quadratic. The linear and quadratic components are significant and the cubic is not, so a quadratic describes the trend, with the curvature negative as the sign of the quadratic contrast shows.

Questions on this section

Stuck on something here? Ask below and it stays attached to this topic.