mrsvenneman.weebly.com · web viewthe class used minitab to carry out a least-squares regression...

25
Chapter 12: More About Regression 12.1: Inference for Linear Regression Learning Objectives -Check conditions for performing inference about the slope β of the population (true) regression line. -Interpret the values of a, b, s, SE b , and r 2 in context, and determine these values from computer output. -Construct and interpret a confidence interval for the slope β of the population (true) regression line. -Perform a significance test about the slope β of a population (true) regression line. When a scatterplot shows a linear relationship between a quantitative explanatory variable x and a quantitative response variable y, we can use the least-squares line fitted to the data to predict y for a given value of x. If the data are a random sample from a larger population, we need statistical inference to answer questions like these: • Is there really a linear relationship between x and y in the population, or could the pattern we see in the scatterplot plausibly happen just by chance? • In the population, how much will the predicted value of y change for each increase of 1 unit in x? What’s the margin of error for this estimate? Sampling Distribution of a Slope b Choose an SRS of n observations (x, y) from a population of size N with least- squares regression line predicted y=α +βx Let b be the slope of the sample regression line. Then: 1

Upload: others

Post on 12-Mar-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

12.1: Inference for Linear RegressionLearning Objectives-Check conditions for performing inference about the slope β of the population (true) regression line.-Interpret the values of a, b, s, SEb, and r2 in context, and determine these values from computer output. -Construct and interpret a confidence interval for the slope β of the population (true) regression line.-Perform a significance test about the slope β of a population (true) regression line.

When a scatterplot shows a linear relationship between a quantitative explanatory variable x and a quantitative response variable y, we can use the least-squares line fitted to the data to predict y for a given value of x. If the data are a random sample from a larger population, we need statistical inference to answer questions like these:• Is there really a linear relationship between x and y in the population, or could the pattern we see in the scatterplot plausibly happen just by chance?• In the population, how much will the predicted value of y change for each increase of 1 unit in x? What’s the margin of error for this estimate?

Sampling Distribution of a Slope bChoose an SRS of n observations (x, y) from a population of size N with least-squares regression line

predicted y=α+βx

Let b be the slope of the sample regression line. Then:

1

Page 2: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About RegressionConditions for Regression Inference

Suppose we have n observations on an explanatory variable x and a response variable y. Our goal is to study or predict the behavior of y for given values of x.

Linear: The actual relationship between x and y is linear. For any fixed value of x, the mean response µy falls on the population (true) regression line µy= α + βx.

Examine the scatterplot to check that the overall pattern is roughly linear. Look for curved patterns in the residual plot. Check to see that the residuals center on the “residual = 0” line at each x-value in the residual plot.

Independent: Individual observations are independent of each other. When sampling without replacement, check the 10% condition.

Look at how the data were produced. Random sampling and random assignment help ensure the independence of individual observations. If sampling is done without replacement, check the 10% condition.

Normal: For any fixed value of x, the response y varies according to a Normal distribution.

Make a stemplot, histogram, or Normal probability plot of the residuals and check for clear skewness or other major departures from Normality.

Equal SD: The standard deviation of y (call it σ) is the same for all values of x.

Look at the scatter of the residuals above and below the “residual = 0” line in the residual plot. The vertical spread of the residuals should be roughly the same from the smallest to the largest x-value.

2

Page 3: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About RegressionRandom: The data come from a well-designed random sample or randomized experiment.

See if the data were produced by random sampling or a randomized experiment.

Example: Mrs. Barrett’s class did an experiment involving paper helicopters. Students randomly assigned 14 helicopters to each of five drop heights: 152 centimeters (cm), 203 cm, 254 cm, 307 cm, and 442 cm. Teams of students released the 70 helicopters in a predetermined random order and measured the flight times in seconds. The class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability plot of the residuals are shown below. Check to see if conditions are met.

3

Page 4: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Homework: pg. 759 # 1, 2, 34

Page 5: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression12.1: Confidence Interval for the Slope

Estimating Parameters:What are the three parameters in a regression model? What statistics do we use to estimate them?

The 3 parameters in our regression model: The 3 statistics we use to estimate the parameters:β, the slope b, the slope from our dataα , the y intercept a, the y-intercept from our dataσ , the standard deviation describing spread around the population (true) regression line

s, the standard deviation of the residuals

When the conditions are met, we can do inference about the regression model µy = α+ βx. The first step is to estimate the unknown parameters.

If we calculate the least-squares regression line, the slope b is an unbiased estimator of the population slope β, and the y-intercept a is an unbiased estimator of the population y-intercept α.

The remaining parameter is the standard deviation σ, which describes the variability of the response y about the population regression line.

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=√∑ residuals2

n−2=√∑ ( y i− yi )

2

n−2

The standard deviation of the slope, σ b, is the typical difference between slopes of sample regression lines and the slope of the population regression line.

