compute trendline values in excel

20
www.LCDing.Com Computing trend line values using excel formulas and functions Trendline values in excel charts Warning: This is for those who wish to explore trend lines in excel. For others, this presentation may be intimidating . Kindly exercise caution!

Upload: mahiandsyama

Post on 27-Oct-2014

31 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Compute Trendline Values in Excel

www.LCDing.Com

Computing trend line values using excel formulas and functions

Trendline values in excel charts

Warning: This is for those who wish to explore trend lines in excel.

For others, this presentation may be intimidating . Kindly exercise caution!

Page 2: Compute Trendline Values in Excel

Trendlines in charts

A trend line is a straight line connecting multiple points on a chart.

A trend is a movement in a particular direction

The magnitude of the slope of a trend line, or steepness, indicates the strength of the trend.

Trend lines can be used to forecast future !

Page 3: Compute Trendline Values in Excel

Six types of trend lines

1. Linear2. Logarithmic3. Polynomial4. Power5. Exponential6. Moving Average

How to Create a Trendline? – Have a look at my earlier post in LCDing

Slide share presentation

Page 4: Compute Trendline Values in Excel

Rule of thumb : Use type of Trend line

1. Linear trend line : use it if data values are increasing or decreasing at a steady rate.

2. Logarithmic trend line : Useful when the rate of change in the data increases or decreases quickly and then levels out.

3. Polynomial trend line : Used when there are data fluctuations like the sales following seasonal trends

Page 5: Compute Trendline Values in Excel

Rule of thumb : use type of Trend line

4. Power trend line : Use with data that has values that increase at specific rate at regular intervals.

5. Exponential trend line : Use when data values increase or decrease rates that are constantly increasing.

6. Moving average trend line : Use it when uneven fluctuations are in data values

Page 6: Compute Trendline Values in Excel

Trend line values using excel formulae

You can use the formulas given in the next few slides.

Alternatively, you can download and use the excel attached with all formulas.

To download excel file, click here

Page 7: Compute Trendline Values in Excel

Linear Trendline equation

Equation: y = m * x + bWhere,

m =SLOPE(y,x)

b =INTERCEPT(y,x)

RSQ =RSQ(y,x)

Page 8: Compute Trendline Values in Excel

Logarithmic Trendline equation

Equation: y = (c * LN(x)) + bWhere,

c =INDEX(LINEST(y,LN(x)),1)b =INDEX(LINEST(y,LN(x)),1,2)

RSQ =RSQ(y,LN(x))

Page 9: Compute Trendline Values in Excel

Power Trendline Equation

Equation: y=c*x^bWhere,

c =EXP(INDEX(LINEST(LN(y),LN(x),,),1,2))

b =INDEX(LINEST(LN(y),LN(x),,),1)

RSQ =INDEX(LINEST(LN(y),LN(x),TRUE,TRUE),3,1)

Page 10: Compute Trendline Values in Excel

Exponential Trendline equation

Equation: y = c *e ^(b * x)Where,

c =EXP(INDEX(LINEST(LN(y),x),1,2))b =INDEX(LINEST(LN(y),x),1)

RSQ =RSQ(LN(y),x)

Page 11: Compute Trendline Values in Excel

Polynomial Trendline(2nd order) Equation

Equation: y = (c2 * x ^2) + (c1 * x^1) + bWhere,

c2 =INDEX(LINEST(y,x^{1,2}),1)

c1: =INDEX(LINEST(y,x^{1,2}),1,2)

b = INDEX(LINEST(y,x^{1,2}),1,3)

RSQ =INDEX(LINEST(y,x^{1,2},TRUE,TRUE),3,1)

Page 12: Compute Trendline Values in Excel

Polynomial Trendline(3rd order) Equation

Equation: y=(c3*x^3) + (c2*x^2) + (c1*x^1) +bWhere,

