
This week in Google Developer Live Israel, we show you how to work with Google App script to run Monte Carlo simulations and get the results in an excellent informative way inside Google spreadsheets. We took it further and explained how to run these scripts on your instance machine inside Compute Engine with nodeJS.
This is a powerful option because the ability to ‘try’ quickly on App Script and then take the code to ‘production’ (=more efficient way) on Compute engine gives you more productivity.
So what are we doing?
First, let’s touch on the definition. This problem-solving technique approximates the probability of specific outcomes by running multiple trial runs, called simulations, using random input variables. The remarkable aspect is that we are steering the scenarios by using randomness.The randomness helps us ‘try’ each future strategy in a way that includes our probability per variable. This allows us to fine-tune our trial runs to answer a question with several variables. It will help us find the best way to spend time with our salesperson.
Monte Carlo Simulations Steps
1. Define a model with a domain of possible inputs.
2. Generate input values randomly, sampling from a probability distribution over the domain.
3. Perform a deterministic computation on the inputs.
4. Aggregate the results. Continue reading →
Share only with good friends: