Presentation is loading. Please wait.

Presentation is loading. Please wait.

M25- Growth & Transformations 1  Department of ISM, University of Alabama, 1992-2003 Lesson Objectives: Recognize exponential growth or decay. Use log(Y.

Similar presentations


Presentation on theme: "M25- Growth & Transformations 1  Department of ISM, University of Alabama, 1992-2003 Lesson Objectives: Recognize exponential growth or decay. Use log(Y."— Presentation transcript:

1 M25- Growth & Transformations 1  Department of ISM, University of Alabama, 1992-2003 Lesson Objectives: Recognize exponential growth or decay. Use log(Y ) to construct the prediction equation. Reverse the process to get predicted values from log(Y ) models back in terms of Y.

2 M25- Growth & Transformations 2  Department of ISM, University of Alabama, 1992-2003 L w t h n e a r g r o i E x p o n e n t i a l

3 M25- Growth & Transformations 3  Department of ISM, University of Alabama, 1992-2003 Stuff $100 in a mattress each month, then after X months you will have Y = 0 + 100 X dollars. This is linear growth; ZERO interest. X Y Example 1

4 M25- Growth & Transformations 4  Department of ISM, University of Alabama, 1992-2003 Stuff $1000 in a savings acct. that pays 10% interest each year, then after X years you will have Y = 1000 ( 1.10 ) dollars. X This is exponential growth. X Y Example 2

5 M25- Growth & Transformations 5  Department of ISM, University of Alabama, 1992-2003 Linear growth increases by a fixed amount in each time period; Exponential growth increases by a fixed percentage of the previous total.

6 M25- Growth & Transformations 6  Department of ISM, University of Alabama, 1992-2003 Y grows exponentially If Y grows exponentially as X increases, X Y log Y grows linearly then log Y grows linearly as X increases. X log Y

7 M25- Growth & Transformations 7  Department of ISM, University of Alabama, 1992-2003 Y log b X = Y Y b Y = X Properties of logarithms: 1. log base 1 = 0 2. log b XY = log b X + log b Y 3. log b X p = p log b X A logarithm is an exponent.

8 M25- Growth & Transformations 8  Department of ISM, University of Alabama, 1992-2003 log b X = Y Review of logarithms: b Y = X log 5 125 = 35 3 = 125 log 10 1000 = 3 10 3 = 1000 ln X = natural log, or log base “e” e = 2.7182818 ln 1000 = 6.907 e 6.907 = 1000

9 M25- Growth & Transformations 9  Department of ISM, University of Alabama, 1992-2003 Why do we care about logarithms?

10 Back to the matress. $1000. at 10% per year: ln Y = ln [1000 ( 1.10 ) X ] = ln [1000] + ln( 1.10 ) X = ln [1000] + X ln( 1.10 ) straight line = a + b X i.e., a straight line. Not linear equation! Y = 1000 ( 1.10 ) X This IS a linear equation!

11 X 0 4 8 12 Y 1 10 100 1000 500 1000 4 8 12 X-axis Y log 10 Y 4 8 12 X 3 2 1 log Y Example 3

12 M25- Growth & Transformations 12  Department of ISM, University of Alabama, 1992-2003 If X = 6, log 10 Y = 0 +.25  6 1.5 = 1.5 If log 10 Y = 1.5, Y = log 10 Y = 0 +.25 X 4 8 12 X 3 2 1 log Y Example 3

13 M25- Growth & Transformations 13  Department of ISM, University of Alabama, 1992-2003 If X = 10, log 10 Y = 0 +.25  10 = Y = 4 8 12 X 3 2 1 log Y Example 3

14 M25 Expon growth & Transforms 14  Department of ISM, University of Alabama, 1992-2003 Data Transformations

15 M25 Expon growth & Transforms 15  Department of ISM, University of Alabama, 1992-2003 Ex: Z-scores, inches to cm, o C to o F temperature The basic shape of the data distribution does not change. Linear transformations of Y and/or X  do not affect r.  do not change the pattern of the relationship.

16 M25 Expon growth & Transforms 16  Department of ISM, University of Alabama, 1992-2003  transform a skewed distribution into a symmetric distribution,  straighten a nonlinear relationship between two variables,  remove non-constant variance, Nonlinear transformations can be used to:

17 M25- Growth & Transformations 17  Department of ISM, University of Alabama, 1992-2003 Lesson Objectives:  Learn how to recognize when a straight line is NOT the best fit the pattern of the data.  Learn how to transform one or both of the variables to create a linear pattern.  Learn to use the transformed model to get estimates back in terms of the original Y variable.

18 M25 Expon growth & Transforms 18  Department of ISM, University of Alabama, 1992-2003 What do we do if the relationship between Y and X is not linear? Always scatterplot the data first! If the relationship is linear, then the model may produce reasonable estimates.

19 M25- Growth & Transformations 19  Department of ISM, University of Alabama, 1992-2003 “Curved lines” can be straightened out by changing the form of a variable: 1. Replace “X” with “square root of X” 2. Replace “X” with “log X” 3. Replace “X” with “1/X”, its inverse. Each step down this list increases the “change in the bend of the line.”

20 M25- Growth & Transformations 20  Department of ISM, University of Alabama, 1992-2003 “ New X ” = X p p = 1 p =.5 p = -1 p = # p = 2 Square root Inverse or reciprocal logarithm Changing the power, changes the bend: Each step down this list increases the “change in the bend of the line.”

21 M25- Growth & Transformations 21  Department of ISM, University of Alabama, 1992-2003 X ln X 1/X X ln X 1/X YY ln Y 1/Y Y ln Y 1/Y X Y Original pattern Y = a + b 1 X + b 2 X 2 Rules of Engagement Original pattern b 2 > 0 b 2 < 0 or

22 M25- Growth & Transformations 22  Department of ISM, University of Alabama, 1992-2003 Y = Federal expenditures on social insurance, in millions. X = Year X 1960 1965 1970 1975 1980 Y 14,307 21,807 45,246 99,715 191,162 a. plot b. fix data if necessary c. get prediction equation d. predict for 2000. Example 4

23 M25- Growth & Transformations 23  Department of ISM, University of Alabama, 1992-2003 40 80 120 160 200 ‘60 ‘65 ‘70 ‘75 ‘80 Example 4, continued

24 M25- Growth & Transformations 24  Department of ISM, University of Alabama, 1992-2003 X 1960 1965 1970 1975 1980 Y 14,307 21,807 45,246 99,715 191,162 log 10 Y 4.156 4.339 4.656 4.999 5.281 log 10 Y = Example 4, continued

25 M25- Growth & Transformations 25  Department of ISM, University of Alabama, 1992-2003 Y 40 80 120 160 200 ‘60 ‘65 ‘70 ‘75 ‘80 4.0 4.4 4.8 5.2 log Y Example 4, continued

26 M25- Growth & Transformations 26  Department of ISM, University of Alabama, 1992-2003 For 2000, log 10 Y = -110.04 +.05824 (2000) _____ = _______ log 10 Y = -110.04 +.05824 X 6.4400 Y = 10 6.4400 = This is an exponent.

27 M25- Growth & Transformations 27  Department of ISM, University of Alabama, 1992-2003 Example 4, in Minitab Graph Plot … Title Scatterplot

28 M25- Growth & Transformations 28  Department of ISM, University of Alabama, 1992-2003 Plot shows severe curve. Example 4, in Minitab Scatterplot

29 M25- Growth & Transformations 29  Department of ISM, University of Alabama, 1992-2003 Stat Regression Fitted Line Plot … Y = a + bX Example 4, in Minitab Regression

30 M25- Growth & Transformations 30  Department of ISM, University of Alabama, 1992-2003 Straight line does not fit the data very well. Future years will be severely underestimated! Same plot as before, with regression line overlayed. Example 4, in Minitab Regression

31 M25- Growth & Transformations 31  Department of ISM, University of Alabama, 1992-2003 Stat Regression Fitted Line Plot … log 10 Y = a + bX Example 4, in Minitab This box controls the “scale” of the plot.

32 M25- Growth & Transformations 32  Department of ISM, University of Alabama, 1992-2003 Result from equation must be “un-logged”: y = 10 log(Expend) Advantage: Can see the “new curved line” drawn through the original data. Disadvantage: Hard to tell if the fit is “good enough”. Advantage: Can see the “new curved line” drawn through the original data. Disadvantage: Hard to tell if the fit is “good enough”. Example 4, in Minitab “Logscale” box NOT checked: Axes are still Y and X, but curve is based on the “log Y”.

33 M25- Growth & Transformations 33  Department of ISM, University of Alabama, 1992-2003 Stat Regression Fitted Line Plot … log 10 Y = a + bX Example 4, in Minitab The box IS checked.

34 M25- Growth & Transformations 34  Department of ISM, University of Alabama, 1992-2003 10,000 50,000 Advantage: Easier to see that the curve has been straightened. Disadvantage: Harder to read the scale. Advantage: Easier to see that the curve has been straightened. Disadvantage: Harder to read the scale. Results must be “un-logged”: y = 10 log(Expend) Example 4, in Minitab “Logscale” box IS checked: Axes are “log Y” and X, but values on the “log Y” scale are “un-logged.” 5.2 4.8 4.6 4.4 4.2 4.0 Log scale Un-Logged Y scale

35 M24 Std Error & r-square 35  Department of ISM, University of Alabama, 1992-2003 How helpful is “engine size” for estimating “mpg”? Example 5 Continued....

36 M24 Std Error & r-square 36  Department of ISM, University of Alabama, 1992-2003 Analysis Diary Step Y X s r-sqr Comments 1 mpg displace 2.880 54.6% Slope of “displacement” in not zero; but plot indicates a curved pattern. Transform a variable and re-run. Example 5“mpg_city” versus engine “displacement” 2 to be done in next section. Recall

37 M24 Std Error & r-square 37  Department of ISM, University of Alabama, 1992-2003 How helpful is engine size for estimating mpg? Regression Analysis The regression equation is mpg_city = 29.3 - 0.0480 displace 113 cases used 4 cases contain missing values Predictor Coef StDev T P Constant 29.2651 0.7076 41.36 0.000 displace 0.047967 0.004154 -11.55 0.000 S = 2.880 R-Sq = 54.6% R-Sq(adj) = 54.2% Analysis of Variance Source DF SS MS F P Regression 1 1106.1 1106.1 133.33 0.000 Error 111 920.8 8.3 Total 112 2026.9 displacement in cubic in. mpg_city in ??? Data in Car89 Data P-value: a measure of the likelihood that the true coefficient is “zero.” Example 5

38 M24 Std Error & r-square 38  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement S = 2.88 Is this a good fit? The data pattern appears curved; we can do better! Example 5 Step 1 Y = a + bX

39 X ln X 1/X X ln X 1/X YY ln Y 1/Y Y ln Y 1/Y X Y Original pattern Y = a + b 1 X + b 2 X 2 Rules of Engagement Original pattern b 2 > 0 b 2 < 0 or

40 M24 Std Error & r-square 40  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Step 2 log Y X log 10 Y = a + bX “Logscale” box IS checked:

41 M24 Std Error & r-square 41  Department of ISM, University of Alabama, 1992-2003 Analysis Diary Step Y X s r-sqr Comments 1 mpg displace 2.880 54.6% Slope of “displacement” in not zero; but plot indicates a curved pattern. Transform a variable and re-run. Example 5“mpg_city” versus engine “displacement” 2 log Y X 58.9% Still curved, in same direction.

42 M24 Std Error & r-square 42  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Step 3 log Y log X log 10 Y = a + b log 10 X Both “Logscale” boxes checked:

43 M24 Std Error & r-square 43  Department of ISM, University of Alabama, 1992-2003 Analysis Diary Step Y X s r-sqr Comments 1 mpg displace 2.880 54.6% Slope of “displacement” in not zero; but plot indicates a curved pattern. Transform a variable and re-run. Example 5“mpg_city” versus engine “displacement” 2 log Y X 58.9% Still curved, same direction. 3 log Y log X 68.3% Better fit possible on left end?

44 M24 Std Error & r-square 44  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Step 4 Y X Try: Y = a + b 1 X + b 2 X 2

45 M24 Std Error & r-square 45  Department of ISM, University of Alabama, 1992-2003 Analysis Diary Step Y X s r-sqr Comments 1 mpg displace 2.880 54.6% Slope of “displacement” in not zero; but plot indicates a curved pattern. Transform a variable and re-run. Example 5“mpg_city” versus engine “displacement” 2 log Y X 58.9% Still curved, same direction. 3 log Y log X 68.3% Better fit possible on left end? 4 Y = a +b 1 X +b 2 X 2 70.3% Better fit; BUT illogical! Try inverse of Y.

46 M24 Std Error & r-square 46  Department of ISM, University of Alabama, 1992-2003 Calc Calculator … Name of “New Y variable.” mpg_city vs. displacement Example 5 “right side of the equation” 1/’mpg_city’ To change the functional form of a variable in Minitab: List of names of functions:

47 M24 Std Error & r-square 47  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Step 5 Try: 1/ Y = a + b 1 X 1/ Y X Went too far.

48 M24 Std Error & r-square 48  Department of ISM, University of Alabama, 1992-2003 Analysis Diary Step Y X s r-sqr Comments 1 mpg displace 2.880 54.6% Slope of “displacement” in not zero; but plot indicates a curved pattern. Transform a variable and re-run. Example 5“mpg_city” versus engine “displacement” 2 log Y X 58.9% Still curved, same direction. 3 log Y log X 68.3% Better fit possible on left end? 4 Y = a +b 1 X +b 2 X 2 70.3% Better fit; BUT illogical! Try inverse of Y. 5 1/ Y X 61.3% Too far; bent in other direction; NOT a good fit. etc.

49 M24 Std Error & r-square 49  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Final model: log(mpg_city) = 2.2051 - 0.4049 log(displace) s = 0.04625 R-Sq = 68.3% Estimate “mean mpg_city” for displacement = 150. Log 10 150.0 = log(mpg_city) = 2.2051 - 0.4049 ( _______ ) = _______ mpg_city = 21.086 mpg = 21.086 mpg. ________

50 M24 Std Error & r-square 50  Department of ISM, University of Alabama, 1992-2003 mpg_city vs. displacement Example 5 Back to Step 3 log Y log X log 10 Y = a + b log 10 X Both “Logscale” boxes checked: Recall 150 21.09

51 M25 Expon growth & Transforms 51  Department of ISM, University of Alabama, 1992-2003 Example: MPG vs HP for 32 Car Models Example 6

52 M25 Expon growth & Transforms 52  Department of ISM, University of Alabama, 1992-2003 Non-Linear Relationship Example 6 Step 1 Y X

53 X ln X 1/X X ln X 1/X YY ln Y 1/Y Y ln Y 1/Y X Y Original pattern Y = a + b 1 X + b 2 X 2 Rules of Engagement Original pattern b 2 > 0 b 2 < 0 or

54 M25 Expon growth & Transforms 54  Department of ISM, University of Alabama, 1992-2003 Example 6 Step 4 Y 1/X

55 M25 Expon growth & Transforms 55  Department of ISM, University of Alabama, 1992-2003 MPG = a + b 1 HP Suggests a model of the form: Example 6

56 M25 Expon growth & Transforms 56  Department of ISM, University of Alabama, 1992-2003 Example: Price vs Weight for 109 Car Models Example 7

57 M25 Expon growth & Transforms 57  Department of ISM, University of Alabama, 1992-2003 Example 7 Step 1 Y X

58 M25 Expon growth & Transforms 58  Department of ISM, University of Alabama, 1992-2003 Nonlinear with Nonconstant Variance Example 7 Step 1 Y X

59 X ln X 1/X X ln X 1/X YY ln Y 1/Y Y ln Y 1/Y X Y Original pattern Y = a + b 1 X + b 2 X 2 Rules of Engagement Original pattern b 2 > 0 b 2 < 0 or

60 M25 Expon growth & Transforms 60  Department of ISM, University of Alabama, 1992-2003 Non-Constant Variance The variation of the Y values increases as X changes. Generally, transform the Y variable first. “Log Y” is a reasonable start.

61 M25 Expon growth & Transforms 61  Department of ISM, University of Alabama, 1992-2003 Constant Variance, but still nonlinear Transform WEIGHT Example 7 Step 3 1/ Y X

62 X ln X 1/X X ln X 1/X YY ln Y 1/Y Y ln Y 1/Y X Y Original pattern Y = a + b 1 X + b 2 X 2 Rules of Engagement Original pattern b 2 > 0 b 2 < 0 or

63 M25 Expon growth & Transforms 63  Department of ISM, University of Alabama, 1992-2003 Linear with constant variance! (outliers) Example 7 Step 5 1/ Y 1/X

64 M25 Expon growth & Transforms 64  Department of ISM, University of Alabama, 1992-2003 Suggests a model of the form: 1 Weight = a + b 1 Price or Price = 1 a + b 1 Weight Example 7

65 M25 Expon growth & Transforms 65  Department of ISM, University of Alabama, 1992-2003

66 M25 Expon growth & Transforms 66  Department of ISM, University of Alabama, 1992-2003

67 M25 Expon growth & Transforms 67  Department of ISM, University of Alabama, 1992-2003 Example: Sales vs Assets for 80 Fortune 500 Companies in 1986

68 M25 Expon growth & Transforms 68  Department of ISM, University of Alabama, 1992-2003 Example 8 Many small values, few large values; compress both scales. Step 1 Y X

69 M25 Expon growth & Transforms 69  Department of ISM, University of Alabama, 1992-2003 Example 8 Step 2 Use brushing to identify these points. Treat the two groups separately? log Y log X

70 M25 Expon growth & Transforms 70  Department of ISM, University of Alabama, 1992-2003 Suggests a model of the form: log(Sales) = a + b log(Assets) or Sales = 10 a Assets b Example 8

71 M25 Expon growth & Transforms 71  Department of ISM, University of Alabama, 1992-2003 Warnings  Data transformations do NOT work if there is no relationship in the original plot.  The transformations discussed (square root, log, reciprocal, etc.) are one-bend transformations.  Pattern having more than one bend need a different fix.

72 M25 Expon growth & Transforms 72  Department of ISM, University of Alabama, 1992-2003 The End of regression analysis, for now....


Download ppt "M25- Growth & Transformations 1  Department of ISM, University of Alabama, 1992-2003 Lesson Objectives: Recognize exponential growth or decay. Use log(Y."

Similar presentations


Ads by Google