Tutorials › Introduction to Statistics › Testing a Specified Population Slope

Inference for the Regression Slope · Tutorial 902 of 996

Testing a Specified Population Slope

Learn to state null and alternative hypotheses about a population regression slope and identify what the estimated sample slope says about the benchmark.

Intermediate 10 min read

What You'll Learn

  • Distinguish the population slope from the estimated sample slope.
  • Write null hypotheses that compare a population slope with a specified value.
  • Match alternative hypotheses to two-sided or directional questions.
  • Interpret the slope benchmark and sample slope in their measurement units.
  • Explain why a sample slope alone does not establish statistical significance.

What Does a Slope Test Ask?

A regression line summarizes how the mean response changes as the predictor changes. In inference, the target is the population slope: the change in the population mean response associated with a one-unit increase in the predictor, under the linear model. A slope test asks whether this population quantity equals a particular benchmark, such as zero or a scientifically meaningful nonzero value.

The benchmark matters. Testing whether the slope is zero asks whether the model's population linear trend is absent. Testing whether the slope is, for example, 1.2 asks whether the trend differs from a rate of 1.2 response units per predictor unit. The sample slope is evidence about the population slope, but it is an estimate rather than the population quantity itself.

Definition: In a simple linear regression model, \(\beta_1\) denotes the population slope, and \(b_1\) denotes the sample slope estimate calculated from the observed data. A test of a specified population slope compares \(\beta_1\) with a stated benchmark \(\beta_{1,0}\). The null hypothesis states \(\beta_1=\beta_{1,0}\); an alternative hypothesis states the departure from that benchmark being investigated.

The hypotheses concern the population slope, not the sample slope. In particular, the null is not a claim that the observed sample slope must equal the benchmark exactly. Sampling variation means that \(b_1\) can differ from \(\beta_{1,0}\) even when the null hypothesis is true.

Model and Conditions for Slope Inference

Use the simple linear regression model

$$ Y_i=\beta_0+\beta_1 x_i+\epsilon_i $$

where \(x_i\) is the predictor value for observation \(i\), \(Y_i\) is its response, \(\beta_0\) is the population intercept, \(\beta_1\) is the population slope, and \(\epsilon_i\) is the random error. The usual t-based inference for a slope relies on the regression conditions: the mean response is linear in the predictor; errors are independent; errors have mean zero and a common variance; and, for exact small-sample t inference, errors are normally distributed. The observed predictor values must also have variation, so the slope can be estimated. These are the linear-model conditions developed earlier in the course.

Before interpreting a slope test, check whether the study design and residual diagnostics make these conditions plausible. For example, repeated measurements on the same person may not be independent, a curved pattern may conflict with linearity, and a funnel-shaped residual pattern may suggest unequal error variance. A hypothesis statement can be written down regardless, but conclusions from the usual slope-inference procedure depend on the model being appropriate.

The null and alternative are statements about the parameter \(\beta_1\). The three standard alternative forms are:

Hypothesis forms: For a benchmark \(\beta_{1,0}\), a two-sided test uses \(H_0:\beta_1=\beta_{1,0}\) and \(H_a:\beta_1\ne\beta_{1,0}\). A test for a slope above the benchmark uses \(H_a:\beta_1>\beta_{1,0}\), and a test for a slope below it uses \(H_a:\beta_1<\beta_{1,0}\). The null is written with equality; the alternative specifies the direction or directions of departure.

The units are part of the interpretation. If response is measured in millimeters and predictor in minutes, then both \(\beta_1\) and \(b_1\) are measured in millimeters per minute. A benchmark such as \(1.2\) must be read as \(1.2\) millimeters per minute, not simply as the number 1.2.

How the Sample Slope Relates to the Benchmark

The sample slope is the observed estimate of the population slope. Its difference from the specified benchmark, \(b_1-\beta_{1,0}\), describes the sample's raw departure from the null value. The sign indicates the direction of that departure: a positive difference places the estimate above the benchmark, and a negative difference places it below. This difference by itself does not tell us whether the departure is large relative to sampling variability.

A short model-based justification explains why comparison with the benchmark is sensible. Treat the observed predictor values as fixed and write the model errors as \(\epsilon_i\). The least-squares slope can be expressed as

