Presentation is loading. Please wait.

Presentation is loading. Please wait.

Spreadsheet Demonstration

Similar presentations


Presentation on theme: "Spreadsheet Demonstration"— Presentation transcript:

1 Spreadsheet Demonstration
Walton’s Bookstore Simulation

2 Walton’s bookstore simulation Winston Example 12.1
In August, Walton Bookstore must decide how many of next year’s nature calendars to order. Each calendar costs the bookstore $7.50 and is sold for $10. After February 1 all unsold calendars are returned to the publisher for a refund of $2.50 per calendar. Walton believes that the number of calendars it can sell by February 1 follows the probability distribution. Walton wants to maximize the expected profit from calendar sales. Specifically, the company wants to use simulation to determine the number of calendars to order in August.

3 Walton’s bookstore simulation Basic problem
Walton can order calendars once for demand in coming year Demand is random Walton wants to achieve best trade-off between ordering too few and too many If you covered the “newsvendor” model in Chapter 10, you’ll recognize this as another version of it. The only difference is that we’re now using simulation, not the method of Chapter 10, to analyze the problem.

4 Walton’s bookstore simulation Uncertainty
Only uncertainty is demand for calendars Modelled as a discrete distribution with given probabilities

5 Walton’s bookstore simulation Monetary inputs
Unit cost of purchasing calendars Unit price of selling calendars Unit refund for any calendars left over at the end of the season

6 Walton’s bookstore simulation Decision variable
Only decision is how many calendars to order Decision criterion: maximize the expected profit With simulation we can see more than the expected profit. We’ll be able to see the entire profit distribution, so we could use other aspects of this distribution when making the decision (although, admittedly, we’ll rely mainly on the mean). Also, we won’t use the Solver for optimization. We’ll proceed more by trial and error: simulating profits for various order quantities and choosing the one that looks best.

7 Developing the spreadsheet model (See Excel “Step 1” sheet)
Step 1: Enter any trial value of order quantity and all inputs, including: Monetary inputs Probability distribution of demand (enter cumulative probabilities as well) Show the formulas for the cumulative probabilities. Enter them just to the left of the possible demands so that they are in the correct position for using a VLOOKUP function later on.

8 Developing the spreadsheet model (See Excel “Steps 2-7” sheet)
Step 2: Generate a random number with the RAND function Step 3: Generate a demand with the VLOOKUP function Depends on the random number from step 2 and the “lookup table” including cumulative probabilities and demands Step 3 is the crucial step. Explain in some detail how the VLOOKUP function in cell C13 generates a random demand with the given demand distribution.

9 Developing the spreadsheet model (See Excel “Steps 2-7” sheet)
Steps 4-7: Based on the random demand from step 3, calculate the revenue, purchase cost, refund, and profit Stress that this completed row (row 13) of the spreadsheet represents one typical “replication” of the simulation. That is, you give it a typical (random) demand, and it calculates the associated profit.

10 Developing the spreadsheet model (See Excel “Step 8” sheet)
Step 8: Copy row 13 to 49 other rows to obtain 49 new replications of the simulation Note how the random numbers (and hence everything else) vary from row to row

11 Developing the spreadsheet model (See Excel “Steps 9,10” sheet)
Step 9: Calculate summary measures (average, stdev, max, min) of the 50 simulated profits Step 10: Calculate a confidence interval for the expected profit, based on the 50 simulated profits Depending on your students’ statistical backgrounds, you might need to set aside some time to discuss confidence intervals in general at this point. In particular, explain why, by generating many replications, we can reduce the width of the confidence interval as much as we want. However, this will not make the standard deviation of profit smaller (which is estimated in cell G64). Why not?

12 Developing the spreadsheet model (See Excel “DataTable 1” sheet)
Construct a data table for the average profit versus a list of possible order quantities The “column input” cell for this table is the original order quantity cell For these particular 50 demands, an order quantity of 150 maximizes average profit It wouldn’t necessarily be best for other randomly generated demands If you haven’t done so yet, go through the mechanics of forming a data table. Explain it in quite a lot of detail; data tables tend to give students fits for some reason! Note that if you freeze the random numbers in column B of the replications (as we did), each order quantity in this data table faces the same demands - which is good from an experimental design point of view. However, it’s not necessary to freeze these random numbers.

13 Developing the spreadsheet model (See Excel “BarChart 1” sheet)
Construct a bar chart of the average profits from the data table Again shows how 150 is the best order quantity

14 Developing the spreadsheet model (See Excel “DataTable 2” sheet)
Another way to generate replications is with a data table Enter the typical formula to replicate (formula for profit) Enter replication number (1 to 50) in a column Generate a data table with “column input” cell equal to any blank cell In Tools/Options, check the “Automatic Except Tables” option under the Calculation tab This general method of forming a data table with a blank cell for the column input cell “tricks” Excel into recalculating the typical formula (profit) many times, using a different random number each time. We’ll use this “trick” throughout the chapter, so make sure the students understand how to do it. This last point is a good tip, especially when there are a lot of replications. It means the data table won’t recalculate until you press the F9 key. Otherwise, it would recalculate (and waste a lot of time!) every time you made any change to the spreadsheet.

15 Developing the spreadsheet model (See Excel “DataTable 3” sheet)
Go one step further: create a two-way data table that replicates the profit 50 times for each of several order quantities Column input cell is any blank cell, row input cell is the order quantity cell Calculate the average profit (and any other summary measures) for each order quantity Again, make sure the students understand exactly what this data table is doing and why the row and column inputs are as they are.

16 Developing the spreadsheet model (See Excel “BarChart 2” sheet)
Create a bar chart of the average profits from the two-way data table Again, 150 appears to be the best order quantity in terms of average profit

17 Developing the spreadsheet model Summary of basic steps
Use random numbers to simulate a single replication Use the copy command or a data table (with blank column input cell) to replicate this single simulation Calculate summary measures from the replications and create relevant graphs These are the basic steps for a simulation that we’ll be following throughout this chapter. The details will vary, but the same basic procedure is always the same.


Download ppt "Spreadsheet Demonstration"

Similar presentations


Ads by Google