In practice, we don’t know σ for the population regression line. So we estimate it with the standard deviation of the residuals, s. Then we estimate the spread of the sampling distribution of b with the standard error of the slope. The standard error of the slope, SEb, is our estimate of the typical difference between slopes of sample regression lines and the slope of the population regression line.

5

Page 6: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Predictor Coef SE Coef T PConstant 88.801 7.77 11.429 <0.00001Days_absent -0.7099 0.1597 -4.445 0.000007

S = 7.4343 R-Sq = 8.91%

Chapter 12: More About Regression

Example: Does better attendance cause higher achievement, or do better students simply tend to also have good attendance? We can’t do an experiment and randomly assign some students to attend more than others, so we have to rely on observational studies. Let’s focus just on AP Stats students. These data come from 204 AP Stats students over a 2-year time period. The explanatory variable is days absent and the response variable is average grade.

a) The model for regression inference has three parameters: ∝ , β ,∧σ . Explain what each parameter represents in context. Then provide an estimate for each.

b) Give the standard error of the slope, SEb. Interpret this value in context.

6

Page 7: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regressiont-Interval for the Slope

When the conditions for regression inference are met, a level C confidence interval for the slope β of the population (true) regression line is

where t* is the critical value for the t distribution with df = n - 2 having area C between -t* and t*.

Calculator: STAT→TESTSG: LinRegTInt XList: List of explanatory variable YList: List of response variable Freq: 1 C-Level: Confidence level (as a decimal) RegEq: Leave this blank

Example: For his science fair project, John decided to investigate the effect of sugar on the volume of bread. He knew that yeast consumes sugar, producing carbon dioxide, but also had read that too much sugar in a recipe could inhibit yeast growth. He used the same recipe and the same oven to make 12 loaves of bread, but varied the amount of sugar. Here are the data and computer output.

Predictor Coef SE Coef T __P___ Constant 1269.9184 65.15795 19.4898 0.00000Sugar (g) -1.844 0.2286 -8.0672 0.00001

s = 138.5748 R-Sq = 86.7% R-Sq(adj) = 85.3%

Construct and interpret a 99% confidence interval for the slope of the true regression line. Assume conditions for inference are met.

7

Sugar

(g)

Volume(cm3)

50 129650 118850 1296

100 1188100 1080100 1080250 672250 576250 588500 432500 504500 360

Page 8: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Homework: pg. 760-761 #5-11 odd

8

Page 9: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression12.1: Significance Test for the Slope

t Test for the Slope Suppose the conditions for inference are met. To test the hypothesis H0 : β = hypothesized value, compute the test statistic

Find the P-value by calculating the probability of getting a t statistic this large or larger in the direction specified by the alternative hypothesis Ha. Use the t distribution with df = n - 2.

Calculator: F: LinRegTTest XList: List of explanatory variable YList: List of response variable Freq: 1 β : (≠, <, or > 0) RegEq: Leave this blank

Example: Infants who cry easily may be more easily stimulated than others. This may be a sign of higher IQ. Child development researchers explored the relationship between the crying of infants 4 to 10 days old and their later IQ test scores. The researchers recorded crying and measured its intensity by the number of peaks in the most active 20 seconds. They later measured the children’s IQ at age three years using the Stanford-Binet IQ test. A

scatterplot and Minitab output for the data from a random sample of 38 infants is below. Do these data provide convincing evidence that there is a positive linear relationship between crying counts and IQ in the population of infants? Assume conditions have been met. Use ∝=0.05 .

9

Page 10: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Example: For his science fair project, John decided to investigate the effect of sugar on the volume of bread. He knew that yeast consumes sugar, producing carbon dioxide, but also had read that too much sugar in a recipe could inhibit yeast growth. He used the same recipe and the same oven to make 12 loaves of bread, but varied the amount of sugar. He randomly assigned each batch to a different amount of sugar. Do these data provide convincing evidence that there is a linear relationship between sugar and volume of bread? Use ∝=0.05 .

10

Sugar

(g)

Volume(cm3)

50 129650 118850 1296

100 1188100 1080100 1080250 850250 820250 900500 432500 300500 360

Page 11: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

11

Page 12: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Homework: pg. 761-764 #13, 15, 17, 19-24

12

Page 13: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression12.2: Transforming to Achieve Linearity

Learning Objectives-Use transformations involving powers and roots to find a power model that describes the relationship between two variables, and use the model to make predictions.-Use transformations involving logarithms to find a power model or an exponential model that describes the relationship between two variables, and use the model to make predictions.-Determine which of several transformations does a better job of producing a linear relationship.

In Chapter 3, we learned how to analyze relationships between two quantitative variables that showed a linear pattern. When two-variable data show a curved relationship, we must develop new techniques for finding an appropriate model. This section describes several simple transformations of data that can straighten a nonlinear pattern.

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.

