roulette_simulation
    
    
    
      roulette_simulation,
      a MATLAB code which
      simulates the spinning of a roulette wheel and the evaluation of
      certain common roulette bets.
    
    
      A fair wheel would have 36 pockets; a European wheel has an extra "0"
      pocket, while a Las Vegas wheel has "0" and "00" pockets.  Pockets
      "0" and "00" are in general losers for the player.  Players can bet
      on a single number, red or black, odd or even, low or high, 
      column 1, 2 or 3, or more complicated bets.  The payoffs are computed
      as though there were no 0 pockets, so this gives the house a 
      considerable edge.
    
    
      Licensing:
    
    
      The information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      roulette_simulation is available in
      a MATLAB version and
      an Octave version and
      a Python version.
    
    
      Related Data and codes:
    
    
      
      roulette_simulation_test
    
    
      
      matlab_simulation,
      a MATLAB code which
      uses simulation to study card games, contests, and other processes
      which have a random element.  Usually, the purpose is to try to
      predict the average behavior of the system over many trials.
    
    
      Reference:
    
    
      
        - 
          Nick Berry,
          Roulette Wheel,
          https://datagenetics.com/blog/july12015/index.html
          Posted 01 July 2015.
         
      
    
    
      Source Code:
    
    
      
        - 
          bet_black.m, 
          returns the pockets involved in a bet on black.
        
 
        - 
          bet_column1.m, 
          returns the pockets involved in a bet on column 1.
        
 
        - 
          bet_column2.m, 
          returns the pockets involved in a bet on column 2.
        
 
        - 
          bet_column3.m, 
          returns the pockets involved in a bet on column3.
        
 
        - 
          bet_even.m, 
          returns the pockets involved in a bet on even.
        
 
        - 
          bet_high.m, 
          returns the pockets involved in a bet on high.
        
 
        - 
          bet_low.m, 
          returns the pockets involved in a bet on low.
        
 
        - 
          bet_low.m, 
          returns the pockets involved in a bet on low.
        
 
        - 
          bet_red.m, 
          returns the pockets involved in a bet on red.
        
 
        - 
          i4vec_print.m,
          prints an I4VEC.
        
 
        - 
          i4vec_sorted_unique_hist.m,
          given a sorted list of integers, returns the number of unique values,
          the unique values, and the frequency with which each value occurred.
        
 
        - 
          i4vec_uniform_ab.m,
          returns a pseudorandom I4VEC in a given range;
        
 
        - 
          i4vec2_print.m,
          prints a pair of I4VECs.
        
 
        - 
          roulette_result.m,
          returns the result of N spins of a roulette wheel.
        
 
        - 
          roulette_value.m,
          given the result of N spins of a roulette wheel,
          the size of the user's bet, and the number of pockets bet,
          returns the value of each spin.
        
 
      
    
    
    
      Last revised on 07 March 2019.