Tutorials › Regression Analysis (Undergraduate) › Common Errors in Regression Hypothesis Tests

Tests and Linear Contrasts · Tutorial 242 of 991

Common Errors in Regression Hypothesis Tests

Learn how to interpret regression test results cautiously and how to choose and report a valid hypothesis test.

Intermediate 11 min read

What You'll Learn

  • Explain why a nonsignificant test does not establish that a regression effect is zero.
  • Test a difference between coefficients with a contrast rather than separate p-values.
  • Identify why a contrast standard error depends on covariance.
  • Distinguish a prespecified one-sided test from a direction selected after seeing results.
  • Check the assumptions and context needed to interpret regression test results.

Why Careful Interpretation Matters

Regression hypothesis tests can look deceptively simple: software prints an estimate, a standard error, a test statistic, and a p-value. The difficult part is not just reading those numbers. It is making sure the test matches the question, the model assumptions support the calculation, and the conclusion says no more than the evidence allows.

Three mistakes are especially tempting: treating a nonsignificant result as proof of no effect, deciding that two coefficients differ because one is significant and the other is not, and choosing a one-sided test in the direction suggested by the observed estimate. Each mistake changes what the test can legitimately tell us.

The Model and the Test Being Interpreted

For context, consider the multiple linear regression model

$$ Y_i=\beta_0+\beta_1x_{i1}+\cdots+\beta_px_{ip}+\varepsilon_i,\qquad i=1,\ldots,n. $$

Here \(Y_i\) is the response for observation \(i\), the \(x_{ij}\) are predictor values, and the \(\beta_j\) are population regression coefficients. A coefficient describes the modelled change in the mean response for a one-unit increase in its predictor, holding the other predictors fixed. A linear contrast is a specified linear combination of coefficients, such as \(\beta_1-\beta_2\).

A usual coefficient or contrast t test relies on a correctly specified linear conditional mean, independent errors with mean zero and a common variance, and a design that allows the coefficients to be estimated. Normal errors give the usual t reference distribution exactly in finite samples; without normality, that reference is generally an approximation, especially in small samples. The standard error and degrees of freedom used in a test must be appropriate to the fitted model.

Definition: A p-value is the probability, assuming the null hypothesis and the test's statistical model are correct, of obtaining a test statistic at least as incompatible with the null as the one observed. It is not the probability that the null hypothesis is true.

The test also needs a clearly stated null and alternative. For example, a test of \(H_0:\beta_j=0\) against \(H_a:\beta_j\ne 0\) asks whether the coefficient differs from zero in either direction. A test of a contrast \(H_0:L=0\), where \(L\) is a specified linear combination of coefficients, asks whether that particular combination differs from zero.

Mistake 1: Treating Nonsignificance as Proof of No Effect

A nonsignificant result means that the data did not provide sufficiently strong evidence against the stated null at the chosen significance level \(\alpha\). It does not show that the null is true. A modest estimate with a large standard error may be nonsignificant even though the data remain compatible with effects that would matter in practice.

To make a claim that effects are small enough to be practically negligible, the question needs a meaningful margin of negligible effects and an analysis designed to assess that claim. A conventional test that simply fails to reject \(H_0:\beta=0\) does not answer it. In particular, a wide confidence interval spanning zero and substantial positive and negative values signals uncertainty, not demonstrated absence.

Worked Example: A Nonsignificant Estimate Is Not “No Effect”

Suppose a hypothetical regression estimates the association between a study program and weekly study time, adjusting for other specified predictors. The estimated coefficient is \(0.80\) hours per week, its standard error is \(0.60\) hours, and the test has \(18\) degrees of freedom. Test \(H_0:\beta=0\) against \(H_a:\beta\ne 0\) at \(\alpha=0.05\). For this example, assume the linear model and error conditions stated above are reasonable and the standard error is appropriate.

The test statistic is

$$ t=\frac{\hat{\beta}-0}{SE(\hat{\beta})} =\frac{0.80-0}{0.60} =1.333. $$

