Sei sulla pagina 1di 7

Intro to Monte Carlo Simulation Lab

Rolling Dice using @RISK


v1.0 by Andrew Lucchesi, Spring 01!

Section 1: Intro to Monte Carlo Simulation and @RISK Summary " #he core idea o$ Monte Carlo methods is to use random samples o$ parameters %or inputs& to e'plore the behavior o$ a comple' system or process. #hese simulations are ideal $or situations involving uncertainty in many dimensions that are too comple' $or an analytical solution. (Monte Carlo simulation per$orms ris) analysis by building models o$ possible results by substituting a range o$ values*a probability distribution*$or any $actor that has inherent uncertainty. It then calculates results over and over, each time using a di$$erent set o$ random values $rom the probability $unctions. +epending upon the number o$ uncertainties and the ranges speci$ied $or them, a Monte Carlo simulation could involve thousands or tens o$ thousands o$ recalculations be$ore it is complete. Monte Carlo simulation produces distributions o$ possible outcome values. ( ,-alisade .or a better idea on how the Monte Carlo Method compares to using a -oint /stimate, watch the video below0 http011www.youtube.com1watch2v3r4oar5e6shs 78IS9 is an /'cel plug,in that allows you to create your model in a spreadsheet, running the simulation through the plug,in. #here are other Monte Carlo /'cel plug,ins, which are similar to 78IS9 as well as separate so$tware all together $or Monte Carlo simulation, however, you can download 78IS9 $or a $ree wee) trial, and get a student version $or only :;00 http011www.palisade.com1academic1students.asp

Section 2: Rolling a die with @RISK In this beginner lab we will be using a tool $or Monte Carlo called 78IS9. 4e<re going to roll a die multiple times and loo) at the distribution o$ the outcomes $rom rolling that die. #here are = sides, all e>ually li)ely to occur. #hat ma)es this an integer with a

uni$orm distribution. #his will hope$ully ma)e you $eel a little more com$ortable managing the 78IS9 ribbon and its $unctionalities. Step 10 Launch 78IS9 . Clic)ing on the icon %shown below& will bring up a spreadsheet in /'cel with the ribbon loaded %also below&.

Step 0 Construct your spreadsheet. .ill out the spreadsheet li)e mine %below&. #his is the shell o$ our model.

Step !0 Create the $irst distribution. ?o to the @Insert .unction@ dropdown. 4e want a discrete distribution. .or this %while the bo' ne't to +ie1 is selected& select @+iscrete@ and then @8is)Init5ni$orm@ on the ne't menu down. I$ you hover over the di$$erent options it will give you a short summary on what they<re used $or. %In$ormation about a $ew o$ these distributions and their uses can be $ound at http011www.palisade.com1ris)1monteAcarloAsimulation.asp.&

Step B0 Choose parameters.#he minimum will be 1 and the ma'imum will be = %remember it<s a die weCre modeling&. Dou can name the bo' i$ you choose. Eotice the $ormula that is now in the cell is (38is)Int5ni$orm%1, =&@.

Step ;0 Identi$y the outcome cell. .or this $irst e'ample it will Fust be the result $rom rolling that one die. Select the cell ne't to (Gutcome1H and enter %in my case& (3CBH or whatever cell that holds the distribution you made earlier for Die1 . 4ith the cell selected go to the (Insert .unctionH dropdown and select @Gutput@ ,I @8is)Gutput.@ A .unctions Arguments bo' will come up that as)s i$ youwould li)e to enter in a Eame, 8ange name, and position in range. %#hese are optional, so I<m leaving them blan) and selecting G9.&

Step =0 Choose your iterations. Dour bo' should now have (3yourcell%$or me CB&J8is)Gutput%&H .inally, letCs change the iterations %or number o$ times we will simulate rolling the die& to ;000 $rom the dropdown bo' .

Step 60 SimulateK Select (Start SimulationH and it will run the simulation once %with ;000 rolls, or replications&. A window should pop up ne't to the outcome cell displaying them uni$ormly between 1 and =. Ee't to the graph, on the side bar, all sorts o$ good data will be there, including the mean, standard deviation, variance, and so $orth.

Section 3: Rolling 2 die Eow what i$ we want to roll li)e2 die, add the results, and see what that outcome would loo)

Step 10 Create the same properties $or +ie as we did previously $or die 1. #o do that letCs Fust drag +ie 1 to +ie to copy it %it will automatically rename it $or that cell&. Step 0 Create your outcome cell. In the Gutcome cell add the two cells ne't to +ie1 and +ie (3yourcell$or+ie1%$or me CB& J yourcell$or+ie %$or me C;&.H Eow we will need to indicate the output cell the same way we did earlier but in the cell ne't to Gutcome %Input .unction, Gutput, 8is)Gutput&. Step !0 8un the simulationK Dou should now have an output chart depicting a normal distribution $rom adding these random variables. #his again shows the shape, mean %in this case 6&, standard variation, and so on.

Section 4: Conclusion 8olling a die ;000 times through the simulation proved that it<s Fust as li)ely to land on 1 as it is , !, B, ;, or = %assuming there<s nothing wrong with the die o$ course&. Lowever $or rolling die ;000 times, we see the probability o$ every number that could be e>ualed in the != di$$erent combinations o$ dice rolls.

#his picture shows the probability o$ a particular outcome. .or e'ample, there are si' di$$erent ways that the dice could sum to seven, so the probability o$ rolling seven is e>ual to =1!=3.1=6. Instead o$ doing it that way manually, the Monte Carlo simulated throwing dice ;000 times. 4ith more comple' models you could see how this could be

help$ulK In dealing with uncertainty in many directions, this can help Fudge di$$erent possible scenarios and ris)s, optimiMing ris) management in decision ma)ing.

References: +r. Nim ?rayson http011www.goldsim.com14eb1Introduction1-robabilistic1MonteCarlo1 http011www.palisade.com1ris)1monteAcarloAsimulation.asp http011www.solver.com1monte,carlo,simulation,overview

Potrebbero piacerti anche