AP STATISTICS Section 4.1 Transforming to Achieve Linearity Objective: To be able to use least squares regression line techniques to develop a model for non-linear data. Goals: 1. When working with non-linear data we want to apply a function to one or both variables in order to “straighten” the data. 2. Next, we will use LSRL techniques to develop a model for the “transformed” data. 3. Last, use the inverse function to develop a model for the original relationship. Review logarithms: (Think exponents) 1. Definition: ππππ π₯ = π if and only if π π = π₯ Ex. 2. πππ π΄π΅ = log π΄ + log π΅ 3. πππ π΄/π΅ = log π΄ − log π΅ 4. πππ π΄π = π log π΄ 5. Inverse function: 10πππ10 π = π Base 10: log10 π₯ or log x Base e: πππ₯ Linear growth: (π¦ = π + ππ₯) As x increases in fixed increments, we add a constant to the y values. Exponential growth: π¦ = ππ π₯ As x increases in fixed increments, we multiply the y-values by a constant. If b > 1 then we have exponential growth. If 0 < b < 1 then we have exponential decay. Outline for Creating a Model for Exponential Data: π¦ = ππ π₯ 1. Plot the data 2. If you think it may be linear, try linear regression methods and create a residual plot. If it is not linear, you will see a curve in the residual plot. 3. Examine common ratios. πΆπ = π¦π . π¦π−1 We can only compare CRs over fixed increments of x. If exponential, then all the CR’s should be approximately the same. Calculate the average common ratio. 4. Calculate log π¦ 5. Plot log π¦ vs. x. If this is a successful transformation, then the scatterplot should appear straight. 6. Use LSRL techniques to develop a model for log π¦ = π + ππ₯ 7. Check the residual plot for the transformed model. 8. Use the inverse function to develop a model for the original data. Ex. Create a model for the NCAA March Madness Tournament that plots the number of teams versus the round of the tournament. Data set: Outline for Creating a Model for Power Data: π¦ = ππ₯ π 1. Plot the data. 2. Calculate log π₯ and log π¦ 3. Plot log π¦ vs. log π₯ . If this is a successful transformation, then the scatterplot should appear straight. 4. Use LSRL techniques to develop a model for log π¦ = π + π log π₯ 5. Check the residual plot for the transformed model. 6. Use the inverse function to develop a model for the original data. • When checking the final model on your calculator be sure to change x to log π₯ to avoid any overflow errors. • A good indicator that a power model may be better than an exponential is that the x values cover a large range of values. Ex. Planetary data. Use a planet’s average distance from the sun to create a model to predict it’s year. A.U.: 0.39, 0.72, 1.00, 1.52, 5.20, 9.54, 19.19, 30.06, 39.53 Year: 0.24, 0.61, 1.00, 1.88, 11.86, 29.46, 84.07, 164.82, 247.68 Work: Ex. Use the number of days alive to predict the body weight of Mr. Reid’s dog. Days: 1, 51, 64, 85, 118 Weight: 0.625, 9.900, 12.750, 19.000, 35.700