1 / 102

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.

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 (x, log y) (x, y)

  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: In Lists!

  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. Find r and describe its meaning r = 0.968 D: Positive S: Strong

  19. 4. Graph and comment on the residual plot for x and y. Curve, not a good linear model

  20. 5. Take the log of the y-values and make a new scatterplot. D: Positive D: Positive F: Nonlinear F: Linear S: Strong S: Strong

  21. 6. Find the least squares regression line of the transformed data. Log(Population) = 2.27095 + 0.0156432(Year)

  22. 3. Find r and describe its meaning 7. Find the value of r and describe its meaning. r = 0.999999 r = 0.968 D: Positive D: Positive S: Strong S: Strong

  23. 8. Construct the residual plot and describe its meaning. 4. Graph and comment on the residual plot for x and y. No pattern, so good linear model Curve, not a good linear model

  24. 9. 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

  25. 10. Check your work on your calculator using ExpReg.

  26. 11. Make a prediction for the population in 2010 using both equations. log y = 2.27095 + 0.0156432(110) y = 186.6162  1.0367x log y = 3.991697 y = 186.6162  1.0367(110) 10 10 y = 9810.6342 y = 9,810.6342

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

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

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

  30. 3. Find r and describe its meaning r = 0.9481 D: Positive S: Strong

  31. 4. Graph and comment on the residual plot for x and y. Curved, not good linear model

  32. 5. Take the natural log of the y-values and make a new scatterplot. D: Positive D: Positive F: Nonlinear F: Linear S: Strong S: Strong

  33. 6. Find the least squares regression line of the transformed data. ln(Account Balance) = 4.60516 + 0.00995047(Months)

  34. 7. Find r and describe its meaning. 3. Find r and describe its meaning r = 0.999999 r = 0.9481 D: Positive D: Positive S: Strong S: Strong

  35. 8. Construct the residual plot and describe its meaning. 4. Graph and comment on the residual plot for x and y. No pattern, so good linear model Curved, not good linear model

  36. 9. 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

  37. 10. Check your work on your calculator using ExpReg.

  38. 11. Make a prediction for the account balance in 60 months using both equations. y = 99.9988  1.01x ln y = 4.60516 + 0.00995047(60) y = 99.9988  1.01(60) ln y = 5.20218656728 e e y = $181.67 y = $181.67

  39. 4.1 – Transforming to Achieve Linearity – Power Model

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

  41. Example #6 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

  42. Example #7 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

  43. Example #8 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

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

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

  46. Example #9 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.

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

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

  49. 3. Find r and describe its meaning r = 0.9779 D: Positive S: Strong

  50. 4. Graph an exponential model and discuss if it is appropriate to use this model. Curved, not good linear model

More Related