Return to Index
Operations Research Models and Methods
 
Computation Section
Subunit Functions
 - Simulation

The simulation method uses the Monte Carlo technique to generate samples and uses descriptive statistics to estimate the moments. Although the method is quite different than the enumeration method, the forms used in the two cases are similar. To create a model for the simulation choose Add Function from the menu. Information required for the model is the same, except the Max,Min and Interval fields are neglected and the Simulation button is checked.

 
 

The form constructed by the add-in is shown below. The first row of the form shows the name and analysis method. The random variables are defined next in rows 2 through 5. The Binomial distribution describes a discrete random variable and has two parameters, the number of trials, n, and the probability of a success, p. The random variable is the number of successes in 5 trials and can assume the values of 0 through 5.

 
 

Rows 6 through 9 hold information used in the simulation process. . The analyst should enter the names of the variables in row 6. Row 7 holds random numbers generated by the add-in using the Excel built-in random number generator. The initial form has 0.5 for all entries in this row. Row 8 holds the inverse probability function provided by the add-in. The RV_Inverse function returns the smallest value of the random variable whose cumulative distribution value is greater than or equal to the random number immediately above the function. This operation is equivalent to Monte Carlo simulation.

Rows 9 through 16 hold information regarding the functions and the results of the analysis. The names of the output variables should be placed in row 9. The maroon cells in row 10 are for the formulas that compute the functions to be analyzed. Rows 12 through 16 will hold the results of the analysis with rows 12 and 13 holding the mean and variance. Row 14 holds the number of simulated values used in the statistical estimates of the moments. Row 16 holds the two-sided confidence interval for the sample mean. The confidence level in B15 can be changed to find different confidence intervals.

The figure below shows the functions used by the example. Excel equations implementing these functions are in row 10 of the simulation form.

The figure below shows the form with random numbers in row 7. The values in row 8 are simulated from these numbers using the Monte Carlo method.

 
  To begin the simulation we choose Moments from the menu. The dialog below accepts the name of the form to be analyzed, the number of simulation iterations and the calculation option.
 
  After 100 simulated observations, the results are placed on the form.
 
  The results can be compared to the accurate moments found with the enumeration method.
 
  A simulation using 1000 observations yields more accurate results as indicated by the smaller confidence interval.
 

 

Other Distributions

 

The Monte Carlo technique is the same for both discrete and continuous random variables. No additional approximation is required. The results below are an example using a variety of distributions. We present the enumeration results below the simulation results for comparison.

 

 

Form for Both Simulation and Enumeration

 

When constructing the function form, the add-in provides an option to construct a form that handles both enumeration and simulation. This might be handy for comparing the results for the two methods on the same functions. This form for the example is shown below.

 
  The analysis method is chosen on the Moments dialog. Both methods are available for this form.
 
 

The results of a simulation analysis are below. The Lower Limit, Upper Limit, Interval and the three Probability rows are irrelevant for the simulation analysis.

 
  The results of the enumeration analysis are shown below. The Rand., Sample Size and Confidence Interval rows are irrelevant for this analysis.
 

 

Simulation Statistics

 

The moment estimates from the simulation are obtained with descriptive statistics.

The confidence interval formula is based on the Central Limit Theorem. We use the standard Normal distribution rather than the t-distribution because the sample size is usually very large for simulation analyses.

 

Comparing Simulation and Enumeration

 

Although both the simulation and enumeration methods have the goal of finding the moments of functions of random variables, the process used for the two methods are quite different. For discrete distributions enumeration will yield accurate answers. For continuous distributions the results are approximate, but no measure of accuracy is available. For problems with few random variables with a small integer range, enumeration is no doubt the best choice. For larger problems the curse of dimensionality will probably make this analysis impractical.

Simulation always provides results subject to statistical variability. Every simulation analysis draws samples from the random variable distributions and computes statistical moments of the function evaluation. Two simulations of a system will have different results. Partially moderating this disadvantage is the availability of a confidence interval on the sample mean. This provides a reliability measure. The confidence interval decreases as the sample size grows. Unfortunately the interval is proportional to the inverse of the square root of the sample size. Increasing the sample size from 100 to 1000 decreases the width of the interval (assuming the same sample variance) by a factor of the square root of 10. The curse of dimensionality really does not hold for simulation, because the analyst can simply select the number of simulation iterations. But the accuracy of the results is severally impacted for small sample sizes.

Both methods will have a place in the analyst's tool box and we illustrate several applications on these pages and throughout this web site.

 
  
Return to Top

tree roots

Operations Research Models and Methods
Internet
by Paul A. Jensen
Copyright 2004 - All rights reserved