Chapter 12: More About Regression: Section 12.1 Inference For Linear Regression
Chapter 12: More About Regression: Section 12.1 Inference For Linear Regression
Chapter 12: More About Regression: Section 12.1 Inference For Linear Regression
Learning Objectives
After this section, you should be able to…
+
When a scatterplot shows a linear relationship between a
In Section 12.1, we will learn how to estimate and test claims about the
slope of the population (true) regression line that describes the
relationship between two quantitative variables.
Inference for Linear Regression
+
In Chapter 3, we examined data on eruptions of the Old Faithful geyser.
+
The figures below show the results of taking three different SRSs of 20 Old
+
Confidence intervals and significance tests about the slope of the population
Center: The mean of the 1000 b- Spread: The standard deviation of the
values is 10.32. This value is quite 1000 b-values is 1.31. Later, we will see
close to the slope of the population that the standard deviation of the sampling
(true) regression line, 10.36. distribution of b is actually 1.30.
Condition for Regression Inference
+
The slope b and intercept a of the least-squares line are statistics. That is, we
+
The figure below shows the regression model when the conditions are
+
You should always check the conditions before doing inference about the
+
Mrs. Barrett’s class did a variation of the helicopter experiment on page 738. Students
Linear The scatterplot shows a clear linear Normal The histogram of the residuals is
form. For each drop height used in the single-peaked, unimodal, and somewhat bell-
experiment, the residuals are centered on the shaped. In addition, the Normal probability plot
horizontal line at 0. The residual plot shows a is very close to linear.
random scatter about the horizontal line. Independent Because the helicopters were
Equal variance The residual plot shows a released in a random order and no helicopter was
similar amount of scatter about the residual = 0 used twice, knowing the result of one observation
line for the 152, 203, 254, and 442 cm drop should give no additional information about
heights. Flight times (and the corresponding another observation.
residuals) seem to vary more for the helicopters Random The helicopters were randomly assigned
that were dropped from a height of 307 cm. to the five possible drop heights.
Except for a slight concern about the equal-variance condition, we should be safe
performing inference about the regression model in this setting.
Estimating the Parameters
+
When the conditions are met, we can do inference about the regression
The LSRL computed from the sample data estimates the population
regression line. So the residuals estimate how much y varies about the
population line.
Because σ is the standard deviation of responses about the population
regression line, we estimate it by the standard deviation of the residuals
s
residuals 2
(y i yˆ i ) 2
n 2 n 2
Example: The Helicopter Experiment
+
Computer output from the least-squares regression analysis on the helicopter data for Mrs.
The slope β of the true regression line says how much the average flight
time
Weof need
the paper helicopters increases when the drop height increases by
the intercept a = -0.03761 to draw the line and make predictions,
1 centimeter.
butOur
it has no statistical
estimate for the meaning
standard in this example.
deviation No helicopter
σ of flight times aboutwasthedropped
true
from
Because less than 150
b = 0.0057244
regression cm, so we
estimates
line at each have
x-value the no data
is unknown near
s = 0.168β, x = 0.
we estimate that, on
seconds.
average,
WeThis flightexpect
might time increases by about 0.0057244 seconds for each to be 0
is also thethesizeactual y-intercept
of a typical α of the
prediction true
error if regression
we use the line
least-squares
additional
because centimeter
it should of drop
take height.
no time
regression line to predict the for a helicopter
flight to fall no distance.
time of a helicopter from its drop height.
The y-intercept of the sample regression line is -0.03761, which is pretty
close to 0.
The Sampling Distribution of b
+
Let’s return to our earlier exploration of Old Faithful eruptions. For all 222 eruptions
Shape: Normal
Center : µb = β = 10.36 (b is an unbiased
estimator of β)
6.159
Spread : b 1.30
sx n 1 1.083 20 1
+
What happens if we transform the values of b by standardizing? Since the
Replacing the standard deviation σb of the sampling distribution with its standard
error gives the statistic
b
t
SE b
which has a t distribution with n - 2 degrees of freedom.
The figure shows the result of
standardizing the values in the sampling
distribution of b from the Old Faithful
example. Recall, n = 20 for this example.
+
Inference for Linear Regression
The slope β of the population (true) regression line µy = α + βx is the rate of change
of the mean response as the explanatory variable increases. We often want to
estimate β. The slope b of the sample regression line is our point estimate for β. A
confidence interval is more useful than the point estimate because it shows how
precise the estimate b is likely to be. The confidence interval for β has the familiar
form
statistic ± (critical value) · (standard deviation of statistic)
Because we use the statistic b as our estimate, the confidence interval is
b ± t* SEb
We call this a t interval for the slope.
t Interval for the Slope of a Least-Squares Regression Line
When the conditions for regression inference are met, a level C confidence interval for
the slope βof the population (true) regression line is
b ± t* SEb
In this formula, the standard error of the slope is
s
SE b
sx n 1
and t* is the critical value for the t distribution with df = n - 2 having area C between -t*
and t*.
Example: Helicopter Experiment
+
Earlier, we used Minitab to perform a least-squares regression analysis on the helicopter data
SEb = 0.0002018, from the “SE Coef ” column in the computer output.
Because the conditions are met, we can calculate a t interval for the slope β
based on a t distribution with df = n - 2 = 70 - 2 = 68. Using the more
conservative df = 60 from Table B gives t* = 2.000.
The 95% confidence interval is
b ± t* SEb = 0.0057244 ± 2.000(0.0002018)
= 0.0057244 ± 0.0004036
= (0.0053208, 0.0061280)
IfWe
we are
were to repeat
95% thisthat
confident experiment many
the interval times
from and compute
0.0053208 confidence
to 0.0061280 seconds
intervals for regression
per cm captures line slope
the slope of the in each
true case, 95%
regression lineofrelating
the intervals would
the flight timecontain
y and
the slope
drop of the
height x ofpopulation line.
paper helicopters.
Graphing residuals
Press Stat and Edit to enter x-data into L1 and y-data into L2
+
the x-variable
XList: L1
YList: L4
+
In Chapter 3, we examined data from a study that investigated why some people don’t gain
Construct and interpret a 90% confidence interval for the slope of the
population regression line.
Example: Does Fidgeting Keep you Slim?
+
State: We want to estimate the true slope β of the population regression line
+
Do: We use the t distribution with 16 - 2 = 14 degrees of freedom to find the
+
t Test for the Slope of a Least-Squares Regression Line
b 0
t
SE b
+
Infants who cry easily may be more easily stimulated than others. This may be a sign of higher
+
State: We want to perform a test of
+
Do: With no obvious violations of the conditions, we proceed to inference.
Conclude: The P-value, 0.002, is less than our α = 0.05 significance level, so we
have enough evidence to reject H0 and conclude that there is a positive linear
relationship between intensity of crying and IQ score in the population of infants.
+ Section 12.1
Inference for Linear Regression
Summary
In this section, we learned that…
The t interval for the slope β has the form b ± t*SEb, where the
standard error of the slope is
s
SE b
sx n 1
Learning Objectives
After this section, you should be able to…
+
In Chapter 3, we learned how to analyze relationships between two
Once the data have been transformed to achieve linearity, we can use
least-squares regression to generate a useful model for making
predictions. And if the conditions for regression inference are met, we
can estimate or test a claim about the slope of the population (true)
regression line using the transformed data.
+
When you visit a pizza parlor, you order a pizza by its diameter—say, 10
Although a power model of the form y = axp
describes the relationship between x and y
in this setting, there is a linear relationship
between xp and y.
+
Imagine that you have been put in charge of organizing a fishing tournament in which prizes
Reference data on the length (in centimeters) and weight (in grams) for Atlantic Ocean rockfish of
several sizes is plotted. Note the clear curved shape.
+
Here is Minitab output from separate regression analyses of the two sets of transformed
(b)
(a) Suppose
(c) Give a contestant
the equation
Interpret the valueof sin
ofthe the fishing tournament
inleast-squares
context. catches
regression an Atlantic
line. Define ocean rockfish
any variables you use.
that’s 36 centimeters long. Use the model from part (a) to predict the fish’s weight. Show
your work.
3
Transformation
Transformation
For transformation 1 1:
1, the: standard
weight ==4.066
4.066of
weightdeviation 0.0146774(36
the residuals )iss688.9
0.0146774(length 3
grams
=)18.841 grams.
Predictions of fish weight using this model will be off by an average of about 19
grams. For transformation 2, s = 0.12. that is, predictions of the cube root of fish
Transformation
weightTransformation
using this model 2 2:
:will
3 3weight 0.02204 0.246616(36) = 8.856
weight
be 0.02204
off by an average of 0.246616(length)
about 0.12.
weight = 8.8563 694.6 grams
Transforming with Powers and Roots
+
When experience or theory suggests that the relationship between two
1.Raise the values of the explanatory variable x to the p power and plot the
points (x p , y).
2.Take the pth root of the values of the response variable y and plot the
points (x, p y ).
What if you have no idea what power to choose? You could guess and test
until you find a transformation that works. Some technology comes with
built-in sliders that allow you to dynamically adjust the power and watch the
scatterplot change shape as you do.
It turns out that there is a much more efficient method for linearizing a
curved pattern in a scatterplot. Instead of transforming with powers and
roots, we use logarithms. This more general method works when the
data follow an unknown power model or any of several other common
mathematical models.
Transforming with Logarithms
+
Not all curved relationships are described by power models. Some
y ab x exponential model
+
Transforming to Achieve Linearity
We can rearrange the final equation as log y = log a + (log b)x. Notice
that log a and log b are constants because a and b are constants.
So the equation gives a linear model relating the explanatory variable x
to the transformed variable log y.
Thus, if the relationship between two variables follows an exponential
model, and we plot the logarithm (base 10 or base e) of y against x, we
should observe a straight-line pattern in the transformed data.
+
Gordon Moore, one of the founders of Intel Corporation, predicted in 1965 that the number of
+
(a) A scatterplot of the natural logarithm (log base e or ln) of the number of transistors on a
(b) Minitab output from a linear regression analysis on the transformed data is shown below.
Give the equation of the least-squares regression line. Be sure to define any variables you use.
+
(c) Use your model from part (b) to predict the number of transistors on an Intel computer
+
When we apply the logarithm transformation to the response variable y in an
1.A power model has the form y = axp, where a and p are constants.
2.Take the logarithm of both sides of this equation. Using properties of
logarithms,
log y = log(axp) = log a + log(xp) = log a + p log x
The equation log y = log a + p log x shows that taking the logarithm of
both variables results in a linear relationship between log x and log y.
3. Look carefully: the power p in the power model becomes the slope of the
straight line that links log y to log x.
+
On July 31, 2005, a team of astronomers announced that they had discovered what appeared to
Describe the relationship between distance from the sun and period of revolution.
There appears to be a strong, positive, curved relationship between distance from the sun (AU)
and period of revolution (years).
Example: What’s a Planet, Anyway?
+
(a) Based on the scatterplots below, explain why a power model would provide a more
The scatterplot of ln(period) versus distance is clearly curved, so an exponential model would
not be appropriate. However, the graph of ln(period) versus ln(distance) has a strong linear
pattern, indicating that a power model would be more appropriate.
(b) Minitab output from a linear regression analysis on the transformed data (ln(distance),
ln(period)) is shown below. Give the equation of the least-squares regression line. Be
sure to define any variables you use.
+
(c) Use your model from part (b) to predict the period of revolution for Eris, which is