Monte Carlo Simulation to mimic a slot machine
//////////////////////////////////////
Objectives:
     1) understand related statistics
     2) apply the Excel randbetween() function 
     3) learn to link picture to a cell and 
     4) using the vlookup() function to search a table of pictures 

Task #1: A simple case with just three numbers
     Assume that we have three objects: apple, banana and eggplant, see below. 
 
    We enter three numbers and try to output three corresponding fruits by using the Excel vlookup() function. 
 
   Q1: What is the probability of winning, defined as matching three?
   Q2: Assume the cost of one play is $1, what is the winning price if this is a fair game ?
   Q3: What is the expected value, if the cost of one play is $1 and our winning price is $7?


Task #2: Design a slot machine with 3 objects with pictures. 
   Step 1: generate the following entries. 
           Below, we use C16 for apple as an example. Searching online 
           to find a apple image. Right click the picture of apple, then choose  format picture . 
 	 
   Step 2: we manually enter three numbers in cells B3, C3 and D3, 
           Our objective is to search our picture table (fruit pictures) 
           to output corresponding three fruits. In this case, we expect 
           to see apple, apple and banana.
 
   Step 3: Click cell C16 (not apple but the cell), copy, then select 
           our destination cell, i.e., F3, then from Paste link to choose 
           "Lined Picture (I)", see the right image below. 
 	 
    Step 4: Click "Formula", "Define Name", see below, where X will 
            be our image column, i.e., C16:C18, Y is our indicator, B3, 
            Z is our number columns, i.e., B16:B18. Below, we define a 
            name called firstNumber.  
 	 
    Step 5: Click picture in F3 and we replace =$C$16 with =firstNumber 
           (or other name you defined), see the right image above. Repeat 
           the same procedure for other two cells. 

 Task 3: Build a slot machine with 10 different fruits and assume that 
         the machine would have a slight advantage to the owner of the 
         machine, such as for 1 million plays, the casino would have a profit of $100. 

  Q4: What is the winning price if we have three same pictures?
  Q5:  What is your result after playing 100 times? 

  References 
      http://en.wikipedia.org/wiki/Slot_machine

//////////////////////////////////////