$$ b_1=\frac{\sum_{i=1}^{n}(x_i-\bar{x})Y_i}{\sum_{i=1}^{n}(x_i-\bar{x})^2} =\beta_1+\frac{\sum_{i=1}^{n}(x_i-\bar{x})\epsilon_i}{\sum_{i=1}^{n}(x_i-\bar{x})^2}. $$

For the second equality, substitute \(Y_i=\beta_0+\beta_1x_i+\epsilon_i\) into the first expression. The intercept term vanishes because \(\sum_{i=1}^{n}(x_i-\bar{x})=0\), and the slope term simplifies because \(\sum_{i=1}^{n}(x_i-\bar{x})x_i=\sum_{i=1}^{n}(x_i-\bar{x})^2\). If the errors have conditional mean zero, taking their expectation with the predictor values fixed gives \(E(b_1\mid x_1,\ldots,x_n)=\beta_1\). Therefore, when \(H_0\) is true, the sample slope is centered on the null benchmark over repeated samples. Individual estimates can still fall above or below it.

The size of the departure must be considered relative to the slope's standard error to judge how surprising it would be under the null. That comparison, and the resulting t statistic and p-value, are calculated separately; neither is determined by the sign of \(b_1-\beta_{1,0}\) alone.

Worked Example: Testing Whether a Population Trend Is Zero

Suppose a hypothetical laboratory studies the relationship between preparation time, in hours, and a test score, in points. Six observations are recorded. For this illustration, assume the linear-model conditions are plausible and the predictor values vary. The data are:

Preparation time, \(x\) (hours)Score, \(Y\) (points)
12
23
33
45
54
67

The research question is whether the population slope differs from zero. The hypotheses are \(H_0:\beta_1=0\) points per hour and \(H_a:\beta_1\ne0\) points per hour. The null refers to no population linear change in mean score per additional hour of preparation.

To identify the sample evidence, first calculate the estimated slope. Here \(\bar{x}=3.5\) hours and \(\bar{Y}=4\) points. The least-squares slope is

$$ b_1=\frac{\sum (x_i-\bar{x})(Y_i-\bar{Y})}{\sum (x_i-\bar{x})^2} =\frac{15}{17.5}=0.8571\text{ points per hour}. $$

The observed sample slope is \(0.8571\) points per hour, which is above the zero benchmark. Its raw departure is \(0.8571-0=0.8571\) points per hour. This is evidence in the positive direction in this sample, but it is not yet a decision about the null: the estimate must be judged relative to its sampling uncertainty.

Worked Example: Comparing the Slope With a Nonzero Benchmark

Imagine a hypothetical study relating a machine's operating time, in hours, to the thickness of a coating, in millimeters. Suppose the model conditions are considered reasonable and the five observed operating times are distinct. The recorded pairs are \((0,1),(1,3),(2,4),(3,7),(4,8)\). The question is whether the population slope differs from \(1.2\) millimeters per hour.

The hypotheses are \(H_0:\beta_1=1.2\) millimeters per hour and \(H_a:\beta_1\ne1.2\) millimeters per hour. The null does not claim that the slope is zero; it specifies a particular positive rate.

The sample means are \(\bar{x}=2\) hours and \(\bar{Y}=4.6\) millimeters. Thus,

$$ \sum (x_i-\bar{x})(Y_i-\bar{Y}) =(-2)(-3.6)+(-1)(-1.6)+(0)(-0.6)+(1)(2.4)+(2)(3.4)=18, $$
$$ \sum (x_i-\bar{x})^2=(-2)^2+(-1)^2+0^2+1^2+2^2=10, \qquad b_1=\frac{18}{10}=1.800\text{ millimeters per hour}. $$

The estimated slope exceeds the benchmark by \(1.800-1.200=0.600\) millimeters per hour. The sample therefore points above the specified rate. The hypothesis test still concerns whether this departure is large in relation to the standard error; the difference of \(0.600\) alone does not establish that.

Worked Example: A Directional Alternative With a Nonzero Benchmark

In a hypothetical plant-growth experiment, the predictor is exposure time in hours and the response is growth in centimeters. Suppose the investigator's stated question is whether the population slope is greater than \(0.8\) centimeters per hour. Assume the conditions for slope inference are plausible. The data are \((0,1),(1,2),(2,2),(3,5),(4,6)\).

