math.wiki
Statistics › Bivariate data › Reading regression output
Open on the map
Statistics

Reading regression output

Software has fitted the line and printed a table of numbers. Which of them are the line, which say how well it fits, and which can wait?

Where you are 9 in Bivariate data

When you reach for it

Zsofia measures twelve dragonflies (made-up data), recording body length x and wingspan y, both in millimeters, as pairs (x, y): (42, 65), (49, 77), (50, 72), (51, 70), (52, 82), (53, 80), (55, 83), (57, 75), (62, 93), (64, 94), (66, 95), (71, 103). The dots rise in a fairly tight straight band.

40 45 50 55 60 65 70 75 60 70 80 90 100 110 body length (mm) wingspan (mm)
Figure 1Zsofia’s twelve dragonflies (made-up data) and the least-squares line from her printout, \widehat{\text{wingspan}} = 8.686 + 1.317\,(\text{body length}).

She hands the data to a statistics program, which fits the least-squares line and prints this:

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & 8.686 & 8.494 & 1.02 & 0.331 \\ \text{Body length} & 1.317 & 0.150 & 8.77 & 0.000 \end{array}
\small\text{S} = 4.134 \quad \text{R-Sq} = 88.5\% \quad \text{R-Sq(adj)} = 87.3\%

Nobody computes a line through a real data set by hand; a program or calculator does it, and the person reading the result was often not the one who ran it. A printout like this is how a fitted line is reported in articles, lab notes and textbooks. This lesson reads one: where the intercept and slope sit, which entries describe the fit, how to recover r, and which entries belong to later work. Running the fit yourself is a different job, Fitting linear and exponential models with technology; here the output is already in your hands.

The procedure

The line is in the Coef column. Each row of the table is one term of the line \hat{y} = a + bx. The row labeled Constant holds the intercept a, the term with no variable attached. The other row is named after the explanatory variable, and its Coef is the slope b, the number that multiplies that variable. So Zsofia’s line is

\widehat{\text{wingspan}} = 8.686 + 1.317\,(\text{body length}).

A printout names the explanatory variable and leaves the response to be read from the heading or the study, so write the line with both variable names, not with bare x and y. These are the same a and b that the formulas b = r\dfrac{s_y}{s_x} and a = \bar{y} - b\bar{x} produce (Slope from r and the spreads, and regression to the mean); the program has simply done that arithmetic.

S and R-Sq describe the fit. Both were built in r squared and the standard deviation of the residuals. \text{S} is s, the standard deviation of the residuals, \displaystyle s = \sqrt{\text{SSE}/(n - 2)}, in the units of y: the typical size of a prediction error. \text{R-Sq} is r squared, 1 - \text{SSE}/\text{SST}, printed as a percent: the share of the variation in y accounted for by the line.

r comes from R-Sq and the sign of the slope. Most printouts do not show r. Since r squared is the square of r, r is one of \displaystyle \pm\sqrt{r^2}. A square has lost its sign, so the sign comes from elsewhere: r always has the sign of the slope, because b = r\dfrac{s_y}{s_x} and the standard deviations are positive. Convert the percent to a decimal first; 88.5\% is 0.885.

The other entries are for inference, later. The fitted line describes these twelve dragonflies. A natural further question is what the data say about the line for all dragonflies of this kind, and the remaining entries answer that question:

  • \text{SE Coef} is the Standard error of each coefficient, a measure of how much that coefficient would vary from sample to sample;
  • \text{T} is each coefficient divided by its standard error, for example 8.686 \div 8.494 \approx 1.02 in the Constant row, a test statistic;
  • \text{P} is the P-value for that statistic;
  • \text{R-Sq(adj)} is r squared adjusted for the number of explanatory variables, which matters when a model has several.

Using any of them needs conditions on how the data were produced and on the residuals (Conditions for regression inference) and the ideas of Test for a slope. Until then, read past them. The Constant row’s \text{P} = 0.331, for example, says nothing about whether the line describes the data well.

Other layouts carry the same numbers. Programs differ in labels: “Estimate” or “Coefficient” for Coef, “(Intercept)” for Constant, “Std. Error” for SE Coef, “Residual standard error” for S, “Multiple R-squared” for R-Sq. A graphing calculator’s linear regression usually prints a short list, a, b, r^2 and r, and no s. Whatever the layout, find the intercept and the slope first, and check which letter is which: some calculators offer the form y = ax + b, where a is the slope and b the intercept, the reverse of \hat{y} = a + bx.

Worked examples

Example 1

Writing the line and using it

Use Zsofia’s printout. (a) Write the least-squares line in context. (b) Predict the wingspan of a dragonfly whose body is 60 mm long. (c) Interpret the slope and the intercept.

Solution

(a) The Constant row gives a = 8.686 and the Body length row gives b = 1.317, so