With \(18\) degrees of freedom, the two-sided p-value is approximately \(0.199\). Since \(0.199>0.05\), we do not reject \(H_0\). That result is not proof that the coefficient is zero.

For perspective, the 95% confidence interval uses \(t^\ast\approx2.101\):

$$ 0.80\pm 2.101(0.60) =0.80\pm1.261 =(-0.461,\ 2.061)\text{ hours per week}. $$

Under the model, this interval is compatible with a decrease of about \(0.46\) hours per week or an increase of about \(2.06\) hours per week, as well as zero. The conclusion is that this analysis does not establish a nonzero association at the 5% level; it does not establish that the association is absent. Because the data are hypothetical and observational, the coefficient is an adjusted association, not evidence by itself of a causal effect.

Mistake 2: Comparing Separate P-Values Instead of Testing a Difference

Suppose two estimated coefficients have separate tests against zero. Finding one p-value below \(\alpha\) and the other above \(\alpha\) does not establish that the coefficients differ. Each separate test asks whether one coefficient differs from zero. The question “do they differ?” requires testing the contrast \(\beta_A-\beta_B\).

The standard error of that contrast depends on the covariance between the coefficient estimates:

$$ SE(\hat{\beta}_A-\hat{\beta}_B) = \sqrt{SE(\hat{\beta}_A)^2+SE(\hat{\beta}_B)^2 -2\operatorname{Cov}(\hat{\beta}_A,\hat{\beta}_B)}. $$

The covariance matters because two coefficient estimates from the same regression are generally not independent. Their uncertainty can move together or in opposite directions. Therefore, the contrast's standard error cannot usually be found by simply comparing the two separate p-values or by ignoring their covariance. A valid contrast test uses the covariance information from the fitted model.

Worked Example: One Significant Coefficient Does Not Prove a Difference

In a hypothetical interaction model, suppose the estimated conditional slopes for groups A and B are \(1.20\) and \(0.70\) response units per predictor unit. Their standard errors are \(0.50\) and \(0.45\), respectively, and each separate test has \(36\) degrees of freedom. Assume the model conditions are suitable for these t tests.

For group A, the test of a zero slope gives

$$ t_A=\frac{1.20}{0.50}=2.40,\qquad p_A\approx0.02169. $$

For group B, the corresponding test gives

$$ t_B=\frac{0.70}{0.45}=1.556,\qquad p_B\approx0.1286. $$

At the 5% level, the test for group A rejects a zero slope, while the test for group B does not. That comparison of decisions does not test whether the two slopes differ. The estimated difference is \(1.20-0.70=0.50\) response units per predictor unit.

Suppose the fitted model also reports \(\operatorname{Cov}(\hat{\beta}_A,\hat{\beta}_B)=0.135\). The standard error for the difference is

$$ SE(\hat{\beta}_A-\hat{\beta}_B) =\sqrt{0.50^2+0.45^2-2(0.135)} =\sqrt{0.1825} =0.4272. $$

The contrast test is therefore

$$ t=\frac{(1.20-0.70)-0}{0.4272}=1.170. $$

With \(36\) degrees of freedom, the two-sided p-value is about \(0.250\), so this contrast does not provide evidence of a difference at the 5% level. The relevant conclusion comes from the direct test of the difference, not from the separate p-values. The covariance used above is part of the hypothetical example; without it, the contrast standard error and test cannot be calculated from the two marginal standard errors alone.

Mistake 3: Choosing the Test Direction After Seeing the Data

A one-sided alternative can be appropriate when the research question and direction are specified before examining the result. For instance, \(H_a:\beta>0\) tests for a positive coefficient, whereas \(H_a:\beta\ne0\) tests for a coefficient in either direction. These alternatives are not interchangeable after seeing the data.

If a researcher first observes the estimate and then chooses whichever one-sided alternative points toward it, the reported p-value no longer has the intended Type I error control. The choice has used the data twice: first to pick a direction and then to evaluate the evidence in that direction. If the direction was not fixed in advance, a two-sided test is the standard choice for a question about whether an effect exists in either direction. A direction opposite to the observed estimate is not rescued by switching alternatives after the result is known.

