How to simulate slot machines winnings on excel ? Randbetween or whatif function ??

yys0501

New Member
Joined
Sep 4, 2017
Messages
7
[TABLE="width: 574"]
<tbody>[TR]
[TD="class: xl65, width: 574"]Slot machine has three identical reels, each reel with spots for 64 images. These include cherry, plum, melon, ace, bar, bell, diamond, lemon, gold coins, orange, and seven. After inserting one or more dollar coins, the gambler pulls the handle and the reels spin. The machine displays three images, one from each reel, when the reels stop spinning. Depending on the counts of certain images displayed and the bet inserted, the machine gives in return nothing, some coins, or an overflowing payoff.

a. Construct a spreadsheet model to simulate the slot machine. Assume in each reel,
there are 4 cherry, 4 plum, 4 melon, 5 ace, 5 bar, 7 bell, 7 diamond, 7 lemon, 7 gold
coins, 7 orange and 7 seven images, all randomly arranged.
b. For every $1 inserted, the payoff for 1 cherry image is $2, 2 cherry images gives
$5, and 3 cherry images gives $10; 2 plum images gives $20, 3 plum images gives $30; and 2 melon images gives $40 and 3 melon images gives $60. What is the net balance after 28 pulls when the initial is $100 and bets are all $1 each?
c. How do you handle more complex payoff conditions? For example, a set of 1 gold coins, 1 diamond and 1 melon images to pay out $150 per dollar bet.



[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Assign each of the images a number between 1-64 and use randbetween(1,64) to generate each of the 3 reels. A simple function can display the fruit or even tweak it to pull up an image

Code:
Public Function ReelImage(reelNumber As Single) As String    Select Case reelNumber
        Case 1 To 4
            ReelImage = "CHERRY"
        Case 5 To 8
            ReelImage = "PLUM"
        Case 9 To 12
            ReelImage = "MELON"
            
            'ETC ETC
        
            
        Case Else
            ReelImage = "SEVEN"
            
    End Select
End Function


Code:
=REELiMAGE(RANDBETWEEN(1,64))

will then display whatever fruit in a cell

The rest is just basic probabilities, you have 4 cherries in 64 images so the probability of a cherry in reel 1 is 4 in 64 i.e. 1 in 16 probability of cherry in reels 2 & also 1 in 16. Probability of a cherry in any line is 3 reels * 1/16 =3 *1/16. They'll be plenty of examples of how to calculate probabilities on the net , look for probabilities of rolling consecutive dice etc and look at how say situations of two cherries can occur cherry plum cherry, plum cherry cherry, cherry cherry plum so it's not simply 1/16*1/16
 
Last edited:
Upvote 0
May I suggest we let these students learn themselves and not provide answers to their homework... If they get stuck, maybe a nudge, but not provide answers...

CN.
 
Upvote 0
May I suggest we let these students learn themselves and not provide answers to their homework... If they get stuck, maybe a nudge, but not provide answers...

CN.
I'm with you on that
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top