Tutorials › VEE Mathematical Statistics › Two-Sided Tests Of A Specified Regression Slope

VEE Mathematical Statistics · Regression Inference · Tutorial 751 of 880

Two-Sided Tests Of A Specified Regression Slope

Use a regression slope’s t statistic to decide whether the population slope differs from a specified value.

Advanced 12 min read

What You'll Learn

  • State the regression assumptions needed for an exact two-sided slope test.
  • Calculate the slope standard error and test statistic for a specified null slope.
  • Use the correct degrees of freedom and two-sided critical value.
  • Interpret a p-value in the context of the slope hypothesis.
  • Identify common errors involving tails, degrees of freedom, and the null value.

Why Test a Specified Slope?

A fitted regression slope describes the estimated change in the mean response for a one-unit increase in the predictor. In some applications, the question is not merely whether the slope is zero. A hypothetical engineering study might ask whether a sensor’s mean output increases by a specified number of units per degree. The relevant test compares the estimated slope with that target value.

A two-sided test asks whether the population slope differs from the specified value in either direction. It uses the sampling uncertainty in the estimated slope, measured by its standard error, and a t distribution whose degrees of freedom account for estimating both the intercept and slope.

Model and assumptions: For observations \(Y_i\) at fixed predictor values \(x_i\), assume \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), where the errors are independent and each has a normal distribution with mean \(0\) and variance \(\sigma^2\). Assume \(n\geq 3\) and the \(x_i\) are not all equal. These conditions give an exact t test. If the errors are not normally distributed, the test is not generally exact in a small sample.

The Test Statistic and Rejection Rule

Write \(b_1\) for the least-squares estimate of the population slope \(\beta_1\), and let \(S_{xx}=\sum_{i=1}^n(x_i-\bar{x})^2\). If \(SSE=\sum_{i=1}^n(Y_i-\hat{Y}_i)^2\), the residual variance estimate is \(s^2=SSE/(n-2)\). The estimated standard error of the slope is \(s/\sqrt{S_{xx}}\).

Two-sided slope test: To test \(H_0:\beta_1=\beta_{1,0}\) against \(H_A:\beta_1\ne\beta_{1,0}\), calculate $$ t_{\mathrm{obs}}=\frac{b_1-\beta_{1,0}}{s/\sqrt{S_{xx}}},\qquad \text{degrees of freedom}=n-2. $$ At significance level \(\alpha\), reject \(H_0\) if \(|t_{\mathrm{obs}}|>t_{1-\alpha/2,n-2}\), where \(t_{1-\alpha/2,n-2}\) is the \(1-\alpha/2\) quantile of the t distribution with \(n-2\) degrees of freedom.

The absolute value in the rejection rule matters: evidence against the null may come from a slope substantially larger or substantially smaller than the specified value. The null value is subtracted from the estimate before dividing by the standard error. Testing a specified nonzero slope therefore does not generally use \(b_1\) alone in the numerator.

Why the Statistic Has a t Distribution

The t reference distribution follows from two ingredients of the stated normal-error model. First, the standardized slope estimate has a standard normal distribution when centered at its true value. Second, the residual variance estimate is independent of that standardized estimate and, when multiplied by its degrees of freedom and divided by \(\sigma^2\), has a chi-square distribution.

$$ \frac{b_1-\beta_1}{\sigma/\sqrt{S_{xx}}}\sim N(0,1), \qquad \frac{(n-2)s^2}{\sigma^2}\sim\chi^2_{n-2}, $$

Under the null hypothesis, \(\beta_1=\beta_{1,0}\). Substituting \(s\) for the unknown \(\sigma\) divides the standard normal numerator by the square root of an independent chi-square variable divided by its degrees of freedom. That ratio is, by definition, a t random variable. Thus the test statistic has a \(t_{n-2}\) distribution under \(H_0\).

$$ \frac{b_1-\beta_{1,0}}{s/\sqrt{S_{xx}}} = \frac{\displaystyle (b_1-\beta_{1,0})/(\sigma/\sqrt{S_{xx}})} {\displaystyle \sqrt{\big((n-2)s^2/\sigma^2\big)/(n-2)}} \sim t_{n-2}\quad\text{under }H_0. $$

