18
Chapter 10: Re- Expressing Data: Get it Straight AP Statistics

Chapter 10: Re-Expressing Data: Get it Straight

Embed Size (px)

DESCRIPTION

Chapter 10: Re-Expressing Data: Get it Straight. AP Statistics. Weight vs. Fuel Efficieny. Describe the relationship. How accurate is the model? The R-squared value is 81.6% Is the model appropriate for the data? Look at residual plot. Residual Plot. - PowerPoint PPT Presentation

Citation preview

Page 1: Chapter 10:  Re-Expressing Data:  Get it Straight

Chapter 10: Re-Expressing Data: Get it Straight

AP Statistics

Page 2: Chapter 10:  Re-Expressing Data:  Get it Straight

Weight vs. Fuel EfficienyDescribe the relationship.

How accurate is the model? The R-squared value is 81.6%

Is the model appropriate for the data? Look at residual plot.

Page 3: Chapter 10:  Re-Expressing Data:  Get it Straight

Residual Plot Is the model appropriate for the data?

Look at the pattern in the residual plot. This shows that a linear model is not appropriate!!

Page 4: Chapter 10:  Re-Expressing Data:  Get it Straight

What if linear model is not appropriate?

We need to re-express it so that it is “linear”. Then we can proceed like normal—with R-squared and prediction (and more).

In this situation, we will take the reciprocal of the fuel efficiency (so, instead of mpg it will be gallons per mile [1/y])

Page 5: Chapter 10:  Re-Expressing Data:  Get it Straight

Re-expressed data, with residual

Note: Our residual plot is of transformed variable

Page 6: Chapter 10:  Re-Expressing Data:  Get it Straight

Why re-express?

• There will be many reasons, but in this example, suppose you want to predict the gas mileage of a Hummer (about 6400 pounds). If we use the non-re-expressed data, it would say that the gas mileage would be about 0. In the re-expressed data, it would say about 10.3 mpg (after “undoing” the re-expression).

Page 7: Chapter 10:  Re-Expressing Data:  Get it Straight

Why Not Just a Curve?

• Straight lines are easy to understand.• We understand and can interpret the slope

and y-intercept• We may want some of the other benefits from

re-expressing data, such as symmetry or more equal spreads

• Is very important when we learn about Inferences for Regression

Page 8: Chapter 10:  Re-Expressing Data:  Get it Straight

Why do we Re-Express?

1. Make the distribution symmetric. It is easier to summarize the data (esp. the center) and it also makes it possible to use mean and standard deviation, which allows us to use a normal curve to predict.

Page 9: Chapter 10:  Re-Expressing Data:  Get it Straight

Why do we Re-Express?

2. Make the spread of several groups more alike. Groups that share a common spread are easier to compare. Only can be used in SD that are common.

Page 10: Chapter 10:  Re-Expressing Data:  Get it Straight

Why do we Re-Express?

3. Make form of Scatterplot more nearly linear. This allows us to describe the relationhip easier—allows us to use a linear model and all that goes with it.

4. Make scatter in scatterplot spread out evenly, rather than following a fan shape. This will be a requirement later on in course—related to #2

Page 11: Chapter 10:  Re-Expressing Data:  Get it Straight

Example

Look at shape of distribution. What re-expression should we use?

Page 12: Chapter 10:  Re-Expressing Data:  Get it Straight

Type of Model

Model Equation

Transformation Re-Expression Equation

Exponential

Logarithmic

Power

yx

yx

log,

,

yx

yx

,log

,

yx

yx

log,log

,

xaby ˆ

xba

y

ln

ˆ

baxy ˆ

bxa

y

ˆlog

xba

y

log

ˆ

xba

y

log

ˆlog

Page 13: Chapter 10:  Re-Expressing Data:  Get it Straight

Logarithmic Function

Exponential Function

Power Function

Page 14: Chapter 10:  Re-Expressing Data:  Get it Straight

Example

Page 15: Chapter 10:  Re-Expressing Data:  Get it Straight

ExamplePredict the length of a flight in which the plane is traveling 480 mph.

Page 16: Chapter 10:  Re-Expressing Data:  Get it Straight

Other hints to finding proper re-expression

Logarithms can be very useful in re-expressing data to achieve linearity. However, the data needs to have values greater than zero.

When you look at the scatterplot, you may recognize a pattern from prior courses.

The “chart” will help determine which re-expression to use when you recognize the graph

Page 17: Chapter 10:  Re-Expressing Data:  Get it Straight

Be Careful• Don’t expect the re-expressed model to be perfect• Don’t choose a model based on R-squared value alone—look at

residual plot!!!• Multiple modes will not disappear when re-expressed• Don’t try to re-express data that is like a rollercoaster• If negative data values—add a small value to make the data greater

than zero, the re-express (can’t take log of zero or negative number)• If data values are far from one, the re-expression will have a smaller

effect than if the data values are closer to one—subtract a constant to get closer to one—if years, use years away from a constant. Instead of 1950, use idea of “years since 1949, and use 1.

• SIMPLICITY!!!!!

Page 18: Chapter 10:  Re-Expressing Data:  Get it Straight

The data below shows the results of an experiment that was attempting to find the relationship between the about of time a cup of coffee is left out and the temperature of that cup of coffee. The results are shown below.

a. Create a scatterplot of the data and describe the relationship.

b. Create an appropriate model for this data. Check it’s appropriateness.

c. How accurately is the model in predicting the temperature of the cup of coffee? Give evidence.

d. Predict the temperature of a cup of coffee that has been sitting out for 35 minutes. Show your work.

e. Did the model underestimate or overestimate the temperature of a cup of coffee that has been sitting out for 30 min? Show all work.

Time (min)

Temp (F)

19 133

22 122

24 111

27 104

30 102

33.5 97

37 95