Hello guys, I need some help on my AP CS class assignment.(adsbygoogle = window.adsbygoogle || []).push({});

The assignment is as follows:

"Write a program that uses the Monte Carlo sampling method to estimate the average number of bottles of Boost someone would have to drink to win a prize. There is a one in five chance that a bottle cap will have a prize.

*Determine how many times a die must be rolled in order to win a prize. (This represents one

trial.)

*Calculate the average number of times a die must be rolled in order to win a prize "

I am OK with the programming aspect of the assignment, I just need to get the concept of how Monte Carlos will be set up in this case. As far as I know, in Monte Carlos you have to approximate a range of values (min, max) for the uncertain parameters, then iteratively run the "simulation" substituting random numbers within the specified range in place of the uncertain parameters. How will the model be represented in this case? Any help is appreciated. :)

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Monte Carlo method

Loading...

Similar Threads - Monte Carlo method | Date |
---|---|

Monte Carlo Calculation of π | Mar 17, 2017 |

How to obtain a function from gsl library integration? | Nov 6, 2015 |

Free Energy calculation in Monte Carlo simulations | Apr 11, 2012 |

Calculating pi with Monte Carlo integration | Mar 29, 2012 |

Use of Monte Carlo Method to Solve Geometrical Problems in Radiation Transfer | Jan 11, 2010 |

**Physics Forums - The Fusion of Science and Community**