You are on page 1of 137

Table of Contents Chapter 16 (Computer Simulation with Crystal Ball)

A Case Study: Freddie the Newsboys Problem (Section 16.1) Bidding for a Construction Project (Section 16.2) Project Management: Reliable Construction Co. (Section 16.3) Cash Flow Management: Everglade Golden Years Co. (Section 16.4) Financial Risk Analysis: Think-Big Development Co. (Section 16.5) Revenue Management in the Travel Industry (Section 16.6) Choosing the Right Distribution (Section 16.7) Decision Making with Decision Tables (Section 16.8) Optimizing with OptQuest (Section 16.9) Monte-Carlo Simulation with Crystal Ball (UW Lecture) 16.216.24 16.2516.31 16.3216.43 16.4416.49 16.5016.55 16.5616.61 16.6216.83 16.8416.99 16.10016.118 16.11916.137

These slides are based upon a lecture from the MBA core course in Management Science at the University of Washington (as taught by one of the authors).

McGraw-Hill/Irwin

16.1

The McGraw-Hill Companies, Inc., 2003

Freddie the Newsboy


Freddie runs a newsstand in a prominent downtown location of a major city. Freddie sells a variety of newspapers and magazines. The most expensive of the newspapers is the Financial Journal. Cost data for the Financial Journal:
Freddie pays $1.50 per copy delivered. Freddie charges $2.50 per copy. Freddies refund is $0.50 per unsold copy.

Sales data for the Financial Journal:


Freddie sells anywhere between 40 and 70 copies a day. The frequency of the numbers between 40 and 70 are roughly equal.

McGraw-Hill/Irwin

16.2

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Simulation


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 B C D E F

Freddie the Newsboy


Unit Sale Price Unit Purchase Cost Unit Salvage Value Data $2.50 $1.50 $0.50 Decis ion Variable 60 Sim ulation 55 55 $137.50 $90.00 $2.50 $50.00 Minimum 40 Maximum 70

Order Quantity

Simulated Demand Demand (rounded) Sales Revenue Purchasing Cost Salvage Value Prof it

Uniform

McGraw-Hill/Irwin

16.3

The McGraw-Hill Companies, Inc., 2003

Application of Crystal Ball


Four steps must be taken to use Crystal Ball on a spreadsheet model:
1. Define the random input cells.

2. Define the output cells to forecast.


3. Set the run preferences. 4. Run the simulation.

McGraw-Hill/Irwin

16.4

The McGraw-Hill Companies, Inc., 2003

Step 1: Define the Random Input Cells


A random input cell is an input cell that has a random value. An assumed probability distribution must be entered into the cell rather than a single number. Crystal Ball refers to each such random input cell as an assumption cell. Procedure to define an assumption cell:
1. 2. 3. 4. 5. 6. Select the cell by clicking on it. If the cell does not already contain a value, enter any number into the cell. Click on the Define Assumption button (first button in Crystal Ball toolbar). Select a probability distribution from the Distribution Gallery. Click OK to bring up the dialogue box for the selected distribution. Use the dialogue box to enter parameters for the distribution (preferably referring to cells on the spreadsheet that contain these parameters). 7. Click on OK.

McGraw-Hill/Irwin

16.5

The McGraw-Hill Companies, Inc., 2003

Def ine As sum ptio n Def ine D ecis io n Def ine F oreca st Select As sum ptions Select D ecis io ns Select F oreca s ts Copy D ata Past e D ata Clear D at a Run Pr eferenc es

McGraw-Hill/Irwin

The Crystal Ball Toolbar

16.6
The McGraw-Hill Companies, Inc., 2003

Start S im ulatio n Stop S imulat io n Res et S imulat io n Single St ep Foec as t W indo ws Overlay C hart Trend C hart Sensit iv it y Cha rt Creat e R eport Ext ract D ata Cry st al Ball He lp

Crystal Ball Distribution Gallery

McGraw-Hill/Irwin

16.7

The McGraw-Hill Companies, Inc., 2003

Crystal Ball Uniform Distribution Dialogue Box

McGraw-Hill/Irwin

16.8

The McGraw-Hill Companies, Inc., 2003

Static versus Dynamic Option


When cell references are used to enter parameters for a distribution, the Distribution Dialogue Box gives a choice between the Static option and the Dynamic option.

The static option means that each cell reference is only evaluated once, at the beginning of the simulation run, and then each parameter value (e.g., Min and Max) is used for all trials of the simulation.
The dynamic option means that each cell reference is evaluated for each separate trial. This would be needed if the parameter value might change from trial to trial because it depends on another assumption cell.

McGraw-Hill/Irwin

16.9

The McGraw-Hill Companies, Inc., 2003

Step 2: Define the Output Cells to Forecast


Crystal Ball refers to the output of a computer simulation as a forecast, since it is forecasting the underlying probability distribution when it is in operation. Each output cell that is being used to forecast a measure of performance is referred to as a forecast cell. Procedure for defining a forecast cell:
1. Select the cell. 2. Click on the Define Forecast button (3rd button) in the Crystal Ball toolbar, which brings up the Define Forecast dialogue box. 3. This dialogue box can be used to define a name and (optionally) units for the forecast cell. 4. Click on OK.

McGraw-Hill/Irwin

16.10

The McGraw-Hill Companies, Inc., 2003

Crystal Ball Define Forecast Dialogue Box

McGraw-Hill/Irwin

16.11

The McGraw-Hill Companies, Inc., 2003

Step 3: Set the Run Preferences


Setting run preferences refers to such things as choosing the number of trials to run and deciding on other options regarding how to perform the simulation. This step begins by clicking on the Run Preferences button on the Crystal Ball toolbar. The Run Preferences dialogue box has six tabs to set various types of options. The Trials tab allows you to specify the maximum number of trials to run for the computer simulation.