The hypotheses for this stated question are \(H_0:\beta_1=0.8\) centimeters per hour and \(H_a:\beta_1>0.8\) centimeters per hour. The alternative describes slopes above the benchmark, rather than any departure from it.

For these observations, \(\bar{x}=2\) hours and \(\bar{Y}=3.2\) centimeters. The cross-product sum and predictor sum of squares are

$$ \sum (x_i-\bar{x})(Y_i-\bar{Y}) =(-2)(-2.2)+(-1)(-1.2)+(0)(-1.2)+(1)(1.8)+(2)(2.8)=13, $$
$$ \sum (x_i-\bar{x})^2=4+1+0+1+4=10, \qquad b_1=\frac{13}{10}=1.300\text{ centimeters per hour}. $$

The observed estimate is \(1.300-0.800=0.500\) centimeters per hour above the benchmark, in the direction of the stated alternative. This identifies the direction of the sample evidence, not its statistical strength. A full test also accounts for how variable slope estimates would be under the model.

Writing and Reading the Hypotheses Precisely

A clear slope test states the parameter, benchmark, direction, and units. For example, “\(H_0:\beta_1=1.2\) millimeters per hour” is more informative than “the null slope is 1.2,” because it identifies the population parameter and gives the rate's units. In words, the null says that the population mean coating thickness changes by 1.2 millimeters for each additional operating hour, according to the linear model.

Keep three quantities separate:

QuantityMeaningExample in context
\(\beta_1\)Unknown population slopeThe population change in mean score per preparation hour
\(\beta_{1,0}\)Specified null benchmark1.2 millimeters of coating per operating hour
\(b_1\)Observed sample estimate1.800 millimeters per operating hour in the sample

The alternative is not chosen by looking at which way the sample slope happened to go. Its form is part of the research question. The sample estimate is then compared with the benchmark in the direction described by that alternative. The detailed issue of choosing a one-sided alternative is treated in the following material.

Common Mistakes and Why They Matter

  • Putting the sample slope in the null. Writing \(H_0:b_1=0\) confuses an observed statistic with a population parameter. Write \(H_0:\beta_1=\beta_{1,0}\); \(b_1\) is the sample evidence.
  • Assuming every slope test is a test of zero. A benchmark can be any specified value in slope units. If a meaningful expected rate is 1.2, the relevant null may be \(\beta_1=1.2\), not \(\beta_1=0\).
  • Treating a positive sample slope as proof of a positive population slope. Sampling variation can produce a positive \(b_1\) even when the population slope is zero or below a positive benchmark. Use uncertainty, not sign alone, to evaluate the evidence.
  • Dropping the units. A slope has response-units per predictor-unit. A benchmark of 1.2 without context is incomplete if the data concern millimeters per hour.
  • Writing equality in the alternative. The null contains the benchmark equality. The alternative uses \(\ne\), \(>\), or \(<\), as appropriate to the stated question.

The sample difference \(b_1-\beta_{1,0}\) answers “how far, and in which direction, is the estimate from the null value?” It does not answer “how unusual is that difference under the null?” That second question requires the sampling uncertainty and the test procedure. A p-value is not the probability that the null is true, and a sample slope by itself is not a test conclusion.

Key takeaway: State the test as a comparison of the population slope \(\beta_1\) with a benchmark \(\beta_{1,0}\). Then report the sample slope \(b_1\), its units, and its departure from that benchmark as observed evidence. Do not confuse this descriptive comparison with the later calculation of statistical significance.

Check Your Understanding

Answer each question by distinguishing the population parameter, the benchmark, and the sample evidence.

  1. A study relates daily activity time in hours to a health score in points. Write hypotheses for testing whether the population slope differs from zero, with units.
  2. For coating thickness measured in millimeters and operating time measured in hours, write the null and two-sided alternative for a benchmark of 0.5 millimeters per hour.
  3. A sample slope is \(0.7\) points per hour and the null benchmark is \(1.0\) points per hour. What is the sample's raw departure from the benchmark, and in which direction does it lie?
  4. Why does observing a sample slope above its null benchmark not, by itself, establish strong evidence against the null?
  5. Explain why \(H_0:b_1=0\) is generally not the appropriate way to state a regression slope test.