Tutorials › Regression Analysis (Undergraduate) › Testing for Quadratic Curvature

Polynomial Regression · Tutorial 431 of 991

Testing for Quadratic Curvature

You will test and estimate the squared-term coefficient in a quadratic mean model, interpret its sign and units, and connect its confidence interval to the test.

Intermediate 10 min read

What You'll Learn

  • State the quadratic mean model and the assumptions used for inference about its squared-term coefficient.
  • Form a two-sided hypothesis test for whether that coefficient is zero.
  • Calculate and interpret the coefficient’s t statistic, degrees of freedom, and p-value.
  • Construct and interpret a confidence interval for the squared-term coefficient.
  • Relate the coefficient’s sign and units to the model’s second derivative.
  • Recognize what a test for quadratic curvature does and does not establish.

Why Test the Squared-Term Coefficient?

A quadratic regression curve can bend upward or downward, unlike a straight line. In a specified quadratic mean model, the coefficient of the squared predictor term determines that bending: a positive coefficient gives positive second derivative, and a negative coefficient gives negative second derivative. Testing whether this coefficient is zero asks whether the model’s mean function has a quadratic component, conditional on the other terms in that model.

This is a focused inference question. A small p-value is evidence against a zero squared-term coefficient under the stated model and assumptions. It does not by itself establish that the model is a good description of the data, that a relationship is causal, or that a quadratic curve is preferable in every practical sense. Those questions require other assessments.

The Model and the Curvature Test

Definition: For predictor \(x\) and response \(Y\), the quadratic mean model is $$ E(Y\mid x)=\beta_0+\beta_1x+\beta_2x^2. $$ Here \(\beta_0,\beta_1,\beta_2\) are population model coefficients. The squared-term coefficient \(\beta_2\) determines curvature because the second derivative of the mean function with respect to \(x\) is \(2\beta_2\). If \(\beta_2=0\), the specified mean function is linear in \(x\).

The hypotheses for the usual two-sided test are \(H_0:\beta_2=0\) and \(H_a:\beta_2\ne 0\). The alternative says that the squared-term coefficient is nonzero; the data may support either upward or downward curvature. Use the coefficient estimate \(b_2\) from least squares and its standard error \(SE(b_2)\), which accounts for the estimation of all three coefficients in the model.

For exact small-sample t inference, assume the model errors are independent, normally distributed with mean zero and constant variance, conditional on the observed predictor values. Also require that the quadratic model is an appropriate specification for the conditional mean and that its design columns \(1,x,x^2\) are not exactly linearly dependent. With \(n\) observations and all three coefficients estimated, the residual degrees of freedom are \(df=n-3\). Under \(H_0\), the statistic below has a t distribution with these degrees of freedom.

$$ t=\frac{b_2-0}{SE(b_2)},\qquad df=n-3. $$

The two-sided p-value is the probability, assuming \(H_0\) and the model assumptions, of obtaining a t statistic at least as far from zero as the observed statistic: \(P(|T|\ge |t|)\), where \(T\) has a t distribution with \(n-3\) degrees of freedom. Compare this p-value with the chosen significance level \(\alpha\). If it is below \(\alpha\), reject \(H_0\); otherwise, do not reject \(H_0\). Not rejecting does not prove the coefficient is zero.

Worked Example: Evidence of Upward Curvature

Suppose a hypothetical experiment records a response \(Y\), in milligrams, at 24 predictor settings \(x\), measured in hours. The fitted specified model is \(E(Y\mid x)=\beta_0+\beta_1x+\beta_2x^2\), and the estimates are \(b_2=0.080\) milligrams per hour squared and \(SE(b_2)=0.030\) milligrams per hour squared. Assume the observations are independent, the residual plot gives no substantial evidence of changing variance or a missed mean pattern, and normal-error diagnostics are reasonably compatible with the model. The predictor values give full rank for \(1,x,x^2\). These checks support, but cannot prove, the assumptions.

Test \(H_0:\beta_2=0\) against \(H_a:\beta_2\ne0\) at \(\alpha=0.05\). There are \(df=24-3=21\) degrees of freedom, and

$$ t=\frac{0.080-0}{0.030}=2.6667. $$

For a two-sided t test with 21 degrees of freedom, the p-value is approximately \(0.01444\). Since \(0.01444<0.05\), reject \(H_0\). In this hypothetical setting, the data provide evidence that the squared-term coefficient in the specified mean model is nonzero. Its positive estimate indicates upward curvature; it does not show that the response increases at every value of \(x\).

A Confidence Interval for the Curvature Coefficient

A \(100(1-\alpha)\%\) confidence interval for \(\beta_2\) is formed by adding and subtracting a t-based margin of error from \(b_2\). It uses the same model assumptions and residual degrees of freedom as the test.

$$ b_2\ \pm\ t^*_{1-\alpha/2,\,n-3}\,SE(b_2). $$

The interval gives a range of coefficient values compatible with the data and model at the stated confidence level. Its endpoints have the same units as \(\beta_2\): response units per predictor unit squared. Because the second derivative is \(2\beta_2\), multiplying both endpoints by 2 gives a corresponding interval for the model’s constant second derivative. The coefficient interval itself is often the direct target of the test.

For a two-sided test at significance level \(\alpha\), there is an exact connection: reject \(H_0:\beta_2=0\) if and only if the corresponding \(100(1-\alpha)\%\) confidence interval excludes zero. The reason is the same critical t value appears in both procedures.

