Tutorials › Regression Analysis (Undergraduate) › The Simple Regression Equation

Fitting a Simple Linear Regression · Tutorial 74 of 991

The Simple Regression Equation

Learn what each part of the simple regression equation means and how a model for a population differs from a line fitted to sample data.

Beginner 9 min read

What You'll Learn

  • Identify the response and predictor in a one-predictor regression.
  • Write the simple linear model and state its basic assumptions.
  • Interpret the intercept and slope in the units of the variables.
  • Distinguish a model error from a fitted value and a residual.
  • Tell the population model equation apart from an estimated regression line.

From a Relationship Plot to an Equation

A scatterplot can suggest that a quantitative response tends to increase or decrease as a quantitative predictor changes. A simple linear regression model expresses that pattern with an equation. The equation describes a population relationship; it does not require every observed response to lie exactly on a straight line. Individual responses may vary around the linear pattern.

For example, a hypothetical analyst might examine study time and quiz scores. The predictor is study time, and the response is quiz score. A regression equation can describe how the mean score changes with study time, while allowing individual students to score above or below that mean. The equation describes an association; by itself, it does not show that changing study time causes a change in score.

Definition: In simple linear regression, the response is the quantitative variable to be described or predicted, and the predictor is the quantitative variable used to describe or predict it. For observation \(i\), write the predictor value as \(x_i\) and the response as \(Y_i\). The simple linear regression model is
$$ Y_i = \beta_0 + \beta_1 x_i + \varepsilon_i. $$
Here \(\beta_0\) is the intercept, \(\beta_1\) is the slope, and \(\varepsilon_i\) is the model error for observation \(i\).

What the Model Says

The equation separates the response into two parts: a systematic component, \(\beta_0+\beta_1x_i\), and an error component, \(\varepsilon_i\). For any predictor value \(x\), the systematic component gives the model's mean response at that value. The error represents an individual response's deviation from that mean.

For the basic model, assume that the mean response is linear in the predictor, that errors have mean zero at each predictor value, and that their variance is the same across predictor values. We also assume errors from different observations are independent, conditional on their predictor values. In symbols, the mean and variance conditions are

$$ E(Y_i\mid x_i)=\beta_0+\beta_1x_i,\qquad E(\varepsilon_i\mid x_i)=0,\qquad \operatorname{Var}(\varepsilon_i\mid x_i)=\sigma^2. $$

These are modeling assumptions, not facts guaranteed by writing down an equation. The linear-mean assumption says the expected response follows a straight-line pattern. The equal-variance assumption says responses have the same amount of vertical scatter around that mean at different predictor values. The independence assumption concerns the errors for different observations. Normal errors are not needed just to define or interpret this equation.

Definition: The intercept \(\beta_0\) is the model's mean response when the predictor is zero. The slope \(\beta_1\) is the change in mean response associated with a one-unit increase in the predictor. The fitted value from an estimated regression line is the response value predicted by that line at a specified predictor value.

The intercept and slope have units determined by the variables. The intercept is measured in response units. The slope is measured in response units per predictor unit. If the predictor is measured in hours and the response in points, the intercept is in points and the slope is in points per hour. The intercept may have little practical meaning if a predictor value of zero is impossible or far outside the observed range, even though it remains part of the equation.

Worked Example: Interpreting a Hypothetical Population Model

Suppose, purely for illustration, that the mean quiz score \(Y\) for students with \(x\) hours of study is described by the model \(Y=42+5x+\varepsilon\). Scores are measured in points and study time in hours. Interpret the intercept and slope, then find the model's mean score at 3 hours.

The intercept is \(\beta_0=42\). It represents a mean score of 42 points at zero study hours, according to this model. The slope is \(\beta_1=5\), so each additional hour of study is associated with a 5-point increase in the mean quiz score under the model. This is not a claim that every student gains exactly 5 points for an extra hour.

At \(x=3\), the conditional mean is

$$ E(Y\mid x=3)=42+5(3)=42+15=57\text{ points}. $$

Thus, 57 points is the model's mean response at 3 hours. An individual score need not equal 57 because the model includes an error term. The interpretation is an association, not a causal conclusion.

The Model Equation and the Estimated Regression Line

The model equation uses population parameters \(\beta_0\) and \(\beta_1\), which describe the population relationship and are generally unknown. A sample of observations is used to estimate them. Denote the resulting estimates by \(b_0\) and \(b_1\). The estimated regression line is

$$ \hat{y}_i=b_0+b_1x_i. $$

Here \(\hat{y}_i\), read “y-hat,” is the fitted value for observation \(i\): the value predicted by the estimated line at predictor value \(x_i\). The symbols \(b_0\) and \(b_1\) are sample estimates; they are not the population parameters themselves. The model equation describes a population mean plus random error, while the estimated line gives a single prediction for each predictor value using estimates from a sample.

The estimated line is not automatically a statement about the true population relationship. It is an estimate based on observed data. Different samples can produce different \(b_0\) and \(b_1\), and therefore different fitted lines. The rule used to choose those estimates is a separate question.

