From Software Output to a Fitted Equation
Regression software often displays a compact table of coefficient estimates rather than writing out the fitted line for you. To read that table correctly, you need to identify which variable is the response, which is the explanatory variable, and which row contains each coefficient. Then you can write the fitted equation and explain what its slope and intercept mean in the units of the variables.
This tutorial focuses on a simple least-squares regression with one explanatory variable. The fitted equation describes the line found from the supplied data; reading its coefficients does not, by itself, establish that a relationship is causal or that a coefficient is statistically distinguishable from zero.
The equation says that the fitted response \(\hat{y}\) changes linearly with \(x\). The intercept \(b_0\) is the fitted response when \(x=0\). The slope \(b_1\) is the change in fitted response for a one-unit increase in \(x\). These descriptions are mathematical; deciding whether either coefficient is useful in context also requires looking at the variable definitions, units, and relevant range of \(x\).
Reading a Coefficient Table
Many software packages show one row for the intercept and another row for the explanatory variable. The column headed “Estimate,” “Coefficient,” or something similar contains the coefficient values to use in the fitted equation. Other columns may contain standard errors, test statistics, or p-values; those are not additional terms in the equation. For a simple regression, the intercept row gives \(b_0\), and the explanatory-variable row gives \(b_1\).
Before interpreting the estimates, confirm the model’s setup. The response should be the quantitative outcome being described, and the explanatory variable should be the quantitative variable used to describe its relationship with that outcome. The displayed estimates must come from a fit to paired observations of those variables, with the software set to fit a straight line by least squares. In each example below, these conditions are specified. Reading coefficients alone does not require assuming that residuals are normally distributed or that the relationship is causal; those claims cannot be concluded just from a coefficient table.
Identify the response and explanatory variable from the analysis description, not just from the order in which names appear in a table.
Use the intercept estimate and the estimate on the explanatory-variable row. Do not substitute a standard error or p-value.
Put the intercept first and the slope multiplying the explanatory variable: \(\hat{y}=b_0+b_1x\).
Describe the slope as response units per explanatory-variable unit, and describe the intercept in response units at explanatory-variable value zero.
Worked Example: Study Hours and Exam Score
Suppose a hypothetical instructor records weekly study hours and exam scores, in points out of 100, for 18 students. The response is exam score, and the explanatory variable is study hours. A least-squares fit to these paired quantitative measurements gives this software output:
| Term | Estimate | Std. Error |
|---|---|---|
| (Intercept) | 52.6 | 3.8 |
| Study hours | 4.15 | 0.72 |
The estimate in the “(Intercept)” row is \(b_0=52.6\). The estimate on the “Study hours” row is \(b_1=4.15\). The standard errors are not coefficients, so they do not go into the fitted equation.
Substitute those two estimates into the simple regression form:
Here \(x\) is weekly study time in hours and \(\hat{y}\) is the fitted exam score in points. The slope has units of points per hour. In this fitted line, each additional hour of weekly study time is associated with an increase of 4.15 points in the fitted exam score, on average across the line’s values. This describes the fitted relationship; it does not show that increasing study time causes an individual student’s score to rise by that amount.
The intercept is 52.6 points: the line’s fitted score at zero study hours per week. If zero hours is not represented among the students, or is otherwise outside the range where the line is a useful description, this value may have limited practical meaning. Its role in the equation is still clear: it is the fitted response at \(x=0\).
Why the Units Help You Check the Equation
The units provide a practical check on whether you have assigned the coefficient estimates to the right terms. The intercept must be in the same units as the response, because it represents a fitted response value. The slope must have response units divided by explanatory-variable units.
This follows directly from the fitted equation. If \(x\) is measured in hours and \(y\) in points, then \(b_1x\) must be in points so that it can be added to \(b_0\), which is also in points. Therefore \(b_1\) must have units of points per hour. More generally, for a one-unit increase in \(x\), the difference between the two fitted responses is:
The intercept’s interpretation follows by setting \(x=0\):
These identities justify the standard verbal interpretations. They also show why the labels matter: the slope is a change in fitted response per unit of the explanatory variable, not a change in explanatory variable per unit of response.
Worked Example: Exercise Time and Resting Heart Rate
Imagine a hypothetical dataset of 24 adults, each with a recorded weekly exercise time in hours and resting heart rate in beats per minute. The software fits resting heart rate as the response and exercise time as the explanatory variable. The displayed coefficient estimates are:
| Term | Coefficient |
|---|---|
| Constant | 76.2 |
| Exercise time (hours/week) | -1.35 |
The row labelled “Constant” is the intercept, so \(b_0=76.2\). The exercise-time row gives the slope, \(b_1=-1.35\). Inserting them into the fitted-line form gives:
The response is measured in beats per minute and \(x\) in hours per week. Thus the slope is \(-1.35\) beats per minute per additional weekly exercise hour. In the fitted line, each one-hour increase in weekly exercise time corresponds to a 1.35-beat-per-minute decrease in fitted resting heart rate. This is an association described by the fitted line, not evidence that exercise time alone caused the difference.
The intercept is 76.2 beats per minute, the fitted response at zero exercise hours per week. Whether zero hours is a relevant value depends on the data and setting; the estimate should not automatically be treated as a meaningful description of every person who does no exercise.
The negative sign belongs to the slope estimate. It indicates a downward fitted relationship as the explanatory variable increases. It does not make the intercept negative, and it does not change the units of either coefficient.
Labels and Software Conventions
Software does not use one universal label for the intercept. It may appear as “(Intercept),” “Constant,” or “Intercept.” The slope is often labelled with the explanatory-variable name. The names and layout can differ, but the fitted equation has the same structure: the constant term is \(b_0\), and the coefficient multiplying \(x\) is \(b_1\).
Some output prints more decimal places than are useful to report. Use the reported estimates at suitable precision, and do not silently change their signs or swap their positions. If the coefficient table contains several rows, make sure you are reading the row for the intended explanatory variable. In this tutorial’s simple-regression setting there is one such row; the equation has one slope term.
Worked Example: Temperature and Daily Energy Use
For a hypothetical set of 30 buildings, a facilities analyst records average outdoor temperature in degrees Celsius and daily heating energy use in kilowatt-hours. The response is energy use, and the explanatory variable is temperature. A least-squares coefficient table reports:
| Term | Estimate | t value | p-value |
|---|---|---|---|
| Intercept | 148.0 | 9.21 | 0.0001 |
| Temperature (°C) | -3.60 | -6.02 | 0.0000 |
For constructing the fitted equation, use the “Estimate” column: \(b_0=148.0\) and \(b_1=-3.60\). The t values and p-values are other reported statistics, not equation coefficients. Substitution gives:
Here the slope has units of kilowatt-hours per degree Celsius. The fitted line associates a one-degree Celsius increase in outdoor temperature with a decrease of 3.60 kilowatt-hours in fitted daily heating energy use. The intercept, 148.0 kilowatt-hours, is the fitted energy use at \(0^\circ\text{C}\). Its interpretation remains tied to that specific temperature and the stated response units.
The table’s p-value column does not alter either coefficient’s meaning. Interpreting a p-value is a separate statistical task; it does not turn a coefficient into a different term or establish a causal effect.
A Common Mistake: Swapping the Coefficients
A frequent error is to read the first numeric estimate as the slope and the second as the intercept, regardless of row labels. In the study-hours example, that mistake would produce \(\hat{y}=4.15+52.6x\), which assigns 4.15 points to the response at zero hours and a slope of 52.6 points per hour. That equation contradicts the table: the intercept row reports 52.6, while the study-hours row reports 4.15.
The correction is to map estimates by their row labels, not by their order or visual position. Then check the units. A fitted score intercept should be in points, while a score slope for study hours should be in points per hour. Units can reveal a mistaken interpretation even when the arithmetic looks tidy.
Another tempting mistake is to describe the intercept as the average response in the sample. It is not generally the sample mean; it is the fitted response at \(x=0\). The intercept and slope together define the fitted line. Keep the descriptions of the two coefficients distinct.
Check Your Understanding
Use the row labels and variable units in each question.
- A coefficient table has an intercept estimate of 18.4 and an estimate of 2.7 for distance (kilometres). Identify the slope and intercept and write the fitted equation using \(x\) for distance.
- If the response in Question 1 is travel time in minutes, what are the units of the slope and the intercept?
- A fitted equation is \(\hat{y}=90-2.5x\), where \(x\) is weekly activity hours and \(y\) is resting heart rate in beats per minute. Interpret the slope in context.
- What does the intercept represent in Question 3, and why might its practical interpretation require caution?
- A software table reports an estimate, a standard error, and a p-value for each coefficient. Which column supplies the values used to construct the fitted equation?