\widehat{\text{wingspan}} = 8.686 + 1.317\,(\text{body length}).

(b) 60 mm is inside the body lengths measured, 42 to 71 mm, so the line may be used: \hat{y} = 8.686 + 1.317(60) = 87.706, a predicted wingspan of about 87.7 mm.

(c) For each additional millimeter of body length, the predicted wingspan is 1.317 mm greater (Interpreting the slope and intercept). The intercept is the predicted wingspan at a body length of 0 mm, which no dragonfly has and which lies far below the data, so here 8.686 only fixes the height of the line and has no meaning of its own (Where a model holds: domain, interpolation and extrapolation).

Example 2

Reading S and R-Sq

Interpret \text{S} and \text{R-Sq} for Zsofia’s line. Then find the residual for her dragonfly with body length 57 mm and wingspan 75 mm, and compare it with \text{S}.

Solution

\text{S} = 4.134: the actual wingspans typically differ from the wingspans the line predicts by about 4.1 mm. \text{R-Sq} = 88.5\%: about 88.5\% of the variation in wingspan among these dragonflies is accounted for by the least-squares line on body length.

For the dragonfly, \hat{y} = 8.686 + 1.317(57) = 83.755 mm, so its residual is 75 - 83.755 = -8.755, about -8.8 mm. Its wingspan is 8.8 mm shorter than predicted, about twice the typical miss of 4.1 mm; in the figure it is the dot that sits well below the line near the middle. (The unrounded coefficients give a residual of -8.73; the small gap comes only from rounding the printed Coefs to three places.)

Example 3

Recovering r

Find the correlation r between body length and wingspan from Zsofia’s printout.

Solution

R-Sq is 88.5\% = 0.885, so \displaystyle r = \pm\sqrt{0.885} = \pm 0.941. The slope 1.317 is positive, so r is positive: r \approx 0.941, a strong positive linear association. Computing r directly from the twelve pairs gives 0.9407, the same to three decimal places.

Example 4

A negative slope

Bence wants to know how water temperature affects how long dragonfly eggs take to hatch. He keeps ten batches at water temperatures from 14 to 26 degrees Celsius (made-up data) and reports:

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & 42.381 & 3.865 & 10.96 & 0.000 \\ \text{Water temp} & -1.024 & 0.192 & -5.33 & 0.001 \end{array}
\small\text{S} = 2.203 \quad \text{R-Sq} = 78.1\% \quad \text{R-Sq(adj)} = 75.3\%

The response is days to hatching. Write the line, predict for 20 degrees, interpret the slope and \text{S}, and find r.

Solution

The predictor row is Water temp, so temperature is the explanatory variable:

\widehat{\text{days}} = 42.381 - 1.024\,(\text{water temp}).

At 20 degrees, \hat{y} = 42.381 - 1.024(20) = 21.901, about 21.9 days. Each additional degree goes with a predicted hatching time 1.024 days shorter, and actual hatching times typically differ from the predictions by about 2.2 days. The slope is negative, so r takes the negative root: \displaystyle r = -\sqrt{0.781} \approx -0.88.

Example 5

A calculator’s list

Zsofia’s friend enters the same twelve dragonflies into a graphing calculator. Its linear regression screen shows

\begin{aligned} &y = a + bx \\ &a = 8.6858 \\ &b = 1.3166 \\ &r^2 = 0.8849 \\ &r = 0.9407 \end{aligned}

and its one-variable statistics give the wingspans’ standard deviation s_y = 11.6186 mm. Match the screen with the printout, and find s, which the screen does not show.

Solution

The form is y = a + bx, so a is the intercept and b the slope: rounded to three places, 8.686 and 1.317, as in the printout. r^2 = 0.8849 is 88.5\%, and the calculator prints r = 0.9407 with its sign. For s, use the link from r squared and the standard deviation of the residuals with n = 12:

\begin{aligned} s &= s_y\sqrt{\frac{(1 - r^2)(n - 1)}{n - 2}} \\ &= 11.6186\sqrt{\frac{(0.1151)(11)}{10}} \approx 4.134, \end{aligned}

which is the printout’s \text{S}.

Example 6

Swapping the variables

Levente wants to predict body length from wingspan. He says he can solve Zsofia’s equation for body length, but his own program, run on the same twelve dragonflies, prints

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & 0.608 & 6.375 & 0.10 & 0.926 \\ \text{Wingspan} & 0.672 & 0.077 & 8.77 & 0.000 \end{array}
\small\text{S} = 2.954 \quad \text{R-Sq} = 88.5\% \quad \text{R-Sq(adj)} = 87.3\%

Compare the two ways of predicting the body length of a dragonfly with a 90 mm wingspan, and explain which entries agree.

Solution

