Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

27
Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis

Transcript of Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

Page 1: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

Tutorial

Revision: Pivot Table

1. Histogram

2. Trends

3. Linear

4. Exponential

5. What-If-Analysis

Page 2: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

2

www.misuz.yolasite.com

Computing > Download sales.xls

Create a pivot table showing the total sales for each month (date) of the year, broken down by customer and sales rep Create a filter, using the sales rep

Page 3: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

3

Outcomes:

Applying functions to make forecasts in simple scenarios

Apply the Linest function Apply the Logest function For preparation I used the following website:

www.chandoo.org www.excelfunctions.net Excel help

Page 4: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

4

Background: y = mx + b

You can describe any straight line with the slope and the y-intercept: Slope (m):

To find the slope of a line, often written as m, take two points on the line, (x1,y1) and (x2,y2); the slope is equal to (y2 - y1)/(x2 - x1).

Y-intercept (b):The y-intercept of a line, often written as b, is the value of y at the point where the line crosses the y-axis.

Page 5: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

5

Straight Line eqn:

y = mx + b where, x is the independent variable; y is the dependent variable; m is the slope (gradient) of the line; b is a constant, equal to the value of y when x = 0.

Page 6: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

6

Basic Description:

Excel has functions to calculate the linear trend line through a given set of y-values and (optionally), a given set of x-values.

The function then extends the linear trend line to calculate additional y-values for a further supplied set of new x-values.

Page 7: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

7

Forecasting:

The Excel built in Functions finds the linear trend by using the least squares method to calculate the line of best fit for a supplied set of y- and x- values.

If there is a single range of x-values, the calculated line satisfies the simple straight line equation:

y = mx + b

Page 8: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

8

Scatter x-values:

If there are multiple ranges of x-values, the line of best fit satisfies the following equation:

y = m1x1 + m2x2 + ... + b where,

the x's are the independent variable ranges; y is the dependent variable; the m's are constant multipliers for each x range; b is a constant.

Page 9: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

9

LINEST Function:

The accuracy of the line calculated by the LINEST function depends on the degree of scatter in your data. The more linear the data, the more accurate the LINEST model.

LINEST uses the method of least squares for determining the best fit for the data. When you have only one independent x-variable, the calculations for m and b are based on the following formulas:

Page 10: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

10

Page 11: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

11

General:

Excel allows us to look for trends and use the data natively for forecasting purposes: Linear: approximate a straight line Polynomial: approximate a polynomial function to

a power Power: approximate a power function Logarithmic: approximate a Log function Exponential: approximate an Exponential

function

Page 12: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

12

Example: Linear eqn

To calculate the slope , intercept and other statistical measures:

Page 13: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

13

Page 14: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

14

Page 15: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

15

Page 16: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

16

Page 17: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

17

Regression Statistics:

Page 18: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

18

To determine r2:

The coefficient of determination: Compares estimated and actual y-values,

and ranges in value from 0 to 1. If it is 1, there is a perfect correlation in the sample — there is no difference between the estimated y-value and the actual y-value.

At the other extreme, if the coefficient of determination is 0, the regression equation is not helpful in predicting a y-value

Page 19: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

19

Page 20: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

20

Extrapolation:

What is the value for Measure when the Day= 77?

(0, ?) You can also use

Trend Forecast

Page 21: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

21

Exponential Fitting:

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.

The equation for the curve is:

y = b*m^x

Page 22: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

22

Logest Function

The Excel LOGEST function returns statistical information on the exponential curve of best fit, through a supplied set of x- and y- values. y = b * m^x x is the independent variable; y is the dependent variable; m is a constant base for the x value; b is a constant which is the value of y when x = 0.

Page 23: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

23

Page 24: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

24

Page 25: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

25

Questions:

What is the value for r2? (20,?)

Page 26: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

26

Additional Stats:

The standard error value for the base m is 0.014718308 The standard error value for the constant b is

0.070073164 The coefficient of determination is 0.990327432 The standard error for the y estimate is 0.114007527 The F statistic is 716.6960934 The number of degrees of freedom is 7 The regression sum of squares is 9.315412472 The residual sum of squares is 0.090984014

Page 27: Tutorial Revision: Pivot Table 1. Histogram 2. Trends 3. Linear 4. Exponential 5. What-If-Analysis.

What-If-Analysis: PMT function Calculate the payment of a loan of R 1 000 000,

redeemed at 10%pa, monthly over 15 years What-If: change

The loan to 2 000 000: what is the new installment? Interest rate to 12%: new loan and installment?

Goal Seek: what is the new loan amount if the monthly installment changes to R 15 000

Interactive toolbar: create a toolbar, linked to the term, changing over the range 10 to 20, in steps of 1 year

27