Why Test the Product Coefficient?
When a regression model includes two quantitative predictors and their product, the fitted slope for one predictor can depend on the value of the other. Testing whether that dependence is supported by the data is a direct way to assess evidence for an interaction in this model. It answers a specific question: is the product coefficient distinguishable from zero, given the model and its uncertainty?
The test is not a test of whether either predictor is associated with the outcome in general. It is a test of whether the slope changes as the other predictor changes. A small p-value is evidence against a constant-slope relationship of the specified form; it does not establish that the relationship is causal or that the change is large enough to matter scientifically.
Model, Hypotheses, and Assumptions
For observations \(i=1,\ldots,n\), let \(Y_i\) be the outcome and let \(X_{1i}\) and \(X_{2i}\) be two quantitative predictors. The product-term model is
The terms involving each predictor alone are retained along with their product. Here, \(\beta_3\) is the product coefficient. In this model, the conditional slope of \(Y\) with respect to \(X_1\), at a fixed value \(x_2\), is \(\beta_1+\beta_3x_2\). Thus, increasing \(X_2\) by one unit changes that slope by \(\beta_3\) outcome units per \(X_1\) unit.
The test uses the ordinary least-squares estimate \(\hat{\beta}_3\) and its standard error \(SE(\hat{\beta}_3)\). For the usual exact \(t\) inference, assume the conditional mean is represented by the stated model, the errors are independent with mean zero and constant variance, and the errors are normally distributed conditional on the predictor values. Also, the model matrix must have full column rank, so the product term is not an exact linear combination of the other model terms. Under these assumptions, the residual degrees of freedom are \(df=n-4\), because four coefficients are estimated.
The Test Statistic and Its Interpretation
Under \(H_0\), the estimated product coefficient is centered at zero. Its distance from zero, measured in standard errors, gives the test statistic:
Under the stated assumptions and \(H_0\), this statistic follows a \(t\) distribution with \(n-4\) degrees of freedom. For a two-sided test, the p-value is the probability, assuming \(H_0\), of observing a \(t\) statistic at least as far from zero as the one calculated:
where \(T_{n-4}\) denotes a random variable with a \(t\) distribution on \(n-4\) degrees of freedom. Compare this p-value with the prespecified significance level \(\alpha\). If the p-value is at most \(\alpha\), reject \(H_0\); otherwise, do not reject \(H_0\). Not rejecting \(H_0\) is not proof that the coefficient is exactly zero.
A \(100(1-\alpha)\%\) confidence interval for the product coefficient is
where \(t^*_{n-4}\) is the positive \(t\) critical value with central probability \(1-\alpha\). The interval gives a range of plausible values for the change in conditional slope, in the units implied by the predictors and outcome. For the corresponding two-sided test at level \(\alpha\), the interval excludes zero exactly when the test rejects \(H_0\).
Why the Test and Interval Work
The conditional slope follows directly from the model. Holding \(X_2=x_2\) fixed, the terms involving \(X_1\) are \(\beta_1X_1+\beta_3X_1x_2\). Collecting the \(X_1\) terms gives \((\beta_1+\beta_3x_2)X_1\). If \(x_2\) increases by one unit, the conditional slope changes from \(\beta_1+\beta_3x_2\) to \(\beta_1+\beta_3(x_2+1)\), a difference of \(\beta_3\).
The test then asks whether this slope-change parameter is zero relative to its estimated uncertainty. Under the model assumptions, the standardized difference between \(\hat{\beta}_3\) and a hypothesized value has a \(t\) distribution. Setting that difference within the central \(1-\alpha\) portion of the distribution and rearranging yields the confidence interval:
Worked Example: Evidence of a Changing Crop-Growth Slope
Hypothetical example. A model relates weekly crop growth \(Y\), in centimetres, to fertilizer amount \(X_1\), in grams, and sunlight \(X_2\), in hours per day. In \(n=24\) plots, the fitted product coefficient is \(\hat{\beta}_3=0.180\) centimetres per (gram × hour per day), with \(SE(\hat{\beta}_3)=0.070\). Suppose the design has independent plot errors, residual checks are consistent with constant variance and approximate normality, and the predictor values do not create exact collinearity among the model terms.
Test \(H_0:\beta_3=0\) against \(H_a:\beta_3\ne0\) at \(\alpha=0.05\). The degrees of freedom are \(df=24-4=20\). The test statistic is
For a two-sided test with 20 degrees of freedom, this gives \(p\approx0.018\). Since \(0.018<0.05\), reject \(H_0\). The data provide evidence, under this model, that the fertilizer slope changes with sunlight.
For a 95% confidence interval, \(t^*_{20}\approx2.086\), so
The interval suggests that each additional hour of sunlight per day is associated with an increase of about 0.034 to 0.326 centimetres per week in the conditional growth slope per gram of fertilizer. Because zero is outside the interval, the interval and test give the same conclusion at the 5% level. This is evidence of a changing fitted slope, not evidence that sunlight or fertilizer causes the change.
Worked Example: An Interval That Includes No Slope Change
Hypothetical example. Suppose \(Y\) is a machine’s weekly downtime in hours, \(X_1\) is its weekly maintenance time in hours, and \(X_2\) is operating temperature in degrees Celsius. For \(n=30\) machines, a fitted model has \(\hat{\beta}_3=-0.060\) downtime hours per (maintenance hour × degree Celsius) and \(SE(\hat{\beta}_3)=0.080\). Assume machine observations are independent, residual checks support the constant-variance and approximate-normality assumptions, and the product term is estimable.
Here \(df=30-4=26\), and
The two-sided p-value is approximately \(0.460\). At \(\alpha=0.05\), do not reject \(H_0:\beta_3=0\). The fitted estimate is negative, but it is small relative to its standard error; the data do not provide strong evidence that the maintenance-time slope changes with temperature.
Using \(t^*_{26}\approx2.056\), the 95% interval is
In context, the plausible slope change ranges from a decrease of about 0.2245 to an increase of about 0.1045 downtime hours per maintenance hour for each degree Celsius increase in temperature. The interval includes zero, but it also includes nonzero values in both directions. Therefore, the result does not establish that the interaction is absent.
Worked Example: Interpreting a Significant Negative Interaction
Hypothetical example. In a study of 21 learners, a model predicts quiz score \(Y\), in points, from tutoring hours \(X_1\) and a prior-preparation score \(X_2\), measured in points. Suppose \(\hat{\beta}_3=-0.012\) points per (tutoring hour × preparation point), with \(SE(\hat{\beta}_3)=0.005\). Assume the learners’ errors are independent, residual checks are compatible with constant variance and normality, and the four model terms are not perfectly collinear.
The degrees of freedom are \(df=21-4=17\). The test statistic is
The two-sided p-value is approximately \(0.028\), so the null hypothesis is rejected at the 5% level. With \(t^*_{17}\approx2.110\), the 95% confidence interval is
For each additional preparation point, the fitted increase in quiz score per tutoring hour is estimated to become smaller by 0.012 points. The interval indicates a negative slope change under the model, although its practical importance depends on the range of preparation scores and tutoring hours relevant to the learners. The model describes an association; it does not by itself show that tutoring or preparation causes quiz-score changes.
Common Mistakes and Practical Meaning
- Reading the p-value as the probability that there is no interaction. The p-value is calculated assuming \(\beta_3=0\); it is the probability of a result at least as extreme as the observed one under that assumption, not the probability that \(H_0\) is true.
- Treating a nonsignificant test as proof of no interaction. A large p-value means the data do not provide enough evidence to reject the null at the chosen level. A wide interval may still include meaningful positive and negative slope changes.
- Confusing the product coefficient with a conditional slope. \(\beta_3\) is the change in the \(X_1\) slope for a one-unit increase in \(X_2\); the conditional slope itself is \(\beta_1+\beta_3x_2\).
- Equating statistical evidence with practical importance. A small p-value can accompany a small slope change, particularly with precise estimates. Interpret the coefficient and interval in outcome and predictor units.
- Omitting the lower-order terms. The product-term model used for this test includes both predictors as well as their product. The null concerns the product coefficient within that specified model.
The test is useful because it gives a focused assessment of whether the fitted slope varies with another quantitative predictor. Its conclusion remains conditional on the model form, the assumptions supporting the standard error, and the predictor values represented by the data. Report the estimate and confidence interval alongside the p-value so readers can assess both the direction and the plausible size of the slope change.
Check Your Understanding
Answer each question using the product-term model and the units stated in the question.
- In a model with predictors \(X_1\) and \(X_2\), what does \(H_0:\beta_3=0\) mean about the conditional slope of \(Y\) with respect to \(X_1\)?
- A fitted product coefficient is \(0.12\) with standard error \(0.04\). Calculate the test statistic for \(H_0:\beta_3=0\).
- What does a two-sided p-value measure in this test, and what does it not measure?
- A 95% confidence interval for \(\beta_3\) is \((-0.08,0.03)\). What conclusion does this suggest for the corresponding two-sided test at the 5% level?
- Explain why failing to reject \(H_0\) does not demonstrate that the predictors have no interaction in the population.