18
AP Stats ~ Lesson 12B: Transforming to Achieve Linearity OBJECTIVES: 9USE transformations involving powers and roots to FIND a power model that describes the relationship between two variables, and USE the model to make predictions. 9USE 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. 9DETERMINE which of several transformations does a better job of producing a linear relationship.

AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

AP Stats ~ Lesson 12B: Transforming to Achieve Linearity OBJECTIVES: 9USE transformations involving powers and roots to FIND a power model that describes the relationship between two variables, and USE the model to make predictions. 9USE 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. 9DETERMINE which of several transformations does a better job of producing a linear relationship.

Page 2: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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.

Page 3: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

Transforming with Powers and Roots

When you visit a pizza parlor, you order a pizza by its diameter—say, 10 inches, 12 inches, or 14 inches. But the amount you get to eat depends on the area of the pizza. The area of a circle is π times the square of its radius r. So the area of a round pizza with diameter x is

area = x2

÷

2

= x 2

4

÷ =

4x2

This is a power model of the form y = axp with a = π/4 and p = 2.

Although a power model of the form y = axp describes the relationship between x and y in this setting, there is also a linear relationship between xp and y.

Page 4: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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

Page 5: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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.

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.

Page 6: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

When 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. 1. Raise the values of the explanatory variable x to the p power

and plot the points

2. Take the pth root of the values of the response variable y and plot the points

What if you aren’t sure what the power is? Instead of guessing and checking a bunch of options, we can use a more effective method that uses logarithms rather than powers and roots.

(x p ,y).

(x, yp ).

Page 7: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

To achieve linearity from a power model, we apply the logarithm transformation to both variables. Here are the details:

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, we get

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.

If a power model describes the relationship between two variables, a scatterplot of the logarithms of both variables should produce a linear pattern. Then we can fit a least-squares regression line to the transformed data and use the linear model to make predictions.

Page 8: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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.

Page 9: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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. Let’s graph the data.

Page 10: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

a) Transform your data: Put ln(List 1) (List 3), and ln(List 2) (List 4)

b) Graph the scatterplot of List 3, and List 4. What does your data look like? Is it linear, or close to linear?

c) Find the least squares regression line for List 3, List 4, and write the equation. Be sure to define any variables you use.

d) Use your model from part (c) 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.

glen lnt

linear .

thy = . 00025+1.499 lnx

y=

predictedperiod of rotation

,X=#ofAu 's from the sun

.

thy =.

00025+1.499 ln ( 102.15 )ay= 6.935

tranagnteromy . j=e6" "

lnx=a a

f=m7€)so he

Page 11: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

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

go.¥¥*t¥¥*.org?gioeefHEaeHFn./ewsitimeaFw/

µneni±'

me6 7

Page 12: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

Sometimes the relationship between y and x is based on repeated multiplication by a constant factor. That is, each time x increases by 1 unit, the value of y is multiplied by b.

An exponential model of the form y = abx describes such multiplicative growth.

y = abx

log y = log(abx )log y = loga+ log(bx )log y = loga+ x logb

The crucial property of the logarithm for our purposes is that if a variable grows exponentially, its logarithm grows linearly.

Page 13: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

Example: A student opened a bag of M&M’S, dumped them out, and ate all the ones with the M on top. When he finished, he put the remaining 30 M&M’S back in the bag and repeated the same process over and over until all the M&M’s were gone. Here are a table and scatterplot showing the number of M&M’S remaining at the end of each “course.”

Take the log of your lists and store them in lists 3 and 4. (You will have to delete the point (7,0).) Look at the scatterplots for L1 and L4, then at L3 and L4. Which looks more linear? If you find the LinReg equations, which gives the better r2 value?

The one with 4 (H and Lylloyy) .

Page 14: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

Below is the Minitab output from a linear regression analysis of the transformed data. Give the equation of the least-squares regression line. Be sure to define any variables. Use your model to predict the original number of M&Ms in the bag.

←remaining ) = 4.0593 - 0.68073 ( course )

# numberWill be 0=

.( remaining ) = 4.0593 - 0.68073 ( o )

lnreieammaiinditnj!YYosa3=s⇒ MoYkI%ED

Page 15: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

Example: How is the braking distance for a motorcycle related to the speed the motorcycle was going when the brake was applied? Statistics teacher Aaron Waggoner gathered data to answer this question. The table and scatterplot below shows the speed (in miles per hour, or mph) and the distance (in feet) needed to come to a complete stop when the brake was applied.

Page 16: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

The graphs below show the results of two different transformations of the data. The first graph plots the logarithm of the distance against speed and the second graph plots the logarithm of distance against the logarithm of speed.

logSpeed

logDistance

1.71.61.51.41.31.21.11.00.90.8

2.0

1.5

1.0

0.5

0.0

(a) Explain why a power model would provide a more appropriate description of the relationship between braking distance and speed than an exponential model.

x { logy 1 exponential) logx ; logy ( power )

The powermodel shows a more Linear relationship .

Page 17: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

(b) Minitab output from a linear regression analysis on the second set of 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 braking distance if the motorcycle was going 55 miles per hour. Show your work.

logfbrakindistance) = - 1.35063+2.03610 ( log ( speed ) )

log ( braking distance) [- 1.35063+2.03610 log ( Ss )

2.1929

braking distance =

102*29=155.93-4

Page 18: AP Stats ~ Lesson 12B: Transforming to Achieve Linearity …€¦ · of the relationship between braking distance and speed than an exponential model. x {logy 1exponential) logx;

(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.

There doesn't appear to be

a Leftover pattern to the

residuals ,so our prediction

will probably be just about

right .