1 / 99

Chapter 4: More about Relationships Between Two Variables

Chapter 4: More about Relationships Between Two Variables. 4.1 – Transforming to Achieve Linearity Exponential Growth. Not all data can be expressed with a linear model.

lyris
Download Presentation

Chapter 4: More about Relationships Between Two Variables

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Chapter 4: More about Relationships Between Two Variables

  2. 4.1 – Transforming to Achieve Linearity Exponential Growth

  3. Not all data can be expressed with a linear model.

  4. PROBLEM! We cannot use least-squares regression for nonlinear data because least-squares regression depends upon correlation, which only measures the strength of linear relationships. SOLUTION! Transform the data into a linear set, then use the least-squares regression to determine the best fitting line for the transformed data. Finally, do a reverse transformation equation which will model our original nonlinear data.

  5. Properties of Logarithms 1. log ab = log a + log b a b 2. log = log a – log b 3. log xp = p log x Remember: log has a base of 10 and natural logs (ln) have a base of e. It doesn’t matter which one you use.

  6. Linearizing Exponential Functions: We want to write an exponential function of the form y = abx as a linear model. (where x, y are variables and a,b are constants) y = abx log y = log (abx) log y = log a + log bx log y = log a + xlog b

  7. CONCLUSIONS: 1. If the graph of (x, y) is exponential, then the graph of (x, log y) is linear. 2. If the graph of (x, log y) is linear, then the graph of (x, y) is exponential.

  8. Example #1 Transform the exponential data to a linear model using logs and then natural logs. y = 5(2)x ln y = ln (5  2x) log y = log (5  2x) ln y = ln 5 + log 2x log y = log 5 + log 2x ln y = ln 5+ xln 2 log y = log 5+ xlog 2 ln y = 1.6094+ 0.6931x log y = 0.69897+ 0.3010x

  9. Example #2 Convert the equation back to an exponential function. ln y = 16 + 9x e e y = e(16 + 9x) y = e(16) e(9x) y = e(16) e(9)x y = 8,886,110.521  8103.0839x

  10. Example #3 Convert the equation back to an exponential function. log y = 4 + 2x 10 10 y = 10(4 + 2x) y = 10(4) 10(2x) y = 10(4) 10(2)x y = 10,000  100x

  11. Calculator Tip: Exponential Functions L1: x L2: y L3: leave blank for now! L4: log y LinReg(L1, L4, Y1) - (x, log y, Y1) To prevent Overload error: convert years to a smaller number

  12. Calculator Tip: Residual Plot After calculating the line of regression: L5: Y1(L1) (predicted y’s) L6: L4 – L5 (residuals) Scatterplot of L1 and L6

  13. Calculator Tip: Exponential Equation ExpReg(L1, L2, Y2) - (x, y, Y2)

  14. Exponential to Linear Change: 1. The ratio of the y’s should be fairly constant 2. Graph x and y and look at the pattern 3. Calculate the transformed linear model 4. Describe the r value and the residual plot

  15. Example#4: Consider the following data representing the population for Asian and Pacific Islander. 1. Make a scatterplot of the data and describe the graph.

  16. D: Positive, as year increases, population increases F: Nonlinear S: Strong

  17. 2. Describe the pattern of change and find the percent of change for each y (ratio of y’s). The ratios of the y’s are fairly consistent, suggesting an exponential model

  18. 3. Take the log of the y-values and make a new scatterplot.

  19. 4. Find the least squares regression line of the transformed data. log y = 2.27095 + 0.0156432x OR Log(Population) = 2.27095 + 0.0156432(Year)

  20. 5. Find the value of r and describe its meaning. r = 0.999999 D: Positive S: Strong

  21. 6. Construct the residual plot and describe its meaning. No pattern, so good linear model

  22. 7. Perform the inverse transformation to express y-hat as an exponential equation. 10 10 y = 10(2.27095 + 0.0156432x) y = 10(2.27095) 10(0.0156432x) y = 10(2.27095) 10(0.0156432)x y = 186.6162  1.0367x

  23. 8. Check your work on your calculator using ExpReg.

  24. 9. Make a prediction for the population in 2010 using your linear equation. log y = 2.27095 + 0.0156432(110) log y = 3.991697 10 10 y = 9810.6342

  25. 10. Make a prediction for the population in 2010 using your exponential equation. y = 186.6162  1.0367x y = 186.6162  1.0367(110) y = 9,810.6342

  26. Example#4: Consider the following data representing an account balance over time: 1. Make a scatterplot of the data and describe the graph.

  27. D: Positive, as time increases, account balance increases F: Nonlinear S: Strong

  28. 2. Describe the pattern of change and find the percent of change for each y (ratio of y’s).

  29. 3. Take the natural log of the y-values and make a new scatterplot.

  30. 4. Find the least squares regression line of the transformed data. ln y = 4.60516 + 0.00995047x OR ln(Account Balance) = 4.60516 + 0.00995047(Months)

  31. 5. Find the value of r and describe its meaning. r = 0.999999 D: Positive S: Strong

  32. 6. Construct the residual plot and describe its meaning. No pattern, so good linear model

  33. 7. Perform the inverse transformation to express y-hat as an exponential equation. e e y = e(4.60516 + 0.00995047x) y = e(4.60516) e(0.00995047x) y = e(4.60516) e(0.00995047)x y = 99.9988  1.01x

  34. 8. Check your work on your calculator using ExpReg.

  35. 9. Make a prediction for the account balance in 60 months using your linear equation. ln y = 4.60516 + 0.00995047(60) ln y = 5.20218656728 e e y = $181.67

  36. 10. Make a prediction for the account balance in 60 months using your exponential equation. y = 99.9988  1.01x y = 99.9988  1.01(60) y = $181.67

  37. 4.1 – Transforming to Achieve Linearity – Power Model

  38. A power model is in the form y = axp. To transform this equation into a linear model you must apply the log transformation to both variables x and y. y = axp log y = log (axp) log y = log a + log xp log y = log a + plog x How is this different than exponential functions? You have to take the log of both x and y to make a linear model.

  39. Example #1 Find the LSRL by taking the logs and then the natural logs. y = 4x5 y = 4x5 log y = log (4x5) ln y = ln (4x5) log y = log 4 + log x5 ln y = ln 4 + ln x5 log y = log 4 + 5log x ln y = ln 4 + 5ln x log y = 0.6021 + 5log x ln y = 1.3863 + 5ln x

  40. Example #2 Convert the equation back to a power equation. ln y = -5 + 9ln x e e y = e(-5 + 9lnx) y = e(-5) e(9lnx) y = e(-5) e(lnx)9 y = 0.0067x9

  41. Example #2 Convert the equation back to a power equation. log y = 0.5 + 2log x 10 10 y = 10(0.5 + 2logx) y = 10(0.5) 10(2logx) y = 10(0.5) 10(logx)2 y = 3.1623x2

  42. Calculator Tip: Power Functions L1: x L2: y L3: log x L4: log y LinReg(L3, L4, Y1) - (log x, log y, Y1)

  43. Calculator Tip: Residual Plot After calculating the line of regression: L5: Y1(L3) (predicted y’s) L6: L4 – L5 (residuals) Scatterplot of L3 and L6

  44. Calculator Tip: Power Equation PwrReg(L1, L2, Y2) - (x, y, Y2)

  45. Example#4 The distances from our sun and the periods of the 9 planets in the solar system are given below. 1. Make a scatterplot of the data and describe the graph.

  46. D: Positive, as distance increases, period increases F: Nonlinear S: Strong

  47. 2. Describe the pattern of change and find the percent of change for each y (ratio of y’s). Ratio of y’s are not similar, perhaps not exponential

  48. 3. Transform the data to a linear model by taking the log of the x’s and the y’s. Make a sketch of the new scatterplot.

  49. 4. Find the least squares regression line of the transformed data. log y = 0.002916 + 1.49627x OR log(Period) = 0.002916 + 1.49627(Distance)

  50. 5. Find the value of r and describe its meaning. r = 0.9999765 D: Positive S: Strong

More Related