Winning Prizes with Monte Carlo Method

  • Thread starter Thread starter computerex
  • Start date Start date
  • Tags Tags
    Method Monte carlo
Click For Summary

Discussion Overview

The discussion revolves around the application of the Monte Carlo method to estimate the average number of bottles of Boost someone would need to drink to win a prize, given a one in five chance of winning with each bottle cap. Participants explore how to set up the Monte Carlo simulation for this specific problem, focusing on the conceptual framework rather than programming details.

Discussion Character

  • Exploratory
  • Technical explanation
  • Homework-related

Main Points Raised

  • One participant seeks clarification on how to represent the Monte Carlo model for their assignment, specifically regarding the setup of uncertain parameters and the simulation process.
  • Another participant draws an analogy to the game of battleship to illustrate the Monte Carlo method, suggesting that random sampling can help determine likely outcomes based on algorithms.
  • A further contribution mentions the need to simulate the process of buying Boost until winning a prize, indicating that this would involve repeating trials to calculate an average.

Areas of Agreement / Disagreement

Participants appear to agree on the basic concept of using Monte Carlo simulations for the problem, but there are varying interpretations of how to implement the model and the specifics of the simulation process.

Contextual Notes

There are no explicit assumptions or limitations discussed, but the conversation suggests a need for clarity on the representation of uncertain parameters and the iterative nature of the simulation.

Who May Find This Useful

This discussion may be useful for students or individuals interested in applying the Monte Carlo method to practical problems, particularly in the context of probability and simulations.

computerex
Messages
68
Reaction score
0
Hello guys, I need some help on my AP CS class assignment.
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. :)
 
Technology news on Phys.org
If you keep providing hints, maybe I could help you.


The Monte Carlo method can be illustrated as a game of battleship. First a player makes some random shots. Next the player applies algorithms (i.e. a battleship is four dots in the vertical or horizontal direction). Finally based on the outcome of the random sampling and the algorithm the player can determine the likely locations of the other player's ships.

http://en.wikipedia.org/wiki/Monte_Carlo_method
 
In the battleship game reference I posted, there would be two arrays, one for each player.

Code:
double rgPlayerValuesA[nRows][nCols] = { 0.0 };
double rgPlayerValuesB[nRows][nCols] = { 0.0 };
 
Simulate process of buying Boost till you win the prize - that will give you a number of bottles in one trial. Repeat and claculate average. Nothing more fancy.
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
Replies
67
Views
8K
Replies
6
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
1
Views
1K
Replies
1
Views
2K
Replies
4
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K