Professional Documents
Culture Documents
10C
CarnivalGameProject
Introduction
:
CarnivalgamesdatebacktotheroyalcourtsoftheRenaissance,wheretheyincluded
simplecardgames,tricks,andothersportsactivities.However,evenuntilthisday,carnival
gameshavehadonegoal:tomakemoney.Thatisexactlywhatthisgamewillbeaccomplish.
Thismultistagespinnergameissuretoturnaprofitaswellasprovideanexcitinggamefor
players.
Part1Description,Rules,andDirections
:
Thiscarnivalgameconsistsofa16wedgespinnerthatconsistsofoneludicrousspeed
(1stprize)space,tworidiculousspeed(2ndprize)spaces,threelightspeed(3rdprize)
spacesandtenplaidlosingspaces.Onthefirstspin,onlytheludicrousspeedspacewillwin.
Onthesecondspin,eitherofthetworidiculousspeedspaceswillwin.Onthethirdspin,anyof
thethreelightspeedspaceswillwin.Afterawinningspinorthreeconsecutivelosingspins,the
gameisoverandtheplayermustonceagainstartoutbyattemptingtolandonludicrousspeed
andsoon.Theplayerpaysasetamountofmoney($5)foreitherexactlythreespinsonthe
wheeloronewinningspin(whicheveroccursfirst).Iftheplayerwinsonthefirstspin(1outof16
spaceswin),hewins$20.Iftheplayerwinsonthesecondspin(2outof16spaceswin),he
wins$15.Iftheplayerwinsonthethirdspin(3outof16spaceswin),hewins$10.Otherwise,
theplayerlosesthe$5thathepaidtoplaythegame.
1
CorpelSheredaSuhr
10C
Figure1.PictureofSpinner
Part2TheoreticalProbability1(ProbabilityofWinning/Losing)
:
Therearefourpotentialoutcomesinthisgame:awinonthefirstspin(outcomeA),awin
onthesecondspin(outcomeB),awinonthethirdspin(outcomeC),andnowin(outcomeD).
Sinceonespaceonthesixteenspacedspinnerwinsonthefirstspin,P(A)=1/16or0.0625.
TheplayermustloseonthefirstspinandlandononeoftwospacesforoutcomeB,soP(B)can
becalculatedasshowninFigure2,below.
P(B)=(15/16)*(2/16)
P(B)=30/256
P(B) 0.1171875
Figure2.CalculationsforP(B)
Theplayermustloseonthefirsttwospinsandlandononeofthreespacesforoutcome
C,soP(C)canbecalculatedasshowninFigure3,below.
2
CorpelSheredaSuhr
10C
P(C)=(15/16)*(14/16)*(3/16)
P(C)=315/2048
P(C) 0.1538
Figure3.CalculationsforP(C)
Finally,theplayermustloseonallthreespinsforoutcomeD,soP(D)canbecalculated
asshowninFigure4,below.
P(D)=(15/16)*(14/16)*(13/16)
P(D)=1365/2048
P(D) 0.6665
Figure4.CalculationsforP(D)
AlloftheseoutcomesaredisplayedintheweightedtreediagraminFigure5,below.
3
CorpelSheredaSuhr
10C
Figure5.WeightedTreeDiagram
Part3TheoreticalProbability2(ExpectedValue)
:
Theexpectedvalueofthisgameistheexpectedprofitorlosspergameplayed.Thiscan
becalculatedbymultiplyingthenetprofitsoftheoutcomesbytheirrespectiveprobabilities(A,
B,C,andD)andaddingthesetotalsup.(Note:Thetheoreticalprobabilitiesusedtocalculate
expectedvalueareunchangeable,however,theycanandwillbechangedlaterinthispaper
withtheexperimentalprobabilitiestocalculateanexpectedvaluespecifictoacertain
simulationsresults).Inthisexamplehere,theexpectedvalueiscalculatedintheperspectiveof
theowner.
4
CorpelSheredaSuhr
10C
E(x)=15*P(A)+10*P(B)+5*P(C)+5*P(D)=465/1024 $0.45
Figure6.ExpectedValueCalculations
Thisvalueof0.45representstheamountofmoneygainedbytheownereachtimethey
playthegameinthelongrun.Thismeansthattheownerwillearnanaverageof45centsper
gameplayedovertime(inotherwords,theplayerofthegamewillloseanaverageof45cents
pergameovertime).
Part4RelativeFrequencies
:
a) Playthegamefor50trials
Afterthespinnerwasbuilt,itwasspunfor50trials.Whenthesetrialswere
conducted,therewere18winningtrialsoutofthe50(or32losingtrialsof50).11won
onthethirdspin,6wononthesecondspin,andonly1wononthefirstspin.The
experimentalprobabilityofwinningnothingiscalculatedtobe0.64,orslightlylessthan
thetheoreticalprobabilityofabout0.6665.Theexperimentalprobabilitiesofwinningon
thefirst,second,andthirdspinswouldthenbecalculatedas0.02,0.12,and0.22
respectively.Theexperimentalprobabilityofwinningonthefirstspinismuchlowerthan
itscorrespondingtheoreticalprobabilityof0.0625.Theprobabilitiesofwinningonthe
secondspin,bothexperimentalandtheoretical,areverysimilar,at0.12and0.1171875
respectively.Theexperimentalprobabilityofwinningonthethirdspinwasalotlarger
thanthetheoreticalprobabilityinthiscase,withtherespectiveprobabilitiesbeing0.22
and0.1538.Whentheexpectedvaluewascalculatedinthistrialrun,itwasfoundtobe
$0.60pergameprofitfortheownerovertime.Thiswouldgiveatotalofa$30profit
duringthis50gametrial.
5
CorpelSheredaSuhr
10C
b) Simulate500trials(calculator)
Toconductthe500trials,threecolumnsof500randomizednumbersfrom116
weregenerated(showninFigure7,below).Thenumberof1sinthefirstcolumnwere
thencountedaswins(1outof16wins)onthefirstspinresultingina$25prizebeing
awardedtotheplayer.Next,thesecondcolumnwassearchedforallofthe1sand2sto
becountedaswins(2outof16win)onthesecondspinresultingina$15prizebeing
awardedtotheplayer.However,ifthewinonthesecondspinwasaccompaniedbya
winonthefirstspin(a1appearinginthefirstcolumn)thenthesecondwinwasnot
countedastheplayersturnwouldhaveendedwiththefirstwin.Finally,thethe1s,2s,
and3sinthethirdcolumnwerecountedaswins(3outof16win)onthethirdspin
resultingina$10prizebeingawardedtotheplayer.Aswiththesecondspin,anywin
inthethirdcolumnwasnegatediftherewasawininthefirstcolumn(a1appearing)or
awininthesecondcolumn(eithera1or2appearing).Afterthesimulationwas
conducted,therewere169winnersoutofthe500players(or331losersoutof500
players).Thisyieldsaprobabilityofwinningnothingtobe0.662,orslightlylessthanthe
theoreticalprobabilityof0.6665.Ofthe169winners,31wononthefirstspin,54
wononthesecondspin,and84wononthethirdspin.Thesegiveprobabilitiesof
winningonthefirst,second,andthirdspinstobe0.062,0.108,and0.168respectively.
Theexperimentalprobabilityofwinningonthefirstspin(0.062)wasnearlyidenticalto
thetheoreticalprobabilityof0.0625.Theexperimentalprobabilityofwinningonthe
secondspin,however,wasabitlowerthanthetheoreticalprobability(0.108and
0.1171875respectively).Theoppositecanbesaidfortheprobabilitiesofwinningonthe
thirdspin,astheexperimentalprobabilitywasslightlyhigherthanthetheoretical
6
CorpelSheredaSuhr
10C
probability(0.168and0.1538respectively).Theexperimentalexpectedvalueinthis
simulationwascalculatedtobe$0.46gainedpergamebytheowner.Thiswillgivethe
gameowneraprofitof$230fromthis500gamesimulation.
Figure7.SimulationsOnaCalculation
c)Simulate5000(JavaProgram)
First,5wasaddedtothebalance,whichstartedat0.Theoccurrencesof
outcomesA,B,C,andDwerealsosetto0.Then,arandomdecimalnumberbetween0
and1wasgenerated.IfthegeneratednumberwaslessthanP(A),1/16,thenthe
occurrencesofoutcomeAwasincreasedby1.Ifnot,thegeneratednumberwas
comparedtoseeifitwaslessthanP(A)+P(B),13/128,andtheoccurrencesofoutcome
7
CorpelSheredaSuhr
10C
Bwasincreasedby1.Ifnot,thegeneratednumberwascheckedtoseeifitwasless
thanP(A)+P(B)+P(C),683/2048,andifitwastheoccurrencesofoutcomeCwas
increasedby1.Ifnoneoftheprecedingconditionsweremet,thentheoccurrencesof
outcomeDwasincreasedby1.Thisprocesswaslooped5000tosimulate5000trials.
Afterward,theprogramremoved20timestheoccurrencesofA,15timesthe
occurrencesofB,and10timestheoccurrencesofCfromthebalance.Theoccurrences
ofeachoutcomewasthenreturnedalongwiththebalance.RefertotheAppendixfora
moreindepthandtechnicalexplanationoftheprogram.
Figure8.ValuesReturnedbytheJavaprogram.
Figure8,above,showstheresultsoftheJavasimulation.Thefirstnumberisthe
occurrencesofA,thesecondistheoccurrencesofB,thethirdistheoccurrencesofC,
thesecondtolastistheoccurrencesofD,andthelastisthefinalbalance.Inthisrunof
thesimulation,Aoccurred340,soitsrelativeprobabilityiscalculatedasfollows.
P(A)=340/5000
P(A)=17/250
P(A)=0.068
Figure9.MathfortheRelativeFrequencyofA.
8
CorpelSheredaSuhr
10C
TherelativeprobabilityofAisslightlyhigherthanthetheoreticalprobabilityofA,
0.0625,comingouttobe0.0055higherthanthetheoreticalprobability,slightlymore
thanhalfofapercent.Boccurred580timesinthisrunofthesimulation,soitsrelative
probabilityiscalculatedasfollows:
P(B)=580/5000
P(B)=29/250
P(B)=0.116
Figure10.MathfortheRelativeFrequencyofB.
TherelativeprobabilityofBisslightlylowerthanthetheoreticalprobabilityofB,
around0.1172,comingouttoberoughly0.0012lower,slightlymorethanatenthofa
percent.Coccurred751timesinthisrunofthesimulation,soitsrelativeprobabilityis
calculatedasfollows:
P(C)=751/5000
P(C)=0.1502
Figure11.MathfortheRelativeFrequencyofC.
TherelativeprobabilityofCisslightlylowerthanitstheoreticalprobability,
around0.1538,comingoutotberoughly0.0036lower,oraroundathirdofapercent.D
occurred3329timesinthisrunofthesimulation,soitsrelativeprobabilityiscalculated
asfollows:
P(D)=3329/5000
9
CorpelSheredaSuhr
10C
P(D)=0.6658
Figure12.MathfortheRelativeFrequencyofD
TherelativeprobabilityofDisjustbarelylowerthanitstheoreticalprobability,
around0.6665,comingoutotberoughly0.0007lower,notevenatenthofapercent.
Theexpectedvalueacross5000trialsis5000timestheexpectedvalueofasingle
game,whichcomestoberoughly$2270.51.Thisisafairbithigherthantheobserved
valueinthissimulation,$1990,around$180.51higherthantheobservedvalue.
Expectedvaluecanbecalculatedbasedontherelativeprobabilitiesfoundbasedoffof
thissimulation,andwouldbedoneasfollows.
E($)=15*0.068+10*0.116+5*0.1502+5*0.6658
E($)=1.02+1.16+0.751+3.329
E($)=0.398
Figure13.MathfortheExpectedValuebasedonRelativeFrequenciesofthe
Simulation.
Thisexpectedvalueisafairbitlowerthanthetheoreticalexpectedvalueofthe
game,almostaround0.052less,rightaround5cents.Thismeans5centslessisbeing
madeoneveryplaywithinthesimulationthanintheoreticalplaysofthegame.
d)Compare/ContrastSimulations
Whilethesimulationsdidnotallhaveexactlythesameexpectedvalue,theyallstill
returnedpositive,andnotdrasticallyfarfromthetheoreticalexpectedvalue.Somewhat
surprisingly,ahighertrialcountdidnotcorrespondtoanexpectedvalueclosertothe
10
CorpelSheredaSuhr
10C
theoreticalexpectedvalue.Infact,thethesimulationwith500trialswassignificantly
closertothetheoreticalexpectedvaluethanthesimulationwith5000trials,being
roughly0.04closertothetheoreticalexpectedvalue.Thiscanlikelybeattributedto
unintentionallyweightedrandomnumbergenerators.Theindividualprobabilitiesof
outcomeswasmostlyconsistentthroughoutsimulationsandtheory.
Part5Summary
:
Overall,thiscarnivalgameisnotonlyamoneymakerbutalsoanenticinggameforthe
player.Whenplayingthegameaplayercanalwaystrytogetbackatleastdoubletheirmoneyif
theywin.Withtheabilitytowinthreetimesandtheirchanceofwinningincreasingwithevery
spintheycaneasilybesuckedintothegame,evenifitistrulynotintheiradvantage.People
playingthisgamewilloftenbetrickedintobelievingthesocalledlawofaverages.Thismay
makethembelievethatbecausetheyhavealreadylost1or2spinstheyaredueforawinon
their2ndor3rdspin.Theuseofonemultitierspinningsystemreallyplaysintopeople'sbeliefin
thelawofaveragesandwillconvincepeopletocontinueplayingthegameeveniftheyhave
consistentlybeenlosingthegame.However,ifonlyplayingthegameafewtimes,thereisstilla
goodchancetheplayerwillemergeawinneratleastonce,promptingthemtokeepchasing
anotherwinevenifdoingsowillactuallymakethemlosemoney.
Usingtheoreticalprobabilityitwasexpectedthat,onaverage,everygamewouldyield
theowner$0.45.Actuallyplayingthegamefor50trialsprovidedapergameprofitaverageof
$0.60,slightlyhigherthanthetheoreticalprobabilityof$0.45.Runningacalculatorsimulation
for500trialsyieldedanexpectedvalueof$0.46gainedpergamebytheowner,almostidentical
tothetheoreticalprobability.RunningaJavasimulationfor5000trialsgaveanexpectedvalue
of$0.398,lowerthanthetheoreticalexpectedvalue.Thisisapositivenetgainforthegame
11
CorpelSheredaSuhr
10C
ownersinallcasesandtheexpectedvaluewasquiteconsistentbetweenthetheoreticaland
experimentalprobabilities.
Inaddition,allthreeofthegroupmembersparticipatedgreatlythroughouttheproject.
Thethoughtprocessandinitialideaswereallcollectivewithallthreemembersgivinginputuntil
theideawasfinalized.Everyonealsohelpedbuildthegame.Francoiswroteaconsiderable
chunkofthepaper,butbothBostonandJacobwrotetheirownconsiderableamounts.TheJava
programwascreatedbyBostonandsimulationsusingthetinspirecalculatorwererunby
Francois.
12
CorpelSheredaSuhr
10C
Appendix
Figure14.TheExactCodeUsedintheJavaSimulation.
InFigure14,above,theveryfirstlineisusedtoimportthepackageusedtogeneratea
randomdecimal.Lines3and4areusedtomakesureJavacanruntheprogram,anddonot
influencethesimulation.Lines6through10areusedtoinitiateanddefinevariables,allbeing
definedatzero.Balancecorrespondstothenetchangeinthebalanceofwhoeverisrunningthe
game,firstcorrespondstohowmanytimesAoccurred,secondcorrespondstohowmanytimes
Boccurred,thirdcorrespondstohowmanytimesCoccurred,andnonecorrespondstohow
manytimesDoccurred.Line12tellsthesimulationtorun5000timesbyinitiatingthevariablei
as0,checkingifiislessthan5000,andadding1toieverytimeitfinishesrunningthroughthe
simulation.Line14simulateschargingtheplayer$5byadding5tobalance.Line16generates
therandomdecimalandsavesittothevariablespin.Lines18through21areusedtocheckthe
13
CorpelSheredaSuhr
10C
valueofspinandincreasetheoutcomeoccurrencevariablesasdescribedinthemainsection.
Line25isusedtoremovetherewardsfrombalancebymultiplyinganoutcomesworthbyits
totaloccurrencesandsubtractingthatnumberfrombalance.Line27printsfirst,second,third,
none,andbalancetotheconsoleafterthesimulationhasended.
14
CorpelSheredaSuhr
10C
WorksCited
Geuss,Megan."TeslaAddsludicrousModetoModelS,NowGoes0to60in2.8Seconds."
ArsTechnica
.CondNast,17July2015.Web.16Mar.2016.
<http://arstechnica.com/cars/2015/07/teslaaddsludicrousmodetomodelsnowgoes0
to60in28seconds/>.
Gross,Jason."11ThingsWeWantToSeeInSpaceballs2:TheSearchForMoreMoney."
UnderScoopFireRSS
.UnderScoopFire,n.d.Web.16Mar.2016.
<http://underscoopfire.com/spaceballs2searchformoremoney/>.
McIntyre,Drew."TowardsSchismatLudicrousSpeed."
DrewMcIntyrePlowsharesInto
Swords
.WordPress,22May2014.Web.16Mar.2016.
<http://drewbmcintyre.com/2014/05/22/towardsschismatludicrousspeed/>.
15