$$ \left|\frac{b_2}{SE(b_2)}\right|>t^* \quad\Longleftrightarrow\quad |b_2|>t^*SE(b_2) \quad\Longleftrightarrow\quad 0\notin[b_2-t^*SE(b_2),\ b_2+t^*SE(b_2)]. $$

Thus a 95% confidence interval excluding zero corresponds to rejection in a two-sided test at \(\alpha=0.05\), subject to the same model and assumptions. A confidence interval is not a statement that there is a 95% probability that the fixed population coefficient lies within the particular interval. The 95% describes the long-run coverage of the procedure under repeated sampling when its assumptions hold.

Worked Example: A 95% Interval That Excludes Zero

Use the hypothetical estimates from the preceding example. With \(df=21\), the 95% critical value is approximately \(t^*=2.0796\). The margin of error is

$$ 2.0796(0.030)=0.06239\text{ milligrams per hour squared}. $$

Therefore, the 95% confidence interval for \(\beta_2\) is

$$ 0.080\pm0.06239=(0.01761,\ 0.1424)\text{ milligrams per hour squared}. $$

The interval is entirely positive, consistent with the two-sided test’s rejection of a zero coefficient. Under the specified model, the plausible values represented by this interval correspond to positive curvature. The interval for the second derivative is twice these endpoints, approximately \((0.03522,\ 0.2848)\) milligrams per hour squared. Neither interval establishes that the quadratic model adequately captures the response outside the observed predictor range.

Worked Example: A Test That Does Not Reject Zero Curvature

In a separate hypothetical data set, 18 independent observations relate a response measured in points to \(x\), measured in weeks. The fitted quadratic model gives \(b_2=0.12\) points per week squared and \(SE(b_2)=0.10\) points per week squared. Suppose plots show no serious departure from constant variance or the stated quadratic mean form, residuals are reasonably compatible with normality, and the predictor values provide full rank. These are checks supporting the inference conditions, not guarantees. Test \(H_0:\beta_2=0\) against a two-sided alternative.

Here \(df=18-3=15\), and the statistic is

$$ t=\frac{0.12}{0.10}=1.20. $$

The two-sided p-value for \(t=1.20\) with 15 degrees of freedom is approximately \(0.2487\). Since this exceeds \(0.05\), do not reject \(H_0\). The data do not provide strong evidence against a zero squared-term coefficient in this specified model. This is not proof of a straight-line mean relationship: the standard error is substantial relative to the estimate.

For comparison, the 95% critical value with 15 degrees of freedom is approximately \(2.1314\), so the margin of error is

$$ 2.1314(0.10)=0.2131\text{ points per week squared}. $$

The confidence interval is

$$ 0.12\pm0.2131=(-0.09314,\ 0.3331)\text{ points per week squared}. $$

Because zero is inside this interval, the interval agrees with the decision not to reject at the 5% level. Both negative and positive curvature values remain compatible with these data and assumptions.

Units, Centering, and Meaning

The units of \(\beta_2\) are response units divided by predictor units squared. For instance, if the response is measured in milligrams and \(x\) in hours, then \(\beta_2\) is measured in milligrams per hour squared. This is why the squared coefficient should not be described simply as “milligrams” or as a slope. The local slope at a particular predictor value is a different quantity.

If the predictor is centered by replacing \(x\) with \(x-c\), the coefficients on the constant and linear terms change, but the squared-term coefficient remains the same. Thus, a test of the squared-term coefficient continues to test the same quadratic curvature after centering, provided the same quadratic model is fitted. Centering may change how lower-order coefficients are interpreted; it does not change the second derivative.

A significant coefficient is evidence for curvature within the specified quadratic mean model, conditional on the other terms and assumptions. It is not a test of every possible departure from linearity: a different nonlinear pattern might not be well represented by a quadratic term. Conversely, a nonsignificant result can reflect limited precision, a small effect, or both. The estimate, its interval, the design, and the scientific context all matter in interpreting the result.

Common Mistake: Treating the P-Value as a Probability That Curvature Is Absent

A common error is to say, “The p-value is 0.25, so there is a 25% probability that the relationship is linear.” That is incorrect: the p-value is calculated under \(H_0\), not a probability that \(H_0\) is true. Another error is to interpret failure to reject as proof that \(\beta_2=0\). The correction is to describe the evidence: for example, “The data do not provide strong evidence against a zero squared-term coefficient in this model,” and then report the estimate and confidence interval to show the uncertainty.

It is also a mistake to read \(b_2\) as the change in response for a one-unit increase in \(x\). In the quadratic model, the slope varies with \(x\); \(\beta_2\) describes curvature through the second derivative \(2\beta_2\). Keep the coefficient’s units and the exact model in view when reporting a conclusion.

Key takeaway: In the specified quadratic mean model, test \(H_0:\beta_2=0\) with \(t=b_2/SE(b_2)\) and \(df=n-3\). Pair the test with a confidence interval in the correct units, and interpret evidence about the squared-term coefficient as evidence about curvature conditional on the model and its assumptions.

Check Your Understanding

Try these questions before reviewing the explanations above.

  1. In the quadratic mean model, what are the null and two-sided alternative hypotheses for testing quadratic curvature?
  2. A model uses 32 observations and estimates an intercept, a linear coefficient, and a squared-term coefficient. What are the residual degrees of freedom for the t test?
  3. If a 95% confidence interval for \(\beta_2\) includes zero, what is the corresponding two-sided test decision at \(\alpha=0.05\)?
  4. For a response measured in centimeters and a predictor measured in days, what are the units of \(\beta_2\)?
  5. Why does not rejecting \(H_0:\beta_2=0\) fail to prove that the conditional mean relationship is linear?