c3 =INDEX(LINEST(y,x^{1,2,3},1)c2 =INDEX(LINEST(y,x^{1,2}),1)c1 =INDEX(LINEST(y,x^{1,2}),1,2)b = INDEX(LINEST(y,x^{1,2}),1,3)

RSQ =INDEX(LINEST(y,x^{1,2,3},TRUE,TRUE),3,1)

Page 13: Compute Trendline Values in Excel

Polynomial Trendline(4th order) Equation

Equation: y= (c4*x^4)+(c3*x^3) + (c2*x^2) + (c1*x^1) +b

Where, c4 = INDEX(LINEST(y,x^{1,2,3,4},1)c3 =INDEX(LINEST(y,x^{1,2,3},1)c2 =INDEX(LINEST(y,x^{1,2}),1)c1 =INDEX(LINEST(y,x^{1,2}),1,2)b = INDEX(LINEST(y,x^{1,2}),1,3)

RSQ =INDEX(LINEST(y,x^{1,2,3,4},TRUE,TRUE),3,1)

Page 14: Compute Trendline Values in Excel

Polynomial Trendline(5th order) Equation

Equation: y= (c5*x^5)+(c4*x^4)+(c3*x^3) + (c2*x^2) + (c1*x^1) +b

Where, c5 = INDEX(LINEST(y,x^{1,2,3,4,5},1) c4 = INDEX(LINEST(y,x^{1,2,3,4},1)c3 =INDEX(LINEST(y,x^{1,2,3},1)c2 =INDEX(LINEST(y,x^{1,2}),1)c1 =INDEX(LINEST(y,x^{1,2}),1,2)b = INDEX(LINEST(y,x^{1,2}),1,3)

RSQ =INDEX(LINEST(y,x^{1,2,3,4,5},TRUE,TRUE),3,1)

Page 15: Compute Trendline Values in Excel

Polynomial Trendline(6th order) Equation

Equation: y=(c6*x^6)+(c5*x^5)+(c4*x^4)+(c3*x^3) + (c2*x^2) +

(c1*x^1)+bWhere,

c6 = INDEX(LINEST(y,x^{1,2,3,4,5,6},1) c5 = INDEX(LINEST(y,x^{1,2,3,4,5},1) c4 = INDEX(LINEST(y,x^{1,2,3,4},1)c3 =INDEX(LINEST(y,x^{1,2,3},1)c2 =INDEX(LINEST(y,x^{1,2}),1)c1 =INDEX(LINEST(y,x^{1,2}),1,2)b = INDEX(LINEST(y,x^{1,2}),1,3)

RSQ =INDEX(LINEST(y,x^{1,2,3,4,5,6},TRUE,TRUE),3,1)

Page 16: Compute Trendline Values in Excel

www.LCDing.Com

Basics of Excel functions used

Page 17: Compute Trendline Values in Excel

Few Basics – Excel functions used - 1

X= Known X's (e.g.: Months on X Axis)Y= Known Y's (e.g.: Sales on Y Axis)Details of Excel functions are taken from Excel Help

LNLN(number) Returns the natural logarithm of a number. Natural logarithms are based on the constant e (2.71828182845904).

LiniestLINEST(known_y's,known_x's,const,stats)Calculates the statistics for a line by using the "least squares" method to calculate a straight line that best fits your data, and returns an array that describes the line. Because this function returns an array of values, it must be entered as an array formula.

ExpEXP(number)Returns e raised to the power of number. The constant e equals 2.71828182845904, the base of the natural logarithm.

IndexINDEX(array,row_num,column_num)INDEX(reference,row_num,column_num,area_num)Returns a value or the reference to a value from within a table or range. There are two forms of the INDEX() function: array and reference. The array form always returns a value or an array of values; the reference form always returns a reference.

Page 18: Compute Trendline Values in Excel

Few Basics – Excel functions used - 2

RSQRSQ(known_y's,known_x's)Returns the square of the Pearson product moment correlation coefficient through data points in known_y's and known_x's. For more information, see PEARSON. The r-squared value can be interpreted as the proportion of the variance in y attributable to the variance in x.

SlopeSLOPE(known_y's,known_x's)Returns the slope of the linear regression line through data points in known_y's and known_x's. The slope is the vertical distance divided by the horizontal distance between any two points on the line, which is the rate of change along the regression line.

InterceptINTERCEPT(known_y's,known_x's)Calculates the point at which a line will intersect the y-axis by using existing x-values and y-values.

LogestLOGEST(known_y's,known_x's,const,stats)In regression analysis, calculates an exponential curve that fits your data and returns an array of values that describes the curve. Because this function returns an array of values, it must be entered as an array formula.