Solving Zsofia’s line gives body length = \dfrac{90 - 8.686}{1.317} \approx 61.7 mm, a slope of \dfrac{1}{1.317} \approx 0.759. Levente’s printout gives 0.608 + 0.672(90) = 61.088, about 61.1 mm, with slope 0.672. They differ because each line makes a different sum of squares smallest: Zsofia’s the vertical misses in wingspan, Levente’s the misses in body length, as The least squares criterion and its line and Slope from r and the spreads, and regression to the mean explain. R-Sq is the same, 88.5\%, because r does not depend on which variable is called x. \text{S} changes, since it is now in millimeters of body length. To predict body length, use Levente’s line.

Boundaries

  • A printout reports the least-squares line whether or not a line suits the data. It does not check the shape; look at the scatter plot and the residual plot first.
  • The line predicts only inside the range of the explanatory variable; the printout does not show that range.
  • \displaystyle r = \pm\sqrt{\text{R-Sq}} holds for a line with one explanatory variable. With several, R-Sq is still a share of variation but is not the square of any one correlation.
  • \text{SE Coef}, \text{T}, \text{P} and \text{R-Sq(adj)} carry meaning only under the conditions of Conditions for regression inference.
  • Labels vary by program. Identify the intercept and the slope from the layout, not from the letters a and b.

Where this goes next

Reading output is the bridge to inference. The slope in the printout belongs to one sample; a different twelve dragonflies would give a different slope, and \text{SE Coef} measures how much. Interval for a slope turns the slope and its standard error into an interval for the true rate, and Test for a slope reads the \text{T} and \text{P} columns. Before trusting any single fit, Outliers, leverage and influential points asks whether one dragonfly is steering the line.

Exercises

Levente counts the dragonflies that pass a pond in 10 minutes on fourteen afternoons with air temperatures from 17 to 32 degrees Celsius (made-up data). Output A:

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & -12.054 & 5.054 & -2.39 & 0.034 \\ \text{Air temp} & 1.049 & 0.202 & 5.18 & 0.000 \end{array}
\small\text{S} = 3.662 \quad \text{R-Sq} = 69.1\% \quad \text{R-Sq(adj)} = 66.6\%

Zsofia measures ten damselflies, body lengths 29 to 48 mm, response wingspan in mm (made-up data). Output B:

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & 18.004 & 6.038 & 2.98 & 0.018 \\ \text{Body length} & 0.788 & 0.156 & 5.04 & 0.001 \end{array}
\small\text{S} = 2.795 \quad \text{R-Sq} = 76.0\% \quad \text{R-Sq(adj)} = 73.0\%

Bence counts dragonflies at the same pond on twelve days with wind speeds from 2 to 18 miles per hour (made-up data). Output C:

\small\begin{array}{lrrrr} \text{Predictor} & \text{Coef} & \text{SE Coef} & \text{T} & \text{P} \\ \hline \text{Constant} & 23.707 & 2.619 & 9.05 & 0.000 \\ \text{Wind speed} & -0.697 & 0.238 & -2.92 & 0.015 \end{array}
\small\text{S} = 4.555 \quad \text{R-Sq} = 46.1\% \quad \text{R-Sq(adj)} = 40.7\%

Writing and using the line

  1. From Output A, write the least-squares line in context.
  2. Use Output A to predict the count on a 26-degree afternoon.
  3. Interpret the slope of Output A. Does its constant have a meaning in context?
  4. From Output B, write the line and predict the wingspan of a damselfly 38 mm long.
  5. From Output C, write the line, interpret its slope, and predict the count when the wind is 10 miles per hour.

S and R-Sq

  1. Interpret \text{S} and \text{R-Sq} for Output A.
  2. One of Zsofia’s damselflies is 41 mm long with a wingspan of 53 mm. Find its residual from Output B and compare it with \text{S}.
  3. Of Outputs A, B and C, which line accounts for the largest share of the variation in its response? Interpret \text{R-Sq} for Output C.

Finding r

  1. Find r for Output A.
  2. Find r for Output C.
  3. A printout shows a slope of -0.25 and \text{R-Sq} = 64.0\%. Find r.
  4. Printout P shows a slope of 2.1 and \text{R-Sq} = 49.0\%; printout Q shows a slope of -0.6 and \text{R-Sq} = 81.0\%. Find r for each and say which shows the stronger linear association.

Other layouts

  1. Bence records the wingbeat rate of eight dragonflies, in beats per second, at air temperatures from 16 to 30 degrees Celsius (made-up data). His calculator shows y = a + bx, a = 21.6549, b = 0.4402, r^2 = 0.8914, r = 0.9442. Write the line in context and give r squared as a percent.
  2. For the data in Exercise 13, the wingbeat rates have s_y = 2.3905 beats per second. Find s.
  3. A calculator set to the form y = ax + b predicts hindwing length from forewing length, both in mm, and shows a = 1.12 and b = -0.4. Write the line as \hat{y} = a + bx and name the slope and the intercept.
  4. A smudged copy of Output A has lost the Constant’s Coef. The temperatures have mean \bar{x} = 24.5 and the counts \bar{y} = 13.643. Recover the constant.
  5. List which entries of Output B are used to describe these ten damselflies and which belong to later inference.