Justification: For a symmetric t distribution, a two-sided p-value for an observed statistic \(t>0\) is the probability of a statistic at least as far from zero in either direction. A one-sided p-value in the matching positive direction is half as large:
$$ P(|T|\ge t)=P(T\ge t)+P(T\le -t)=2P(T\ge t). $$

This explains why a matching one-sided p-value is smaller. It does not justify selecting that direction after seeing a positive estimate. The factor-of-two relationship describes tests whose alternatives were specified appropriately; it is not a correction for data-driven test selection.

Worked Example: The Direction Must Come Before the Result

Suppose a hypothetical analysis gives \(t=2.00\) with \(20\) degrees of freedom for a regression coefficient, and the estimate is positive. Assume the regression model and error conditions support the t reference distribution. The two-sided test \(H_0:\beta=0\) against \(H_a:\beta\ne0\) has p-value approximately \(0.0593\).

If a positive direction, \(H_a:\beta>0\), had been specified before examining the data, its one-sided p-value would be approximately

$$ P(T_{20}\ge2.00)\approx0.02963. $$

But if the analyst decided to use \(H_a:\beta>0\) only after seeing that the estimate was positive, the \(0.02963\) value is not a valid substitute for the planned two-sided result. The direction was selected using the observed data. For a two-sided 5% test, \(0.0593>0.05\), so the result does not meet the rejection threshold. This does not prove a zero coefficient; it means the two-sided test did not provide sufficient evidence at that threshold.

A Short Checklist for Reading a Regression Test

Before interpreting a software result, check that the hypothesis answers the scientific question, the direction was chosen on a defensible basis, and the uncertainty estimate matches the coefficient or contrast being tested. Then separate the statistical decision from its substantive interpretation. A small p-value is evidence against the specified null under the model, not a measure of effect size or practical importance. A large p-value is not evidence that the null is true.

1
State the target.
Name the coefficient or contrast and its units. For a difference, write the contrast explicitly, such as \(\beta_A-\beta_B\).
2
Write the hypotheses.
Specify the null value and whether the alternative is one-sided or two-sided. Do not choose the direction based on the observed estimate.
3
Check the model basis.
Confirm that the regression specification, independence, variance assumptions, and standard error calculation are reasonable for the intended inference.
4
Interpret the evidence and its limits.
Report the estimate, uncertainty, test result, and a contextual conclusion. Do not turn nonsignificance into proof of no effect or significance into proof of practical importance.

Common Mistakes and Corrections

  • Wrong: “The p-value is above 0.05, so there is no effect.” Correction: The test did not reject its null at that threshold; assess the estimate and uncertainty before describing what effects remain compatible with the data.
  • Wrong: “Coefficient A is significant and coefficient B is not, so A differs from B.” Correction: Test the contrast between A and B, using its standard error, including the covariance of the estimates.
  • Wrong: “The estimate is positive, so I will report a positive one-sided p-value.” Correction: A directional alternative should be set independently of the observed result; otherwise use the two-sided test for a question about either direction.
  • Wrong: “A small p-value means the effect is large or important.” Correction: The p-value measures evidence relative to a null and a model, not the magnitude or practical value of an effect. Interpret the estimate and its interval in context.

These corrections matter because hypothesis tests are answers to particular questions, not automatic labels for regression coefficients. A careful conclusion identifies the quantity tested, reports the uncertainty and decision accurately, and avoids claims that the test was not designed to support.

Check Your Understanding

Try these questions before reviewing the explanations in the tutorial.

  1. A coefficient test has \(p=0.31\). What conclusion is justified, and why does this not establish that the coefficient is zero?
  2. One slope has \(p=0.03\) and another has \(p=0.12\). What hypothesis should be tested to determine whether the slopes differ?
  3. Why does the standard error of a difference between coefficient estimates depend on their covariance?
  4. An analyst sees a positive coefficient and then selects a positive one-sided alternative. What is the problem with this choice?
  5. What is the difference between statistical evidence against a zero coefficient and evidence that an effect is practically important?