Professional Documents
Culture Documents
Carnival Game Project Paper
Carnival Game Project Paper
Egg-celent Adventure
To play the game, the player must pay two dollars. There are three stages, the first bin has
30 eggs and 10 of those eggs have balls inside them, getting one lets you move on to the next
stage. There is a 1/3 chance of winning four dollars on this stage. The next stage has a bin with
36 eggs and 6 eggs with a ball inside them lets the player get to the last stage. There is a 1/6
chance of winning six dollars on this stage. Finally, the last stage is a final bin with 30 eggs and
10 eggs with a ball inside them and there is the prize of nine dollars for picking a correct egg.
There is a 1/10 chance of winning nine dollars on this stage. However, in the case of a loss, the
2. Look to bin one and pick one egg, if there is a ball in the egg, then move on to the next
round, if the egg is empty, then please accept the loss and leave or try again.
3. If the player wins round one, look to bin two and pick one egg, if there is a ball in the
egg, then move on to the next round, if there is no ball then please accept the loss and
leave or try again. The player may keep whatever money they have won from previous
rounds.
4. If the player wins round two, look to bin three and pick one egg, if the egg has a ball
inside it, then move on to the next round, if the egg has no ball, then please accept the
loss and leave or try again. The player may keep whatever money they have won from
previous rounds.
The figure above shows all of the possible outcomes and there probabilities. The
probability of losing two dollars is 2/3. The probability of winning two dollars is 5/18. The
probability of winning four dollars is 1/20. The probability of winning nine dollars is 1/180. The
overall probability of winning is 91/180 whereas the overall probability of losing is 89/180.
Tree Diagram:
The tree diagram above depicts the possible outcomes for the stages of this game. The
fractions represent the possibility of that specific outcome. Only one branch continues as it is not
possible to play the next the next round after losing the previous one. The sample space below
relates to the figure above, as it list all the possible outcomes before payment for right to play,
Guzak - Lay 3
except for the outcome of losing two dollars. The outcomes represent the net gain after cost of
right to play.
Table 1.
Sample Space For Figure Two
Lose $2 Win $4 Win $6 Win $9
The sample space displays the values of currency that can be won before the cost for right
of play. The one exception being the loss of two dollars if the wrong egg is picked.
Table 2
Probability Distribution
$ Outcomes 7 4 2 -2
The expected value, for this paper, represents the average amount of money gained or lost
on average for every time this game is played. The net value for the player is found using
expected value, taking the probability of an outcome and multiplying by the values associated
with said outcome. Finally, the sum of all the products is found to calculate the expected value.
The calculated value came out to be a net loss of about 54 cents. This means the game is not fair,
as the negative says that the player loses 54 cents every time he/she plays the game, on average.
Table 3
Relative Frequencies Table
Stage One Wins Stage Two Wins Stage Three Wins
The expected value, for this paper, represents the average amount of money gained or lost
on average for specifically this simulation. The net value for the player is found using expected
value, taking the probability of an outcome and multiplying by the relative frequencies
associated with said outcome. Finally, the sum of all the products is found to calculate the
expected value. The calculated value came out to be a net loss of about 36 cents. This means the
game is not fair, as the negative says that the player loses 36 cents every time he/she plays the
game, on average.
The calculations were drawn out as a figure rather than a table as a table would not tell
the whole story as the products are rather random on their own. The multiplication helps to
The relative frequency for winning in stage one came out to be 19/50. Simplified, 19/50
is 0.38 and the actual value, 1/3 or 0.3333 repeating, is rather bigger than its theoretical value.
The average money gained or lost can be found by taking the two outcomes, multiplying by the
experimental values and adding them together. So, this means the player is losing 48 cents every
The relative frequency for winning in stage two came out to be 8/25. Simplified, 8/25 is
0.32 and the actual value, 1/6 or 0.1666 repeating, is actually way larger than its theoretical
value. The average money gain/loss was about $ 2.64. So, this means the player is keeping at
least $ 2.64 every time they play the second stage of this game, on average because the only time
The relative frequency for winning in stage three came out to be 0/3. Simplified, 0/3 is 0,
and the actual value, 1/10 or 0.1000, is actually significantly lower than its theoretical value. The
average money gain/loss was about $ 4.00. So, this means the player is keeping at least $ 4.00
Guzak - Lay 6
every time they play the third stage of this game, on average because the only time to lose their
Simulation 2: Ti-nspire
This will be simulated by running 500 random numbers. The random numbers will be
generated between 1 to 3. What constitutes a trial is a randomly generated number. The numbers
have meaning, and they correlate to different outcomes. If a 1 is generated it means the player
has won the first stage and gets four dollars, if they lose it means they must pay two dollars. For
every 1 generated, a trial will be ran. The numbers will be generated between 1 to 6. What
constitutes a trial is a randomly generated number. These numbers will have a meaning and
correlate to a new outcome. If a 1 is generated, the player has won the second stage and gets six
dollars, if you get a 2-6 they have lost and gets to keep the four dollars from the first stage.
Finally, for every 1 generated from the second stage, another trial will need to be ran. The
numbers will be generated between 1 to 180. What constitutes a trial is a randomly generated
number. These numbers will have a meaning and correlate to an outcome. If a 1 is generated, the
player has won the third stage and the player will get nine dollars, if they get a 2-10 they have
lost and get to keep the six dollars from the second stage.
The relative frequency for winning in stage one came out to be 165/500. Simplified,
165/500 is 0.33 and the actual value, 1/3 or 0.3333 repeating, is very close to its theoretical
value. The average money gained or lost can be found by taking the two outcomes, multiplying
Guzak - Lay 7
by the experimental values and adding them together. So, this means the player is losing 68 cents
every time they play the first stage of this game, on average.
The relative frequency for winning in stage two came out to be 28/165. Simplified,
28/165 is 0.169 repeating, and the actual value, 1/6 or 0.1666 repeating, is actually higher than
its theoretical value. The average money gain/loss was about $ 1.32. So, this means the player is
keeping at least $ 1.32 every time they play the second stage of this game, on average because
The relative frequency for winning in stage three came out to be 2/28. Simplified, 2/28 is
0.0714, and the actual value, 1/10 or 0.1000, is actually significantly lower than its theoretical
value. The average money gain/loss was about $ 4.21. So, this means the player is keeping at
least $ 4.21 every time they play the third stage of this game, on average because the only time to
Simulation 3: Java
The Java code simulation was ran for 5000 trials and each stage recorded every win from
each round. The first stage was the only part of the game to have all 5000 trials ran as the amount
of trials for the next stage depends on the number of wins before hand.
In the first stage, there were 1641 winning trials out of 5000. 1641/5000 is equal to
0.3282, which is smaller, but rather close to 1/3 or 0.3333 repeating, the theoretical value. The
average gain/loss per trial is found by finding the experimental expected value, using the
outcome times the relative frequency. So, this means the player is losing at about -0.69 cents
every time they play the first stage of this game, on average because the only time to lose their
In the second stage, there were 1641 trials and of those trials there were 257 winning
trials. 257/1641 is equal to 0.1566, which is smaller, but close to 1/6 or 0.1666 repeating, the
theoretical value. The average gain/loss per trial is found again using the same form of
calculations as stage one. So, this means the player is keeping/winning $ 2.31 every time they
play the second stage of this game, on average because the only time to lose their money is in the
first stage.
In the third stage, there were 257 trials and of those trials there were 20 winning trials.
20/257 is equal to 0.0778, which is significantly smaller, than 1/10 or 0.1000, the theoretical
value. The average gain/loss per trial is found again using the same form of calculations as stage
Guzak - Lay 9
one. So, this means the player is keeping/winning $ 4.23 every time they play the third stage of
this game, on average because the only time to lose their money is in the first stage.
V. Summary
This game would be a fantastic addition to any carnival as the game is in favor of the
operator and the easter theme is very eye catching this time of year. The game is unfair with an
expected value of -0.5338 or roughly -0.54, which is good. The meaning behind -0.54 is that on
average, the cost to play this game for the player is about 54 cents per game. Since it cost 54
cents on average for a player to play this game, it is unfair as the player is losing that 54 cents
every time he/she plays this game. This is a huge selling point for the game as it means
guaranteed money for the operator, meaning money for the carnivals owner. The game gets
interesting as the stages progress as the chance of winning decreases after every stage.
differs noticeably in certain areas, however in other areas, the probabilities seemed rather equal.
In the first stage there was a 1/3 chance of winning stage one and both the Java simulation (0.33)
and the calculator simulation (0.3282) are rather close to the theoretical value. The Java
simulation ran 5000 trials and was the closest value out of the two experimental values to the
theoretical value. This is most likely due to the Law of Large Numbers, which states that “as the
number of trials increases, the relative frequencies approach the theoretical probabilities”.
Because 5000 is greater than 500, it makes logical sense that Java would have the more reliable
experimental value. The experimental probability for simulation one of this stage was 0.38 or
38% chance. Out of the fifty times this stage was reached, there was a total of nineteen
successes. This means that there was about a one third chance of getting the prize of stage three
Guzak - Lay 10
in simulation one. The average loss of money for the player per trial was about the same for the
Java simulation (69 cents) and the calculator simulation (68 cents). This was not the case
however for the first simulation as the player only lost 48 cents on average.This was the lowest
value and it might have had something to do with the experimental value being less than that of
Next, is the theoretical value of the second stage. In the second stage there was a 1/6
chance of winning and the experimental values for stage two turned out to be 0.1566 for the Java
simulation and 0.169 repeating for the calculator simulation. To note, there was only 1641 trials
for the Java simulation by the second stage and 165 trials for the calculator simulation,
respectively. This is due to the amount of winning trials in the stage prior, as the experimental
values would be incorrect had the trial continued on after a loss. This time the calculator had the
closer value to the theoretical value. There is nothing to really suggest that the calculators
experimental value should be greater than the Javas experimental value, as the Java simulation
had 1476 more trials than the calculator simulations. If anything, the Law of Large Numbers
should say that because there was a greater number of trials for the Java simulation, the java
experimental value should be closer to the theoretical values than the calculator. The
experimental probability for simulation one of this stage was 0.1579 or 15.79% chance. Out of
the nineteen times this stage was reached, there was a total of three successes. This means that
there was little chance of getting the prize of stage two in simulation one. The players gained
only $ 2.32 for Java simulation and $ 2.64 for the first simulation. These seemed to be close
enough to each other to be considered non-significant. However, the calculator simulation tells a
different story only playing out $ 1.32. This was the lowest value and it may have had something
to do with the experimental value being less than that of the theoretical value.
Guzak - Lay 11
Finally was the third stage, in the third stage there was a 1/10 chance of winning and the
experimental values were 0.0778 and 0.0714 for the Java and calculator simulations,
respectively. The Java simulation had only 20 trials, as that was how many wins there had been
in the stage prior. As for the calculator simulation, there was only 28 for the previous stages
wins. Even though the Java simulation and calculator simulation trials differed by 8 full trials,
there experimental were very close to each other and much smaller than the theoretical value.
This is due to the Law of Large Numbers, as previously stated “as the number of trials increases,
the relative frequencies approach the theoretical probabilities”, so if the numbers were small,
then the relative frequencies would not be close to the theoretical probabilities, thus the two
experimental values are much smaller than the theoretical. The experimental probability for
simulation one of this stage was 0.00 or 0% chance. Out of the three times this stage was
reached, there was a total of zero successes. This means that there was no chance of getting the
prize of stage three in simulation one. The average gain of money for the player at this round ws
$ 4.23 for the Java simulation, $ 4.21 for the calculation simulation and $ 4 on the dot for the
first simulation. The first simulation was the lowest of the three values because the experimental
values was 0 for one of the two probabilities. Since probabilities must add to 1 the only option
This is the end of the project, I personally want to thank my partner Alex. As this was a
three person project and if given the option to work with only one other person I would have
picked him over anyone else, as he has demonstrated to me hard work, help, and fantastic
partnership skills. Brendon has shown tremendous amount of hard work in this project. With the
workload that we had we took care of it like champs. The paper, besides part one and three, was
mostly done by Brendon. Alex took care of the building of the game while Brendon helped to
Guzak - Lay 12
design it. Overall the workload was split as evenly as possible with both of us doing our best
work.
Appendix A
3/18/18
*/
import TerminalIO.KeyboardReader;
import java.text.DecimalFormat;
class carnival {
do{
a = (int)(3*Math.random() + 1);
System.out.print(a);
i = i+1;
if(a == 1) w = w+1;
}while (i != 5000);
System.out.print("\n");
System.out.print("\n");
System.out.print("\n");
do{
b = (int)(6*Math.random() + 1);
System.out.print(b);
j = j+1;
if(b == 1) w2 = w2+1;
}while (j != w);
Guzak - Lay 14
System.out.print("\n");
System.out.print("\n");
System.out.print("\n");
do{
c = (int)(10*Math.random() + 1);
System.out.print(c);
k = k+1;
if(c == 1) w3 = w3+1;
}while (k != w2);
System.out.print("\n");
System.out.print("\n");