McGraw-Hill/Irwin

16.12

The McGraw-Hill Companies, Inc., 2003

The Crystal Ball Run Preferences Dialogue Box

McGraw-Hill/Irwin

16.13

The McGraw-Hill Companies, Inc., 2003

Step #4: Run the Simulation


To begin running the simulation, click on the Start Simulation button. Once started, a forecast window displays the results of the computer simulation as it runs. The following can be obtained by choosing the corresponding option under the View menu in the forecast window display:
Frequency chart Statistics table Percentiles table Cumulative chart Reverse cumulative chart

McGraw-Hill/Irwin

16.14

The McGraw-Hill Companies, Inc., 2003

The Frequency Chart for Freddies Profit

McGraw-Hill/Irwin

16.15

The McGraw-Hill Companies, Inc., 2003

The Statistics Table for Freddies Profit

McGraw-Hill/Irwin

16.16

The McGraw-Hill Companies, Inc., 2003

The Percentiles Table for Freddies Profit

McGraw-Hill/Irwin

16.17

The McGraw-Hill Companies, Inc., 2003

The Cumulative Chart for Freddies Profit

McGraw-Hill/Irwin

16.18

The McGraw-Hill Companies, Inc., 2003

The Reverse Cumulative Chart for Freddies Profit

McGraw-Hill/Irwin

16.19

The McGraw-Hill Companies, Inc., 2003

Certainty that Profit $40

McGraw-Hill/Irwin

16.20

The McGraw-Hill Companies, Inc., 2003

How Accurate Are the Simulation Results?


An important number provided by the simulation is the mean profit of $46.67. This sample average provides an estimate of the true mean of the distribution. The true mean might be somewhat different than $46.67. The mean standard error (on the Statistics Chart) of $0.60 gives some indication of how accurate the estimate might be. The true mean will typically (approximately 68% of the time) be within the mean standard error of the estimated value.
It is about 68% likely that the true mean profit is between $46.07 and $47.27.

The mean standard error can be reduced by increasing the number of trials. However, cutting the mean standard error in half typically requires approximately our times as many trials.

McGraw-Hill/Irwin

16.21

The McGraw-Hill Companies, Inc., 2003

Precision Control: Expanded Define Forecast Dialogue Box

McGraw-Hill/Irwin

16.22

The McGraw-Hill Companies, Inc., 2003

Results with Precision Control

750 trials were required to get the 95% confidence interval around the mean within $1.
McGraw-Hill/Irwin

16.23

The McGraw-Hill Companies, Inc., 2003

Results with Precision Control

This table shows the precision obtained for the various percentiles of profit after 750 trials.
McGraw-Hill/Irwin

16.24

The McGraw-Hill Companies, Inc., 2003

Bidding for a Project: Reliable Construction Co.


Reliable Construction Co. is bidding to construct a new plant for a major manufacturer. Reliable estimates the cost of the project to be $4.55 million, There also is an additional cost of approximately $50,000 for preparing the bid. Three other construction companies also were invited to submit bids for the project.
Competitor 1 is known to use a 30 percent profit margin, but are unpredictable bidders because of an inability to accurately estimate the true cost of the project. Previous bids have ranged from 5% below the expected cost to 60% above. Competitor 2 uses a 25% profit margin, but is more accurate at predicting the true cost. In the past, they have missed this profit margin by up to 15% in either direction. Competitor 3 is unusually accurate in estimating project cost. It is equally likely to set its profit margin anywhere between 20% and 30%.

Question: How much should Reliable bid for this project?

McGraw-Hill/Irwin

16.25

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 B C D E

Reliable Construction Co. Contract Bidding


Data Our Project Cost ($million) Our Bid Cost ($million) Competitor Bids Bid ($million) Distribution 4.550 0.050 Competitor 1 5.839 Triangular Competitor 2 5.688 Triangular Competitor 3 5.688 Uniform

Competitor Distribution Parameters (Proportion of Our Project Cost) Minimum 95% 110% Most Likely 130% 125% Maximum 160% 140% Competitor Distribution Parameters ($millions) Minimum 4.323 Most Likely 5.915 Maximum 7.280 Minimum Competitor Bid ($million) Our Bid ($million) Win Bid? Profit ($million)

120% 130%

5.005 5.688 6.370

5.460 5.915

5.688 5.400 1 0.800 (1=yes, 0=no)

McGraw-Hill/Irwin

16.26

The McGraw-Hill Companies, Inc., 2003

Triangular Distribution for Competitor 2

McGraw-Hill/Irwin

16.27

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Reliables Bidding Problem

McGraw-Hill/Irwin

16.28

The McGraw-Hill Companies, Inc., 2003

Statistics Table for Reliables Bidding Problem

McGraw-Hill/Irwin

16.29

The McGraw-Hill Companies, Inc., 2003

Percentiles Table for Reliables Bidding Problem

McGraw-Hill/Irwin

16.30

The McGraw-Hill Companies, Inc., 2003

Cumulative Chart for Reliables Bidding Problem

McGraw-Hill/Irwin

16.31

The McGraw-Hill Companies, Inc., 2003

Project Management: Reliable Construction Co.


Reliable Construction Co. has won the bid to construct a new plant for a major manufacturer. The contract includes a large penalty if construction is not completed by the deadline 47 weeks from now. There are 14 tasks that need to be completed to finish the project.
(a) excavate, (b) foundation, (c) rough wall, (d) roof, (e) exterior plumbing, (f) interior plumbing, (g) exterior siding, (h) exterior painting, (i) electrical work, (j) wallboard, (k) flooring, (l) interior painting, (m) exterior fixtures, (n) interior fixtures. For each task, three estimates of their completion time have been madea mostlikely, an optimistic, and a pessimistic estimate