There are \(n-2\) residual degrees of freedom because fitting the regression line estimates two parameters, the intercept and slope. The t distribution accounts for estimating the error variance rather than knowing it.

Worked Tests

Worked Example: Testing a Sensor’s Target Slope

In a hypothetical calibration study, a sensor is tested at \(n=8\) fixed temperatures. Assume the normal-error model above. The least-squares slope is \(b_1=2.5\) output units per degree, \(S_{xx}=28\) degree-squared units, and \(SSE=24\). Test \(H_0:\beta_1=2\) against \(H_A:\beta_1\ne2\) at \(\alpha=0.05\).

Method and calculation. The residual degrees of freedom are \(8-2=6\). Hence \(s^2=24/6=4\), so \(s=2\). The slope standard error is \(2/\sqrt{28}=2/(2\sqrt{7})=1/\sqrt{7}\approx0.3780\).

The observed statistic is \(t_{\mathrm{obs}}=(2.5-2)/0.3780\approx1.3229\). For a two-sided test with 6 degrees of freedom, the 5% critical value is approximately \(2.447\). Since \(|1.3229|<2.447\), do not reject \(H_0\). The two-sided p-value is approximately \(0.2343\), which is greater than \(0.05\), giving the same decision.

Conclusion. At the 5% level, these data do not provide sufficient evidence that the population slope differs from 2 output units per degree. This does not establish that the slope equals 2; it means the observed difference is not sufficiently large relative to its estimated uncertainty.

Common mistake avoided: The numerator is \(2.5-2\), not \(2.5\). The test concerns departure from the specified target, not departure from zero.

Worked Example: A Two-Sided Test That Rejects

A hypothetical materials lab measures strength \(Y\) at \(n=10\) fixed additive levels \(x\). Under the normal-error model, the fitted slope is \(b_1=2.25\), \(S_{xx}=32\), and \(SSE=16\). Test whether the population slope differs from \(1.5\) strength units per additive unit at the 5% level.

Method and calculation. The null and alternative are \(H_0:\beta_1=1.5\) and \(H_A:\beta_1\ne1.5\). There are \(10-2=8\) degrees of freedom. The residual variance estimate is \(s^2=16/8=2\), so \(s=\sqrt{2}\). The standard error is \(\sqrt{2}/\sqrt{32}=\sqrt{1/16}=0.25\).

Therefore, \(t_{\mathrm{obs}}=(2.25-1.5)/0.25=0.75/0.25=3.00\). The two-sided 5% critical value for 8 degrees of freedom is approximately \(2.306\). Since \(|3.00|>2.306\), reject \(H_0\). The two-sided p-value is approximately \(0.0171\), also below \(0.05\).

Conclusion. The data provide evidence at the 5% level that the population slope is not \(1.5\) strength units per additive unit. The test establishes a difference, not whether the true slope is above or below the target; the positive observed difference is an estimate, not a separate one-sided test.

Common mistake avoided: The alternative is two-sided, so the 5% rejection region allocates \(0.025\) to each tail. Using a one-tail 5% critical value would not implement the stated test.

Worked Example: A Borderline Result for a Specified Slope

A hypothetical crop trial uses \(n=7\) fixed irrigation levels. Assume independent normal errors with constant variance. The fitted slope is \(b_1=2.0\) yield units per irrigation unit, \(S_{xx}=25\), and \(SSE=20\). Test \(H_0:\beta_1=1.0\) against \(H_A:\beta_1\ne1.0\) at the 5% level.

Method and calculation. The residual degrees of freedom are \(7-2=5\). Thus \(s^2=20/5=4\), \(s=2\), and the standard error is \(2/\sqrt{25}=2/5=0.4\). The statistic is \(t_{\mathrm{obs}}=(2.0-1.0)/0.4=1.0/0.4=2.5\).

For 5 degrees of freedom, the two-sided 5% critical value is approximately \(2.571\). Since \(2.5<2.571\), do not reject \(H_0\). The two-sided p-value is approximately \(0.0545\), just above \(0.05\).

Conclusion. At the 5% level, the evidence is insufficient to conclude that the population slope differs from 1.0 yield unit per irrigation unit. The result is close to the decision threshold, but the decision follows the prespecified significance level.

Common mistake avoided: Rounding the statistic prematurely to a value above the critical value could change the decision. Keep unrounded values through the comparison; here \(2.500<2.571\).