Worked Example: Calculating a Fitted Value

A hypothetical sample has produced the estimated regression line \(\hat{y}=38+6x\), where \(x\) is weekly study time in hours and \(\hat{y}\) is the predicted quiz score in points. Calculate the fitted value for a student who studied 4 hours.

Substitute \(x=4\) into the estimated line:

$$ \hat{y}=38+6(4)=38+24=62\text{ points}. $$

The fitted value is 62 points. The estimated intercept, 38 points, is the line's predicted score at zero study hours. The estimated slope is 6 points per hour: for each additional hour, the line's predicted score increases by 6 points. These describe the estimated line, not necessarily the unknown population parameters.

If the observed score for this student were 66 points, the fitted value would remain 62 points: it is calculated from the line and the predictor value, not from that student's observed response. The observed-minus-fitted difference is called a residual; it is distinct from the model error, which is defined relative to the unknown population mean.

Model Errors and Sample Differences

The model error \(\varepsilon_i\) is the difference between an observed response and the population mean response at that observation's predictor value. Since the population parameters are unknown, the model error is not usually available as a directly calculated quantity. In contrast, the fitted value uses estimated coefficients. The difference between an observed response and its fitted value is a sample quantity, the residual.

These distinctions matter because the two lines involved are different: the population mean line uses \(\beta_0\) and \(\beta_1\), while the estimated line uses \(b_0\) and \(b_1\). Therefore, a model error and a residual need not have the same value. A residual reflects both individual variation around the population mean and the fact that the population line has been estimated.

Worked Example: Separating the Error from the Fitted-Value Difference

Consider a fully hypothetical illustration in which the population model is \(Y=20+2x+\varepsilon\), with response in units and predictor \(x\) in hours. At \(x=4\), suppose the observed response is \(Y=22\). Separately, suppose a sample-based estimated line is \(\hat{y}=19.5+2.1x\). Calculate the population mean and model error, then calculate the fitted value and observed-minus-fitted difference.

The population mean at \(x=4\) is

$$ E(Y\mid x=4)=20+2(4)=28\text{ units}. $$

The model error for this observation is its response minus that population mean:

$$ \varepsilon=22-28=-6\text{ units}. $$

The fitted value from the estimated line is instead

$$ \hat{y}=19.5+2.1(4)=19.5+8.4=27.9\text{ units}. $$

The observed-minus-fitted difference is \(22-27.9=-5.9\) units. It differs from the model error of \(-6\) units because the estimated line is not exactly the population mean line. The arithmetic illustrates why the model error and the residual are related but are not interchangeable.

Justifying the Mean and Slope Interpretations

The slope interpretation follows directly by comparing the model mean at two predictor values. If the predictor changes from \(x\) to \(x+1\), the model gives the mean responses \(\beta_0+\beta_1x\) and \(\beta_0+\beta_1(x+1)\). Their difference is

$$ \bigl[\beta_0+\beta_1(x+1)\bigr] -\bigl[\beta_0+\beta_1x\bigr] =\beta_1. $$

The intercept interpretation follows by setting \(x=0\): \(\beta_0+\beta_1(0)=\beta_0\). Both interpretations concern the mean response described by the model. They do not claim that an individual response must change by exactly the slope for a one-unit increase, because the individual error may also differ.

Common Mistakes and Why the Distinctions Matter

  • Calling the estimated line the population model. The model contains unknown parameters \(\beta_0,\beta_1\) and errors. The estimated line uses the sample-based estimates \(b_0,b_1\) and supplies fitted values.
  • Interpreting the slope as an individual change. The slope describes a change in the model's mean response per predictor unit, not a guaranteed change for every individual.
  • Forgetting the units. A slope is measured in response units per predictor unit, not just “units.” State both variables' units when interpreting it.
  • Treating the intercept as automatically meaningful. It is the model's mean response at predictor value zero. If zero is outside a sensible or observed range, that interpretation may not be useful in the application.
  • Confusing error and residual. The model error is defined relative to the population mean line; the residual is calculated relative to the estimated line. They are not generally equal.
  • Reading an association as a cause. A regression equation describes a relationship in the data under its assumptions. The equation alone does not establish that changing the predictor causes a response change.
Key takeaway: The simple linear regression model is \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\). Its parameters describe a population mean relationship, and its errors allow individual responses to vary around that mean. An estimated line, \(\hat{y}_i=b_0+b_1x_i\), uses sample estimates to produce fitted values.

Check Your Understanding

Answer each question by distinguishing the population model from the estimated line where needed.

  1. A model relates response in kilograms to a predictor measured in meters. What are the units of its intercept and slope?
  2. In \(Y_i=\beta_0+\beta_1x_i+\varepsilon_i\), what does \(\beta_1\) describe, and what does it not guarantee about an individual response?
  3. An estimated line is \(\hat{y}=12+3x\). Find the fitted value at \(x=5\), and state what the value represents.
  4. Explain why the model error and the observed-minus-fitted difference need not be equal.
  5. If predictor value zero is far outside the range of observed predictor values, what limitation should be kept in mind when interpreting the intercept?