 # Simulation Programming and Analysis

## How confident are you about uncertainty?

Simulations programming can be used to find mathematical problems that cannot easily be solved. The profit distribution of your business is one good example.

## Monte Carlo Simulation Programming

A Monte Carlo algorithm is often used to find solutions to mathematical problems (which may have many variables) that cannot be easily solved. This Monte Carlo simulation section illustrates two examples of how Excel VBA can be utilized for building simulation models, specifically in hydraulic engineering and market analysis.

## Monte Carlo Simulation Example (1)

The hydraulic engineering simulation project utilized Pearson Type III distribution. Provided the mean, standard deviation, skewness, and other inputs, the discharge-frequency curve with 95% confidence interval uncertainty bans is constructed. The screen shot is shown on Figure 1. below.

Fig 1. Screen shot of the hydraulic simulation project ## Monte Carlo Simulation Example (2)

This model is taken from our XL Modeling VBA program. Given the market assumption, profit equation, and input variables distributions (uniform, normal, and truncate normal), we derived the probability distribution of the profit and generate the histogram.

From the probability distribution, we can obtain the probability of the profit that excesses any given number of value. We can also obtain the median and average of the profit from the distribution.

Fig 2. Screen shot of the profit/market simulation program 