Sunday 6 May 2007

Monte Carlo

When I first heard of Monte Carlo in my job, I was thinking: "What? What does electronics gotta do with casino and gambling?" Mmm... interesting. Well, it turned out that I was not going to learn any gambling skills from my job, but it's all about statistical modeling to estimate the distribution of dependent Y's values e.g. standby drain current, product reliability, performance & etc. You might question: why we bother about using Monte Carlo simulation? Because there is always a certain extent of uncertainties in real world, we tried our best effort to model the risks involved and make proper decision based on the data available. Instead of using single point estimate of "Most likely" value which could lead to disaster, we could use Monte Carlo simulation results to paint the big picture of the probability distribution.

So, how does it work out basically? Firstly, we would need to define the problem that we try to solve and model the system involved. So, what is a model exactly? It basically consists of a number of inputs (independent X's), the intended output (dependent Y to be studied) and the system itself which is characterized by a transfer function. For example, it could be tolerances for various components to determine to reliability of final product output.



Then, we would need to assign some assumptions to the X's factors (well, we gotta make sure the assumptions are valid, else we ain't get anything meaningful from the result); in turn, appropriate statistical distribution would be allocated for each independent X's. Thirdly, the engine would generate random values for each X's based on the assumptions entered, and the value Y would be computed. The third steps would be repeated for tens of thousands times (the more repetition the better, as it could resemble more closely to real world probability distribution with minimizing of noise with a larger samples). Then, histogram, mean and standard deviation for the value Y could be generated accordingly. The result could be something like this:




The Monte Carlo simulation engine that I have is built-in with the CrystalBall software that my company purchased. Anyway, I believe that if one doesn't bother the hassle to build the Monte Carlo engine him/herself, the Excel spreasheet should be suffice for a simple home-brew version. The same engine could be used for forecasting sales figure or risk management in financial market trading purposes.

1 comment:

Serina Bay said...

wow magnificant ideas summarize perfectly, please post more ideas online. i like it.