Question: What is the probability that the project will complete by the deadline?

McGraw-Hill/Irwin

16.32

The McGraw-Hill Companies, Inc., 2003

Project Network for Reliable Construction Co.


START 0 Activity Code A. Excavate B. Foundation C. Rough wall B 4 D. Roof E. Exterior plumbing C 10 F. Interior plumbing G. Exterior siding H. Exterior painting D 6 E 4 I 7 I. Electrical work J. Wallboard K. Flooring L. Interior painting G 7 F 5 M. Exterior fixtures N. Interior fixtures J H 9 K 4 M 2 N 6 L 5 8

FINISH 0

McGraw-Hill/Irwin

16.33

The McGraw-Hill Companies, Inc., 2003

The Triangular Distribution for an Activity Duration

Triangular distribution

m Elapsed time

McGraw-Hill/Irwin

16.34

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 B C D E F G H I

Simulation of Reliable Construction Co. Project


Immediate Predecessor A B C C E D E, G C F, I J J H K, L Time Estimates o m 1 2 2 3.5 6 9 4 5.5 1 4.5 4 4 5 6.5 5 8 3 7.5 3 9 4 4 1 5.5 1 2 5 5.5 Start Time 0 2 6.5 17.5 17.5 21 24 31.5 17.5 27 34 34 41.5 38.5 Activity Time (triangular ) 2 4.5 11 6.5 3.5 6 7.5 10 6.5 7 4 4.5 2 6.5 Project Completion Finish Time 2 6.5 17.5 24 21 27 31.5 41.5 24 34 38 38.5 43.5 45 45

Activity A B C D E F G H I J K L M N

p 3 8 18 10 5 10 11 17 9 9 4 7 3 9

McGraw-Hill/Irwin

16.35

The McGraw-Hill Companies, Inc., 2003

The Triangular Distribution Dialogue Box

McGraw-Hill/Irwin

16.36

The McGraw-Hill Companies, Inc., 2003

The Frequency Chart for Reliables Project Duration

McGraw-Hill/Irwin

16.37

The McGraw-Hill Companies, Inc., 2003

The Statistics Table for Reliables Project Duration

McGraw-Hill/Irwin

16.38

The McGraw-Hill Companies, Inc., 2003

The Percentiles Table for Reliables Project Duration

McGraw-Hill/Irwin

16.39

The McGraw-Hill Companies, Inc., 2003

Probability of Meeting the Project Deadline

McGraw-Hill/Irwin

16.40

The McGraw-Hill Companies, Inc., 2003

Probability of Meeting the Project Deadline

McGraw-Hill/Irwin

16.41

The McGraw-Hill Companies, Inc., 2003

Calculate Sensitivity Option

McGraw-Hill/Irwin

16.42

The McGraw-Hill Companies, Inc., 2003

The Sensitivity Chart for Reliables Project

McGraw-Hill/Irwin

16.43

The McGraw-Hill Companies, Inc., 2003

Cash Flow Management: Everglade Golden Years Co.


Because of a temporary decline in business and some current or future construction costs, the company is facing some negative cash flows in the next few years.

A long-term (10-year) loan can be taken now at a 7% annual interest rate.


A series of short-term (1-year) loans can be taken as needed at 10% interest. The cash flows over the next 10 years are not certain. For each year, an estimate of the minimum, most-likely, and maximum cash flow has been made.

Question: How large of a long-term loan should Everglade take out now?

McGraw-Hill/Irwin

16.44

The McGraw-Hill Companies, Inc., 2003

Projected Net Cash Flows


Projected Net Cash Flow (millions of dollars)

Year

2003
2004 2005 2006

8
2 4 3

2007
2008 2009 2010 2011 2012

6
3 4 7 2 10

McGraw-Hill/Irwin

16.45

The McGraw-Hill Companies, Inc., 2003

Linear Programming Spreadsheet Model


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 B C D E F G H I J K L

Everglade Cash Flow Management Problem


LT Rate ST Rate Start Balance Minimum Cash 7% 10% 1 0.5 Cash Flow -8 -2 -4 3 6 3 -4 7 -2 10 LT Loan 6.649 ST Loan 0.851 3.401 8.207 6.493 1.607 0.000 3.699 0.000 0.000 0.000 (all cash figures in millions of dollars)

Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013

LT Interest -0.465 -0.465 -0.465 -0.465 -0.465 -0.465 -0.465 -0.465 -0.465 -0.465

ST Interest -0.085 -0.340 -0.821 -0.649 -0.161 0.000 -0.370 0.000 0.000 0.000

LT Payback

ST Payback -0.851 -3.401 -8.207 -6.493 -1.607 0.000 -3.699 0.000 0.000 0.000

-6.649

Ending Balance 0.500 0.500 0.500 0.500 0.500 1.266 0.500 2.965 0.500 10.035 2.920

>= >= >= >= >= >= >= >= >= >= >=

Minimum Balance 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5 0.5

McGraw-Hill/Irwin

16.46

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22

Everglade Cash Flow Management Problem When Applying Simulation


LT Rate ST Rate Start Balance Minimum Cash 7% 10% 1 0.5 Cash Flow (Triangular Distribution) Most Minimum Likely Maximum -9 -8 -7 -4 -2 1 -7 -4 0 0 3 7 3 6 9 1 3 5 -6 -4 -2 4 7 12 -5 -2 4 5 10 18 Simulated Cash Flow -8.00 -1.67 -3.67 3.33 6.00 3.00 -4.00 7.67 -1.00 11.00 (all cash figures in millions of dollars)

Year 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013

LT Loan 6.65

LT Interest -0.47 -0.47 -0.47 -0.47 -0.47 -0.47 -0.47 -0.47 -0.47 -0.47