Example: Imagine that you have been put in charge of organizing a fishing tournament in which prizes will be given for the heaviest Atlantic Ocean rockfish caught. You know that many of the fish caught during the tournament will be measured and released. You are also aware that using delicate scales to try to weigh a fish that is flopping around in a moving boat will probably not yield very accurate results. It would be much easier to measure the length of the fish while on the boat.

What can we do the explanatory or response variable in order to achieve linearity?

Because length is one-dimensional and weight (like volume) is three-dimensional, a power model of the form weight = a (length)3 should describe the relationship. This transformation of the explanatory variable helps us produce a graph that is quite linear.

13

Page 14: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Another way to transform the data to achieve linearity is to take the cube root of the weight values and graph the cube root of weight versus length. Note that the resulting scatterplot also has a linear form. Once we straighten out the curved pattern in the original scatterplot, we fit a least-squares line to the transformed data.

Transforming with Powers and RootsWhen experience or theory suggests that the relationship between two variables is described by a power model of the form y = axp, you now have two strategies for transforming the data to achieve linearity.

Homework: pg. 785-786 #31, 33, 34

14

Page 15: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

12.2 Transformations to Achieve Linearity—Power Models

Power ModelA power model has the form

Example: On July 31, 2005, a team of astronomers announced that they had discovered what appeared to be a new planet in our solar system. They had first observed this object almost two years earlier using a telescope at Caltech’s Palomar Observatory in California. Originally named UB313, the potential planet is bigger than Pluto and has an average distance of about 9.5 billion miles from the sun. (For reference, Earth is about 93 million miles from the sun.) Could this new astronomical body, now called Eris, be a new planet? At the time of the discovery, there were nine known planets in our solar system.

Here are data on the distance from the sun and period of revolution of those planets. Note that distance is measured in astronomical units (AU), the number of earth distances the object is from the sun.

The graphs below show the results of two different transformations of the data.(a) Explain why a power model would provide a more appropriate description of the relationship between period of revolution and distance from the sun than an exponential model.

15

Page 16: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

(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 period of revolution for Eris, which is 9,500,000,000/93,000,000 = 102.15 AU from the sun. Show your work.

(d) A residual plot for the linear regression in part (b) is shown below. Do you expect your prediction in part (c) to be too high, too low, or just right? Justify your answer.

16

Page 17: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

12.2 Transformations to Achieve Linearity—Exponential Models

Exponential ModelAn exponential model has the form

Example: Gordon Moore, one of the founders of Intel Corporation, predicted in 1965 that the number of transistors on an integrated circuit chip would double every 18 months. This is Moore’s law, one way to measure the revolution in computing. Here are data on the dates and number of transistors for Intel microprocessors:

The figure below shows the growth in the number of transistors on a computer chip from 1971 to 2010. Notice that we used “years since 1970” as the explanatory variable. If Moore’s law is correct, then an exponential model should describe the relationship between the variables.

(a) A scatterplot of the natural logarithm (log base e or ln) of the number of transistors on a computer chip versus years since 1970 is shown. Based on this graph, explain why it would be reasonable to use an exponential model to describe the relationship between number of transistors and years since 1970.

17

Page 18: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression(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 chip in 2020. Show your work.

Which Transformation Should We Use?Students in a physics class collected the following data on pressure and volume in order to investigate the relationship called Boyle’s Law.

(a) Use transformations to linearize the relationship. Does the relationship between pressure and volume seem to follow an exponential model or a power model? Justify your answer.

18

Volume (cubic centimeters) Pressure (atmospheres)6 2.95898 2.4073

10 1.990512 1.724914 1.528816 1.349018 1.222320 1.1201

Page 19: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression(b) Perform least-squares regression on the transformed data. Give the equation of your regression line and define any variables you use.

(c) Use your model from part (b) to predict the pressure if the volume is 15 cubic centimeters.

Homework: pg. 787-792 #35-45 odd, 47-49

19

Page 20: mrsvenneman.weebly.com · Web viewThe class used Minitab to carry out a least-squares regression analysis for these data. A scatterplot, residual plot, histogram, and Normal probability

Chapter 12: More About Regression

Chapter 12 Learning Objectives SectionRelated

Exampleon Page(s)

RelevantChapter Review

Exercise(s)

Can I do this?

Check the conditions for performing inference about the slope of the population (true) regression line.

12.1 745 R12.2, R12.3, R12.4

Interpret the values of a, b, s, and in context, and determine these values from computer output.

12.1 748, 754 R12.1

Construct and interpret a confidence interval for the slope of the population (true) regression line.

12.1 749 R12.3

Perform a significance test about the slope of the population (true) regression line.

12.1 754 R12.2

Use transformations involving powers and roots to find a power model that describes the relationship between two variables, and use the model to make predictions.

12.2 768, 770 R12.5

Use transformations involving logarithms to find a power model or an exponential model that describes the relationship between two variables, and use the model to make predictions.

12.2 772, 773, 776 R12.6

Determine which of several transformations does a better job of producing a linear relationship. 12.2 779 R12.6

Plan of Action:

20