Reasoning

  1. Explain why \text{R-Sq} alone cannot give the sign of r, and where the sign comes from.
  2. Zsofia’s twelve dragonflies are measured again in centimeters instead of millimeters, both variables. Which entries of her printout change, and to what?
  3. A classmate reads Zsofia’s \text{R-Sq} = 88.5\% as “the predictions are 88.5\% accurate”. Explain what it says instead.
Answers
  1. \widehat{\text{count}} = -12.054 + 1.049\,(\text{air temp}), count in dragonflies per 10 minutes, temperature in degrees Celsius.
  2. About 15.2 dragonflies: -12.054 + 1.049(26) = 15.22, and 26 is inside 17 to 32.
  3. Each additional degree goes with 1.049 more dragonflies predicted in 10 minutes. The constant, -12.054 at 0 degrees, is an impossible count far outside 17 to 32 degrees, so it has no meaning; it only places the line.
  4. \widehat{\text{wingspan}} = 18.004 + 0.788\,(\text{body length}); 18.004 + 0.788(38) = 47.948, about 47.9 mm.
  5. \widehat{\text{count}} = 23.707 - 0.697\,(\text{wind speed}). Each additional mile per hour goes with 0.697 fewer dragonflies predicted. At 10: 23.707 - 0.697(10) = 16.737, about 16.7 dragonflies.
  6. \text{S} = 3.662: actual counts typically differ from the predicted counts by about 3.7 dragonflies. \text{R-Sq} = 69.1\%: about 69.1\% of the variation in the count is accounted for by the line on air temperature.
  7. \hat{y} = 18.004 + 0.788(41) = 50.312, residual 53 - 50.312 = 2.688, about 2.7 mm: its wingspan is 2.7 mm longer than predicted, about one \text{S} (2.795 mm), a typical miss.
  8. Output B, with \text{R-Sq} = 76.0\% (A has 69.1\%, C 46.1\%). For C, about 46.1\% of the variation in the count is accounted for by the line on wind speed; more than half is not.
  9. \displaystyle r = +\sqrt{0.691} \approx 0.831, positive because the slope 1.049 is positive.
  10. \displaystyle r = -\sqrt{0.461} \approx -0.679, negative because the slope -0.697 is negative.
  11. \displaystyle r = -\sqrt{0.64} = -0.8, negative like the slope.
  12. P: \displaystyle r = \sqrt{0.49} = 0.7. Q: \displaystyle r = -\sqrt{0.81} = -0.9. Q is stronger, since |-0.9| > 0.7; strength is the size of r, direction its sign.
  13. \widehat{\text{wingbeats}} = 21.6549 + 0.4402\,(\text{air temp}), beats per second; r squared = 89.14\%, about 89.1\%.
  14. \displaystyle s = 2.3905\sqrt{\dfrac{(1 - 0.8914)(7)}{6}} \approx 0.851 beats per second, with n = 8.
  15. In y = ax + b the slope is a = 1.12 and the intercept b = -0.4, so \hat{y} = -0.4 + 1.12x: intercept -0.4, slope 1.12.
  16. The line passes through (\bar{x}, \bar{y}), so a = \bar{y} - b\bar{x} = 13.643 - 1.049(24.5) = -12.0575, about -12.06; the printed -12.054 differs only through the rounding of the slope.
  17. Description: the Coefs 18.004 and 0.788, \text{S} = 2.795 and \text{R-Sq} = 76.0\% (and r from it). Later inference: \text{SE Coef}, \text{T}, \text{P} and \text{R-Sq(adj)}.
  18. R-Sq is r^2, and r and -r have the same square. The sign is the slope’s sign, because b = r\dfrac{s_y}{s_x} with both standard deviations positive.
  19. Everything in centimeters of wingspan is divided by 10: the Constant becomes 0.8686 cm, its \text{SE Coef} 0.8494 cm, and \text{S} = 0.4134 cm. The slope 1.317 and its \text{SE Coef} 0.150, both \text{T} and \text{P} values, \text{R-Sq} and \text{R-Sq(adj)} do not change, since both variables are rescaled by the same factor, a slope is a ratio of the two units, and r squared has no units.
  20. R-Sq is a share of variation, not of accuracy: 88.5\% of the variation in wingspan among these dragonflies is accounted for by the line on body length. Individual predictions still miss by about \text{S} = 4.1 mm, typically.
kg1128 · updated 2026-10-20 · CC-BY-SA-4.0