ST Interest -0.09 -0.31 -0.75 -0.54 -0.04 0 -0.24 0 0 0

LT Payback

ST Payback -0.85 -3.07 -7.51 -5.39 -0.39 0 -2.36 0 0 0

-6.65

Balance Before ST Loan -0.35 -2.57 -7.01 -4.89 0.11 2.60 -1.86 5.10 3.64 14.17 7.05

ST Loan 0.85 3.07 7.51 5.39 0.39 0.00 2.36 0.00 0.00 0.00

Ending Balance 0.50 0.50 0.50 0.50 0.50 2.60 0.50 5.10 3.64 14.17 7.05

>= >= >= >= >= >= >= >= >= >= >=

Minimum Balance 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50 0.50

McGraw-Hill/Irwin

16.47

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Everglades Ending Balance

McGraw-Hill/Irwin

16.48

The McGraw-Hill Companies, Inc., 2003

Cumulative Chart for Everglades Ending Balance

McGraw-Hill/Irwin

16.49

The McGraw-Hill Companies, Inc., 2003

Financial Risk Analysis: Think-Big Development Co.


The Think-Big Development Co. is a major investor in commercial real estate development projects. It has been considering taking a share in three large construction projectsa high-rise office building, a hotel, and a shopping center. In each case, three years will be spent in construction, they will retain ownership for another three years while establishing the property, and then sell the property in the seventh year. Proposal: Dont take any share in the high-rise, take a 16.5% share of the hotel, and take a 13.11% share of the shopping center. Management wants risk analysis to be performed (with computer simulation) to obtain a risk profile (frequency distribution) of what the total NPV might turn out to be for this proposal.

McGraw-Hill/Irwin

16.50

The McGraw-Hill Companies, Inc., 2003

Estimated Cash Flows for 100 Percent Share

Hotel Project Year Cash Flow ($1,000,000s) Year

Shopping Center Project Cash Flow ($1,000,000s)

0
1 2 3 4 5 6 7

80
Normal (80, 5) Normal (80, 10) Normal (70, 15) Normal (+30, 20) Normal (+40, 20) Normal (+50, 20) Uniform (200, 844)

0
1 2 3 4 5 6 7

90
Normal (50, 5) Normal (20, 5) Normal (60, 10) Normal (+15, 15) Normal (+25, 15) Normal (+40, 15) Uniform (160, 600)

McGraw-Hill/Irwin

16.51

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation


A B C 3 4 5 Hotel Project: 6 Construction Costs: Year 0 7 Year 1 8 Year 2 9 Year 3 10 Revenue per Share Year 4 11 Year 5 12 Year 6 13 Selling Price per Share Year 7 14 15 Shopping Center Pr oje ct 16 Construction Costs: Year 0 17 Year 1 18 Year 2 19 Year 3 20 Revenue per Share Year 4 21 Year 5 22 Year 6 23 Selling Price per Share Year 7 24 25 26 27 28 Year 0 29 Year 1 30 Year 2 31 Year 3 32 Year 4 33 Year 5 34 Year 6 35 Year 7 36 37 Net Present Value ($millions) D Pr oje ct Sim ulate d Cas h Flow ($m illions) -80 -80 -80 -70 30 40 50 522 E F G H

Normal Normal Normal Normal Normal Normal Uniform

-80 -80 -70 30 40 50 200

5 10 15 20 20 20 844

(mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (min, max)

-90 -50 -20 -60 15 25 40 387.5 Think Big's Sim ulate d Cash Flow ($m illions) -24.999 -19.755 -15.822 -19.416 6.917 9.878 13.494 136.931 18.120

Normal Normal Normal Normal Normal Normal Uniform

-50 -20 -60 15 25 40 160

5 5 10 15 15 15 615

(mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (mean, st. dev.) (min, max)

Hotel Shopping Center Cost of Capital

Share 16.50% 13.11% 10%

McGraw-Hill/Irwin

16.52

The McGraw-Hill Companies, Inc., 2003

The Normal Distribution Dialogue Box

McGraw-Hill/Irwin

16.53

The McGraw-Hill Companies, Inc., 2003

Risk Profile (Frequency Chart) for Think-Big

McGraw-Hill/Irwin

16.54

The McGraw-Hill Companies, Inc., 2003

Percentiles Chart for Think-Big

McGraw-Hill/Irwin

16.55

The McGraw-Hill Companies, Inc., 2003

Transcontinental Airlines Overbooking Problem


Transcontinental has a daily flight (excluding weekends) from San Francisco to Chicago that is mainly used by business travelers. There are 150 seats available in a single cabin. The average fare per seat is $300. This is a nonrefundable fare, so no-shows forfeit the entire fare. The fixed cost of operating the flight is $30,000. The average number of reservation requests for this flight has been 195, with a standard deviation of 30. Only 80% of passengers with a reservation actually show up to take the flight, so it makes sense to take more than 150 reservations (overbooking). If more passengers arrive to take the flight than there are seats, some passengers must be bumped. The total cost (including rebooking, travel vouchers, and lost goodwill) is estimated to be $450.

Question: How many reservations should Transcontinental accept for this flight?
McGraw-Hill/Irwin

16.56

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 B C D E F

Transcontinental Airlines Overbooking


Available Seats Fixed Cost Avg. Fare / Seat Cost of Bumping Data 150 $30,000 $300 $450 Mean 195 Standard Dev. 30

Ticket Demand Demand (rounded) Reservations to Accept

195 195 190

Normal

Number that Show

152

Binomial

Tickets Purchased 190

Probability to Show up 80%

Number of Filled Seats Number Denied Boarding

150 2

Ticket Revenue Bumping Cost Fixed Cost Profit

$45,000 $900 $30,000 $14,100

McGraw-Hill/Irwin

16.57

The McGraw-Hill Companies, Inc., 2003

Binomial Distribution with Dynamic Option for Number that Show

McGraw-Hill/Irwin

16.58

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Profit

McGraw-Hill/Irwin

16.59

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Number of Filled Seats

McGraw-Hill/Irwin

16.60

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Number Denied Boarding

McGraw-Hill/Irwin

16.61

The McGraw-Hill Companies, Inc., 2003

Choosing the Right Distribution


A continuous distribution is used if any values are possible, including both integer and fractional numbers, over the entire range of possible values. A discrete distribution is used if only certain specific values (e.g., only some integer values) are possible. However, if the only possible values are integer numbers over a relatively broad range, a continuous distribution may be used as an approximation by rounding any fractional value to the nearest integer.

McGraw-Hill/Irwin

16.62

The McGraw-Hill Companies, Inc., 2003

A Popular Central-Tendency Distribution: Normal


McGraw-Hill/Irwin

Some value most likely (the mean) Values close to mean more likely Symmetric (as likely above as below mean) Extreme values possible, but rare
16.63
The McGraw-Hill Companies, Inc., 2003

A Popular Central-Tendency Distribution: Triangular


McGraw-Hill/Irwin

Some value most likely Values close to most likely value more common Can be asymmetric Fixed upper and lower bound
16.64
The McGraw-Hill Companies, Inc., 2003

A Popular Central-Tendency Distribution: Lognormal


McGraw-Hill/Irwin

Some value most likely Positively skewed (below mean more likely) Values cannot fall below zero Extreme values (high end only) possible, but rare
16.65
The McGraw-Hill Companies, Inc., 2003

The Uniform Distribution

Fixed minimum and maximum value All values equally likely

McGraw-Hill/Irwin

16.66

The McGraw-Hill Companies, Inc., 2003

A Three-Parameter Distribution: Weibull

Random value above some number (location) Shape > 0 (usually 10) Shape < 3 becomes more positively-skewed (below mean more likely) until it resembles exponential distribution (equivalent at Shape = 1) Symmetrical at Shape = 3.25, becomes negatively skewed above that Scale defines width
16.67
The McGraw-Hill Companies, Inc., 2003

McGraw-Hill/Irwin

A Three-Parameter Distribution: Beta


McGraw-Hill/Irwin

Random value between 0 and some positive number (Scale) Shape specified using two positive values (alpha, beta) Alpha < beta: positively skewed (below mean more likely) Beta < alpha: negatively skewed
16.68
The McGraw-Hill Companies, Inc., 2003

A Distribution for Random Events: Exponential

Widely used to describe time between random events (e.g., time between arrivals) Events are independent Rate = average number of events per unit time (e.g., arrivals per hour)
McGraw-Hill/Irwin

16.69

The McGraw-Hill Companies, Inc., 2003

A Distribution for Random Events: Poisson

Describes the number of times an event occurs during a given period of time or space Occurrences are independent Any number of events is possible Rate = average number of events per unit of time, assumed constant over time
McGraw-Hill/Irwin

16.70

The McGraw-Hill Companies, Inc., 2003

Distribution for Number of Times an Event Occurs: Binomial

Describes number of times an event occurs in a fixed number of trials (e.g., number of heads in 10 flips of a coin) For each trial, only two outcomes are possible Trials independent Probability remains the same for each trial
McGraw-Hill/Irwin

16.71

The McGraw-Hill Companies, Inc., 2003

Distribution for Number of Trials Until Event Occurs: Geometric

Describes number of trials until an event occurs (e.g., number of times to spin roulette wheel until you win) Probability same for each trial Continue until succeed Number of trials unlimited
McGraw-Hill/Irwin

16.72

The McGraw-Hill Companies, Inc., 2003

Distribution for Number of Trials Until n Events Occur: Negative Binomial

Describes number of trials until an event occurs n times Same as geometric when Shape = n = 1 Probability same for each trial Continue until nth success Number of trials unlimited
McGraw-Hill/Irwin

16.73

The McGraw-Hill Companies, Inc., 2003

The Custom Distribution (Set of Discrete Values)

Enter set of values with varying probabilities For each discrete value, enter Value and Prob. (leave other boxes blank) Clicking Enter clears boxes for entering next discrete value
16.74
The McGraw-Hill Companies, Inc., 2003

McGraw-Hill/Irwin

The Custom Distribution (Range of Discrete Values)

Enter range of discrete values, each equally likely Enter lower and upper end of range in Value and Value2 Enter the total probability for the whole set in Prob. Enter the distance between discrete values in Step
16.75
The McGraw-Hill Companies, Inc., 2003

McGraw-Hill/Irwin

The Custom Distribution (Continuous Distribution)

Enter the lower and upper end of range in Value and Value2 Enter the total probability for the range in Prob. Leave Step blank for a continuous distribution Drag the corners of the distribution graph up or down to change relative probabilities Dragging corners may affect total probability. Click on Rescale to reset total probability.
McGraw-Hill/Irwin

16.76

The McGraw-Hill Companies, Inc., 2003

The Custom Distribution (Combination)

Any combination of discrete values, ranges of discrete values, or continuous distributions can be entered Input each element, click on Enter, input next element, etc. If cumulative probabilities do not add to 1, click on Rescale
16.77
The McGraw-Hill Companies, Inc., 2003

McGraw-Hill/Irwin

Historical Demand Data for the Financial Times


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 58 59 60 61 62 63 B C D E F Historical Demand Data 62 45 59 65 50 64 56 51 55 61 40 47 63 68 67 67 68 41 42 64 45 59 70

Freddie the Newsboy


Unit Sale Price Unit Purchase Cost Unit Salvage Value Data $2.50 $1.50 $0.50 Decis ion Variable 60 Sim ulation 55 55 $137.50 $90.00 $2.50 $50.00 Day 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 55 56 57 58 59 60

Order Quantity

Simulated Demand Demand (rounded) Sales Revenue Purchasing Cost Salvage Value Prof it

McGraw-Hill/Irwin

16.78

The McGraw-Hill Companies, Inc., 2003

Procedure for Fitting the Best Distribution to Data


1. Gather the data needed to identify the best distribution to enter into an assumption cell. 2. Enter the data into the spreadsheet containing your simulation model. 3. Select the cell that you want to define as an assumption cell that contains the distribution that best fits the data. 4. Choose Define Assumption from the Crystal Ball toolbar, which brings up the Distribution Gallery dialogue box. 5. Click the Fit button on the dialogue box, which brings up the Fit Distribution dialogue box. 6. Use the Range box in this dialogue box to enter the range of the historical data in your worksheet. 7. Click the Next button in the dialogue box, which brings up the Second Fit Distribution Dialogue box.
McGraw-Hill/Irwin

16.79

The McGraw-Hill Companies, Inc., 2003

Procedure for Fitting the Best Distribution to Data


8. Use this dialogue box to specify which continuous distributions are being considered for fitting. (Discrete distributions are not considered by this procedure.) 9. Also use this dialogue box to select which ranking method should be used to evaluate how well a distribution fits the data. (The default is the chi-square test.) 10. Click OK, which brings up the comparison chart that identifies the distribution (including its parameter values) that best fits the data.

11. If desired, the Next Distribution button can be clicked repeatedly for identifying the other types of distributions that are next in line for fitting the data well.
12. After choosing the distribution that you want to use, click the Accept button while that distribution is showing. This will enter the appropriate parameters into the dialogue box for this distribution. Clicking OK then enters this distribution into the assumption cell.

McGraw-Hill/Irwin

16.80

The McGraw-Hill Companies, Inc., 2003

The First Fit Distribution Dialogue Box

McGraw-Hill/Irwin

16.81

The McGraw-Hill Companies, Inc., 2003

The Second Fit Distribution Dialogue Box

McGraw-Hill/Irwin

16.82

The McGraw-Hill Companies, Inc., 2003

Comparison Chart Showing Best Fit

McGraw-Hill/Irwin

16.83

The McGraw-Hill Companies, Inc., 2003

Decision Making with Decision Tables


Many simulation models include at least one decision variable
Examples: Order quantity, Bid, Number of reservations to accept

Crystal Ball can be used to evaluate a particular value of the decision variable by providing a wealth of output for the forecast cells. However, this approach does not identify an optimal solution for the decision variable(s).

Trial and error can be used to try different values of the decision variable(s).
Run a simulation for each, and see which one provides the best estimate of the chosen measure of performance.

The Decision Table tool in Crystal Ball does this approach in a systematic way.

McGraw-Hill/Irwin

16.84

The McGraw-Hill Companies, Inc., 2003

Procedure for Defining a Decision Variable


1. Select the cell containing the decision variable. 2. If the cell does not already contain a value, enter any number into the cell.

3. Click on the Define Decision button in the Crystal Ball toolbar, which brings up the Define Decision Variable dialogue box.
4. Enter the lower and upper limit of the range of values to be simulated for the decision variable. 5. Click on either Continuous or Discrete to define the type of variable. 6. If Discrete is selected in Step 5, use the Step box to specify the difference between the successive possible values (not just those to be simulated). 7. Click on OK.

McGraw-Hill/Irwin

16.85

The McGraw-Hill Companies, Inc., 2003

Define Decision Variable Dialogue Box

McGraw-Hill/Irwin

16.86

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Target Cell

McGraw-Hill/Irwin

16.87

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Decision Variable(s) to Vary

McGraw-Hill/Irwin

16.88

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Options

McGraw-Hill/Irwin

16.89

The McGraw-Hill Companies, Inc., 2003

The Decision Table for Freddies Order Quantity

McGraw-Hill/Irwin

16.90

The McGraw-Hill Companies, Inc., 2003

Overlay Chart Comparing Order Quantities of 55 and 60

McGraw-Hill/Irwin

16.91

The McGraw-Hill Companies, Inc., 2003

Trend Chart for Freddies Order Quantity

McGraw-Hill/Irwin

16.92

The McGraw-Hill Companies, Inc., 2003

Decision Variable for Reliables Bidding Problem

McGraw-Hill/Irwin

16.93

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Target Cell

McGraw-Hill/Irwin

16.94

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Decision Variable

McGraw-Hill/Irwin

16.95

The McGraw-Hill Companies, Inc., 2003

Decision Table: Specify Options

McGraw-Hill/Irwin

16.96

The McGraw-Hill Companies, Inc., 2003

Decision Table for Reliables Bid

McGraw-Hill/Irwin

16.97

The McGraw-Hill Companies, Inc., 2003

Decision Table for Transcontinentals Reservations to Accept

McGraw-Hill/Irwin

16.98

The McGraw-Hill Companies, Inc., 2003

Trend Chart for Transcontinentals Reservations to Accept

McGraw-Hill/Irwin

16.99

The McGraw-Hill Companies, Inc., 2003

Optimizing with OptQuest


Crystal Ball includes a module called OptQuest that automatically searches for an optimal solution for a simulation model with any number of decision variables.

The search is conducted by executing a series of simulation runs of leading candidates to be the actual optimal solution.
The results of each run are used to determine the most promising remaining candidate to try next. A powerful search engine (based on genetic algorithms) conducts an intelligent and efficient search.

McGraw-Hill/Irwin

16.100

The McGraw-Hill Companies, Inc., 2003

Recommended Crystal Ball Run Preferences

McGraw-Hill/Irwin

16.101

The McGraw-Hill Companies, Inc., 2003

Recommended Crystal Ball Run Preferences

McGraw-Hill/Irwin

16.102

The McGraw-Hill Companies, Inc., 2003

Recommended Crystal Ball Run Preferences

McGraw-Hill/Irwin

16.103

The McGraw-Hill Companies, Inc., 2003

Procedure for Applying OptQuest


1. Formulate your simulation model on a spreadsheet. 2. Use Crystal Ball to complete your formulation by defining your assumption cells, forecast cells, and decision variables, as well as setting your run preferences. 3. Choose OptQuest from the Crystal Ball Tools menu and select New under the File menu. 4. Use the Decision Variable Selection dialogue box to select your decision variables. 5. 6. 7. 8. Use the Constraints dialogue box to specify your constraints (if any). Use the Forecast Selection dialogue box to specify the running time. Use the Options dialogue box to specify the running time. Select Start from the Run menu to run the optimization.

9. Choose Copy to Excel from the Edit menu to copy your results to your spreadsheet model.

McGraw-Hill/Irwin

16.104

The McGraw-Hill Companies, Inc., 2003

OptQuest for Freddies Problem: Selecting Variables and Specifying Constraints

McGraw-Hill/Irwin

16.105

The McGraw-Hill Companies, Inc., 2003

OptQuest for Freddies Problem: Specifying Objective and Running Time

McGraw-Hill/Irwin

16.106

The McGraw-Hill Companies, Inc., 2003

OptQuest Results for Freddies Problem

McGraw-Hill/Irwin

16.107

The McGraw-Hill Companies, Inc., 2003

Project Selection: Tazer Corp.


Tazer Corp., a pharmaceutical manufacturing company, is beginning the search for a breakthrough drug. The following five potential R&D projects have been identified:
Project Up: Develop a more effective antidepressant that does not cause serious mood swings. Project Stable: Develop a drug that addresses manic depression. Project Choice: Develop a less intrusive birth control method for women. Project Hope: Develop a vaccine to prevent HIV infection. Project Release: Develop a more effective drug to lower blood pressure.

$1.2 billion is available (enough for only two or three projects).

Question: Which projects should Tazer Corp. undertake?

McGraw-Hill/Irwin

16.108

The McGraw-Hill Companies, Inc., 2003

Data for Tazer Corp. Project Selection

Revenue ($millions) if Successful Project Up Stable Choice Hope R&D Investment ($millions) $400 300 600 500 Success Rate 50% 35 35 20 Mean $1,400 1,200 2,200 3,000 Standard Deviation $400 400 600 900

Release

200

45

600

200

McGraw-Hill/Irwin

16.109

The McGraw-Hill Companies, Inc., 2003

Spreadsheet Model for Applying Computer Simulation

A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Budget-Constrained Project Selection


R&D Investment ($millions) 400 300 600 500 200 0 <= 1,200 Estimated Revenue $millions if Successful (Normal Distribution) Mean St. Dev. 1,400 400 1,200 400 2,200 600 3,000 900 600 200

Project Up Stable Choice Hope Release Invested Budget

Success Rate 50% 35% 35% 20% 45%

Success? 0.5 0.35 0.35 0.2 0.45

Revenue ($millions) (if Successful) 1,400 1,200 2,200 3,000 600 Total profit ($millions)

Profit 0.00 0.00 0.00 0.00 0.00 0.00

Decisions 0 0 0 0 0

McGraw-Hill/Irwin

16.110

The McGraw-Hill Companies, Inc., 2003

Binary Decision Variables

McGraw-Hill/Irwin

16.111

The McGraw-Hill Companies, Inc., 2003

OptQuest for Tazers Project Selection: Selecting Variables and Specifying Constraints

McGraw-Hill/Irwin

16.112

The McGraw-Hill Companies, Inc., 2003

OptQuest for Freddies Problem: Specifying Objective and Running Time

McGraw-Hill/Irwin

16.113

The McGraw-Hill Companies, Inc., 2003

OptQuest Results for Tazers Project Selection

McGraw-Hill/Irwin

16.114

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Tazers Total Profit

McGraw-Hill/Irwin

16.115

The McGraw-Hill Companies, Inc., 2003

Maximizing Probability (Profit $100 million)

McGraw-Hill/Irwin

16.116

The McGraw-Hill Companies, Inc., 2003

Maximizing Probability (Profit $100 million)

McGraw-Hill/Irwin

16.117

The McGraw-Hill Companies, Inc., 2003

Frequency Chart for Tazers Project Selection

McGraw-Hill/Irwin

16.118

The McGraw-Hill Companies, Inc., 2003

Monte-Carlo Simulation with Crystal Ball


1. Setup Spreadsheet
Build a spreadsheet that will calculate the performance measure (e.g., profit) in terms of the inputs (random or not). For random inputs, just enter any number.

2. Define Assumptions (Random Variables)


Define which cells are random and what distributions they should follow.

3. Define Forecast (Output or Performance Measure)


Define which cell(s) you are interested in forecasting (typically the performance measure, e.g., profit).

4. Choose Number of Trials


Select the number of trials. If you would later like to generate the Sensitivity Analysis chart, choose Sensitivity Analysis under Options in Run Preferences.

5. Run Simulation
Run the simulation. If you would like to change parameters and re-run the simulation, you should reset the simulation (click on the Reset Simulation button on the toolbar or in the Run menu) first.

6. View Results
The forecast window showing the results of the simulation appears automatically after (or during) the simulation. Many different results are available (frequency chart, cumulative chart, statistics, percentiles, sensitivity analysis, and trend chart). The results can be copied into the worksheet.

McGraw-Hill/Irwin

16.119

The McGraw-Hill Companies, Inc., 2003

Def ine As sum ptio n Def ine D ecis io n Def ine F oreca st Select As sum ptions Select D ecis io ns Select F oreca s ts Copy D ata Past e D ata Clear D at a Run Pr eferenc es Start S im ulatio n Stop S imulat io n Res et S imulat io n Single St ep Foec as t W indo ws Overlay C hart Trend C hart Sensit iv it y Cha rt Creat e R eport Ext ract D ata Cry st al Ball He lp

McGraw-Hill/Irwin

The Crystal Ball Toolbar

16.120
The McGraw-Hill Companies, Inc., 2003

Freddie the Newsboy


Freddie runs a newsstand in a prominent downtown location of a major city. Freddie sells a variety of newspapers and magazines. The most expensive of the newspapers is the Financial Journal. Cost data for the Financial Journal:
Freddie pays $1.50 per copy delivered. Freddie charges $2.50 per copy. Freddies refund is $0.50 per unsold copy.

Sales data for the Financial Journal:


Freddie sells anywhere between 40 and 70 copies a day. The frequency of the numbers between 40 and 70 are roughly equal.

McGraw-Hill/Irwin

16.121

The McGraw-Hill Companies, Inc., 2003

Step #1 (Setup Spreadsheet)


A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 B C D E F

Freddie the Newsboy


Unit Sale Price Unit Purchase Cost Unit Salvage Value Data $2.50 $1.50 $0.50 Decis ion Variable 60 Sim ulation 55 55 $137.50 $90.00 $2.50 $50.00 Minimum 40 Maximum 70

Order Quantity

Simulated Demand Demand (rounded) Sales Revenue Purchasing Cost Salvage Value Prof it

Uniform

McGraw-Hill/Irwin

16.122

The McGraw-Hill Companies, Inc., 2003

Step #2 (Define Assumptions)


Select a cell that contains a random variable. Click on the Define Assumptions button in the toolbar (or in Cell menu):

Select the type of distribution. Provide the parameters of the distribution.

McGraw-Hill/Irwin

16.123

The McGraw-Hill Companies, Inc., 2003

Step #2 (Define Assumptions)

McGraw-Hill/Irwin

16.124

The McGraw-Hill Companies, Inc., 2003

Step #2 (Define Assumptions)

McGraw-Hill/Irwin

16.125

The McGraw-Hill Companies, Inc., 2003

Step #3 (Define Forecast)


Select the cell that contains the output variable to forecast. Click on the Define Forecast button in the toolbar (or in the Cell menu):

Fill in the Define Forecast dialogue box:

McGraw-Hill/Irwin

16.126

The McGraw-Hill Companies, Inc., 2003

Step #4 (Choose Number of Trials)


Click on the Run Preferences button in the toolbar (or in the Run menu):

Select the number of trials to run:

McGraw-Hill/Irwin

16.127

The McGraw-Hill Companies, Inc., 2003

Step #5 (Run Simulation)


Click on the Start Simulation button in the toolbar (or Run in the Run menu):

McGraw-Hill/Irwin

16.128

The McGraw-Hill Companies, Inc., 2003

Step #6 (View Results)


The results of the simulation can be viewed in a variety of different ways (frequency chart, cumulative chart, statistics, and percentiles). Choose different options under the View menu in the forecast window.

McGraw-Hill/Irwin

16.129

The McGraw-Hill Companies, Inc., 2003

Step #6 (View Results)


The results can be copied into a worksheet or Word document (choose Copy under the Edit menu in the simulation output window).

McGraw-Hill/Irwin

16.130

The McGraw-Hill Companies, Inc., 2003

Step #6 (View Results)

McGraw-Hill/Irwin

16.131

The McGraw-Hill Companies, Inc., 2003

Step #6 (View Results)

McGraw-Hill/Irwin

16.132

The McGraw-Hill Companies, Inc., 2003

Certainty that Profit $40

McGraw-Hill/Irwin

16.133

The McGraw-Hill Companies, Inc., 2003

Fitting a Distribution
Crystal Ball can be used to fit a distribution to data. The following data has been collected for the previous 100 phone calls to a mail-order house:
A 1 2 3 4 5 6 7 8 9 10 11 12 13 14 99 100 101 102 103 104 B C D E F G H I

Phone Data
Customer # 1 2 3 4 5 6 7 8 9 10 95 96 97 98 99 100 Arrival (minutes) 8.22 12.25 12.27 16.26 18.06 18.87 23.46 23.53 28.73 30.56 194.02 195.48 195.87 196.84 197.81 200.43 Interarrival Time 8.22 4.03 0.02 3.98 1.81 0.81 4.58 0.08 5.20 1.83 0.28 1.46 0.38 0.98 0.97 2.61 Length of Call (minutes) 3.77 4.53 4.04 3.70 5.38 4.36 4.41 5.14 4.76 4.68 4.26 3.37 4.45 5.06 5.20 4.25 Interarrival Time 2.004 Length of Call (minutes) 4.51

Averages

Simulation

McGraw-Hill/Irwin

16.134

The McGraw-Hill Companies, Inc., 2003

Using Crystal Ball to Fit Data to a Distribution


1. Select a spreadsheet cell for which you want to fit a distribution. 2. Choose Define Assumption.

3. Click the Fit button, then select the source of the fitted data.
4. Click the Next button, then select the distributions to try to fit. 5. Click OK.

McGraw-Hill/Irwin

16.135

The McGraw-Hill Companies, Inc., 2003

Best Fit for the Interarrival Time

McGraw-Hill/Irwin

16.136

The McGraw-Hill Companies, Inc., 2003

Best Fit for the Service Time

McGraw-Hill/Irwin

16.137

The McGraw-Hill Companies, Inc., 2003

You might also like