Académique Documents
Professionnel Documents
Culture Documents
Home
Press
Customers
Pricing
Technology
Knowledgebase
Consulting
Company
Benefits of forecasting
Forecasting can help you make the right decisions, and earn/save money. Here is one example. Size your inventories optimally Time is money. Room is money. So what you want to do is use all means at your disposal in order to reduce your stocks without experiencing any shortages, of course. How? By forecasting!
Forecasting topics
Backtesting Forecasting accuracy Forecasting methods Obfuscation Overfitting Pinball loss function Quantile regression Seasonality Time-series
Just do a right click on the cell you want to comment, and then select insert comment . You can use them: to explain the content of a cell (i.e. unit cost according to Mr Doe's estimates) to leave warnings to future users of the sheet (i.e. I have a doubt about this calculation... )
Get advanced sales forecasts with our webapp Salescast. Lokad specializes in inventory optimization through demand forecasting. The content of this tutorial - and much more - are native features of Salescast.
2/7/2014
Let us now do our first forecast. In this part, we will be using this file: Example1.xls. To repeat the steps by yourself, you can download the file. This data serves just as example. Our Data: In the first column, data about the unit costs of similar products (the unit cost reflects the quality of the product). In the second one, data about how much has been sold. What we want to know: If we sell another product, with a quality corresponding to a cost of $150/unit, how many units can we expect to sell? How we get there: Here, it is pretty simple. We want to find a simple mathematical relationship between unit cost and sales, and then use this relationship to do our forecast.
Viewing your data
First, it is always useful to create a graph in Excel, in order to take a look at the data. Your eyes are excellent tools that can help you identifying trends in a few seconds. To do this, we select our data, then use Insert > Chart, and chose the XY(Scatter) option. We want to estimate sales as a function of quality, therefore we put the unit cost on the horizontal and the sales on the vertical axes. Now, we stop a few seconds and take a good look at what we see: the relationship seems to be increasing, and linear. In order to get an idea of the exact form of the relationship, we right click on the chart, and select the "Trendline" option.
Creating a trendline
Now, we have to select the relationship that seems to "fit" (i.e. best describe) our data. Here again, we use our eyes: In this case, the dots are almost in a straight line, so we use the "linear" setting. Later on, we will use other - more complex, but often more realistic - settings, like "exponential". Our trendline is now displayed on the chart. Another right click allows us to display the exact form of the relationship: y = 102.4x - 191.64. Understand: Number of unit sold = 102.4 times the unit cost - 191.64. So, if we decide to produce at a $150 unit cost, we can expect to sell 102.4*150 - 191.64 = 15168 units.
A linear trendline
http://www.lokad.com/forecasting-methods-and-formulas-with-excel
2/5
2/7/2014
We have just completed our first forecast successfully. However, be careful: The software is always able to find a relationship between the two columns, even if this relationship is in reality very weak! Therefore a check for robustness is required. Here is how you quickly do this: First, always take a look at the chart. If you find the dots closely located to the trendline, as is the case in our example above, there is a good chance that the relationship is robust. However, if the dots seem to be located almost randomly and are in general quite far from the trendline, then you should be careful: the correlation is weak, and the estimated relationship should not be blindly trusted.
After taking a look at the chart, you can use the CORREL function. In our example, the function would read: CORREL(A2:A83,B2:B83). If the result is close to 0, then the correlation is low, and the conclusion is: there is simply no real trend. If it is close to 1, then the correlation is strong. The latter is a helpful, since it increases the explanatory power of the relationship you found. There are more subtle ways of making sure the correlation is high; we will come back to this later on. Of course, these last steps can be automated: you don't have to note the relationship, and use your pocket calculator to do the computation. You need the Analysis Toolpak!
Unfortuntaley such perfect sales data with such a nice, simple linear relationship is quite uncommon in real life. Let us have a look at what Excel has to offer for more complicated situations, with more complicated data.
http://www.lokad.com/forecasting-methods-and-formulas-with-excel
3/5
2/7/2014
This is the perfect case. Of course, the data will never exactly look like this. But if the dots seem to approximately follow this repartition, it should encourage you to consider exponential fitting.
Using trendlines
As in the previous example, you can always draw a chart of your data, ask for a trendline, and choose exponential instead of linear. Then, gather the displayed equation, as usual. 2) Luckily, you can also do all this directly, using the Analysis Toolpak: Put all your data into a blank excel sheet, and go to Tools => Data Analysis
http://www.lokad.com/forecasting-methods-and-formulas-with-excel
4/5
2/7/2014
get a direct estimation of the functional form, without going through the trendline process. Open your data sheet, then open the tools menu and select Data Analysis . A window pops up, asking you what kind of analysis you want to perform. Select regression for linear settings. Now you need to give Excel two arguments: an Y range and an X range . The Y range indicates what you want to estimate (i.e. your sales), and the X range contains the data that you think can explain your sales (here, your unit cost). In our example (see example1.xls), our sales data are in column B, from row 3 to row 90, so you need to put $B$3:$B$90 as the Y range, and $A$3:$A$90 as the X range. When you are done, click ok . A new sheet appears, containing the regression results .
The Analysis Toolpak Output, in the case of an Ordinary Least Squares regression
The most important result is contained in the Coefficients column at the bottom of the sheet. The intercept is the constant, and the X variable coefficient is the coefficient of X (here, your unit cost). Hence, we find the same equation we found using the trendline function. Sales = Intercept + Xcoefficient * unit costSales = -126 + 100 * unit cost This sheet also contains a useful number that gives you information about how good your estimation is: the R Square . If it is close to 1, then your estimate is good, which means that the equation you found is a fairly good representation of your data. If it is close to 0, then the estimation is not good, and you should probably try another kind of fitting (see exponential fitting below). This method is probably faster than the trendline techniques. However, it is a bit more technical and much less visual. So if you do not want to go through the trouble of plotting and eyeballing your data, make sure you at least check the R square value.
Guides : Safety Stock with Excel Forecasting methods with Excel Economic Order Quantity (EOQ) with Excel Optimal service level with Excel
Contact Us | Terms of Service 2007-2013, Lokad. All rights reserved. Edit | History | Admin | Files | Login | Profile
http://www.lokad.com/forecasting-methods-and-formulas-with-excel
5/5