Using the p-Value and Avoiding Test Errors

For this two-sided test, the p-value is the probability, calculated under \(H_0\), of obtaining a t statistic at least as far from zero as the observed statistic:

$$ p=P\bigl(|T_{n-2}|\geq |t_{\mathrm{obs}}|\bigr) =2P\bigl(T_{n-2}\geq |t_{\mathrm{obs}}|\bigr). $$

Reject at level \(\alpha\) when \(p<\alpha\), equivalently when the statistic falls in the two-sided rejection region. A p-value is not the probability that the null hypothesis is true. It describes how unusual the observed statistic, or a more extreme one, would be if the null model held.

A frequent exam trap is to use the wrong degrees of freedom or the wrong tail allocation. For example, suppose \(n=10\) and a candidate uses \(n-1=9\) degrees of freedom and a one-sided 5% critical value of about \(1.833\). The candidate might reject whenever \(|t_{\mathrm{obs}}|>1.833\). That is not the specified two-sided 5% test. The correction is \(n-2=8\) degrees of freedom and a two-sided critical value \(t_{0.975,8}\approx2.306\). The absolute value handles both directions; the \(0.025\) in each tail makes the total rejection probability \(0.05\).

1
State the hypotheses.
Write \(H_0:\beta_1=\beta_{1,0}\) and \(H_A:\beta_1\ne\beta_{1,0}\), using the specified target slope.
2
Calculate uncertainty.
Find \(s^2=SSE/(n-2)\), then calculate the slope standard error \(s/\sqrt{S_{xx}}\).
3
Standardize the difference.
Compute \(t_{\mathrm{obs}}=(b_1-\beta_{1,0})/(s/\sqrt{S_{xx}})\), keeping the sign until the two-sided comparison.
4
Make and interpret the decision.
Use \(n-2\) degrees of freedom and either compare \(|t_{\mathrm{obs}}|\) with \(t_{1-\alpha/2,n-2}\) or compare the two-sided p-value with \(\alpha\). State the conclusion in the study’s units and context.

The exact test relies on the model assumptions, not merely on having a calculated slope and standard error. Check that the regression setup is appropriate and that the assumed error conditions are reasonable before treating the t reference distribution as exact. This specified-slope procedure is aligned with the SOA VEE Mathematical Statistics syllabus.

Check Your Understanding

For each problem, use the stated normal-error regression model and conduct the requested two-sided test.

  1. A hypothetical greenhouse study has \(n=9\), \(S_{xx}=16\), \(SSE=28\), and \(b_1=1.4\). Test \(H_0:\beta_1=1.0\) at \(\alpha=0.05\). (Answer: \(df=7\), \(SE=0.5\), \(t=0.8\); do not reject, since \(0.8<2.365\).)
  2. A hypothetical battery study has \(n=12\), \(S_{xx}=25\), \(SSE=40\), and \(b_1=-0.2\). Test \(H_0:\beta_1=-0.8\) at \(\alpha=0.10\). (Answer: \(df=10\), \(SE=0.4\), \(t=1.5\); do not reject, since \(1.5<1.812\).)
  3. A hypothetical packaging study has \(n=8\), \(S_{xx}=12\), \(SSE=18\), and \(b_1=2.1\). Test \(H_0:\beta_1=1.1\) at \(\alpha=0.05\). (Answer: \(df=6\), \(SE=0.5\), \(t=2.0\); do not reject, since \(2.0<2.447\).)
  4. A hypothetical water-quality study has \(n=11\), \(S_{xx}=16\), \(SSE=36\), and \(b_1=1.75\). Test \(H_0:\beta_1=0.75\) at both \(\alpha=0.05\) and \(\alpha=0.10\). (Answer: \(df=9\), \(SE=0.5\), \(t=2.0\); do not reject at 0.05, but reject at 0.10.)
  5. A hypothetical equipment study has \(n=15\), \(S_{xx}=16\), \(SSE=52\), and \(b_1=-1.3\). Test \(H_0:\beta_1=-2.0\) at \(\alpha=0.05\). (Answer: \(df=13\), \(SE=0.5\), \(t=1.4\); do not reject, since \(1.4<2.160\).)
Clinical Biostats