Spinning Wheel Gambling
Experiments, events, probability spaces[edit]
The technical processes of a game stand for experiments that generate aleatory events. Here are a few examples:
The games found at Spin Casino are among the best in the business. Created by industry experts, and packed full of payout potential, Spin Casino players in Canada will have a huge advantage when signing up to play, as this will grant instant access to a prolific variety of casino games that include online slots, roulette and blackjack games, just to mention a few. Nevertheless, the great gambler now faces a spinning wheel that might stop anywhere. › The Back Half #29: Unforgotten / Sweetener / The Fugitive Chris Deerin is the New Statesman 's Scotland editor.
- Throwing the dice in craps is an experiment that generates events such as occurrences of certain numbers on the dice, obtaining a certain sum of the shown numbers, and obtaining numbers with certain properties (less than a specific number, higher than a specific number, even, uneven, and so on). The sample space of such an experiment is {1, 2, 3, 4, 5, 6} for rolling one die or {(1, 1), (1, 2), ..., (1, 6), (2, 1), (2, 2), ..., (2, 6), ..., (6, 1), (6, 2), ..., (6, 6)} for rolling two dice. The latter is a set of ordered pairs and counts 6 x 6 = 36 elements. The events can be identified with sets, namely parts of the sample space. For example, the event occurrence of an even number is represented by the following set in the experiment of rolling one die: {2, 4, 6}.
- Spinning the roulette wheel is an experiment whose generated events could be the occurrence of a certain number, of a certain color or a certain property of the numbers (low, high, even, uneven, from a certain row or column, and so on). The sample space of the experiment involving spinning the roulette wheel is the set of numbers the roulette holds: {1, 2, 3, ..., 36, 0, 00} for the American roulette, or {1, 2, 3, ..., 36, 0} for the European. The event occurrence of a red number is represented by the set {1, 3, 5, 7, 9, 12, 14, 16, 18, 19, 21, 23, 25, 27, 30, 32, 34, 36}. These are the numbers inscribed in red on the roulette wheel and table.
- Dealing cards in blackjack is an experiment that generates events such as the occurrence of a certain card or value as the first card dealt, obtaining a certain total of points from the first two cards dealt, exceeding 21 points from the first three cards dealt, and so on. In card games we encounter many types of experiments and categories of events. Each type of experiment has its own sample space. For example, the experiment of dealing the first card to the first player has as its sample space the set of all 52 cards (or 104, if played with two decks). The experiment of dealing the second card to the first player has as its sample space the set of all 52 cards (or 104), less the first card dealt. The experiment of dealing the first two cards to the first player has as its sample space a set of ordered pairs, namely all the 2-size arrangements of cards from the 52 (or 104). In a game with one player, the event the player is dealt a card of 10 points as the first dealt card is represented by the set of cards {10♠, 10♣, 10♥, 10♦, J♠, J♣, J♥, J♦, Q♠, Q♣, Q♥, Q♦, K♠, K♣, K♥, K♦}. The event the player is dealt a total of five points from the first two dealt cards is represented by the set of 2-size combinations of card values {(A, 4), (2, 3)}, which in fact counts 4 x 4 + 4 x 4 = 32 combinations of cards (as value and symbol).
- In 6/49 lottery, the experiment of drawing six numbers from the 49 generates events such as drawing six specific numbers, drawing five numbers from six specific numbers, drawing four numbers from six specific numbers, drawing at least one number from a certain group of numbers, etc. The sample space here is the set of all 6-size combinations of numbers from the 49.
- In draw poker, the experiment of dealing the initial five card hands generates events such as dealing at least one certain card to a specific player, dealing a pair to at least two players, dealing four identical symbols to at least one player, and so on. The sample space in this case is the set of all 5-card combinations from the 52 (or the deck used).
- Dealing two cards to a player who has discarded two cards is another experiment whose sample space is now the set of all 2-card combinations from the 52, less the cards seen by the observer who solves the probability problem. For example, if you are in play in the above situation and want to figure out some odds regarding your hand, the sample space you should consider is the set of all 2-card combinations from the 52, less the three cards you hold and less the two cards you discarded. This sample space counts the 2-size combinations from 47.
The probability model[edit]
A probability model starts from an experiment and a mathematical structure attached to that experiment, namely the space (field) of events. The event is the main unit probability theory works on. In gambling, there are many categories of events, all of which can be textually predefined. In the previous examples of gambling experiments we saw some of the events that experiments generate. They are a minute part of all possible events, which in fact is theset of all parts of the sample space.
For a specific game, the various types of events can be:
- Events related to your own play or to opponents’ play;
- Events related to one person’s play or to several persons’ play;
- Immediate events or long-shot events.
Each category can be further divided into several other subcategories, depending on the game referred to. These events can be literally defined, but it must be done very carefully when framing a probability problem. From a mathematical point of view, the events are nothing more than subsets and the space of events is a Boolean algebra. Among these events, we find elementary and compound events, exclusive and nonexclusive events, and independent and non-independent events.
In the experiment of rolling a die:
- Event {3, 5} (whose literal definition is occurrence of 3 or 5) is compound because {3, 5}= {3} U {5};
- Events {1}, {2}, {3}, {4}, {5}, {6} are elementary;
- Events {3, 5} and {4} are incompatible orexclusive because their intersection is empty; that is, they cannot occur simultaneously;
- Events {1, 2, 5} and {2, 5} are nonexclusive, because their intersection is not empty;
- In the experiment of rolling two dice one after another, the events obtaining 3 on the first die and obtaining 5 on the second die are independent because the occurrence of the second event is not influenced by the occurrence of the first, and vice versa.
In the experiment of dealing the pocket cards in Texas Hold’em Poker:
- The event of dealing (3♣, 3♦) to a player is an elementary event;
- The event of dealing two 3’s to a player is compound because is the union of events (3♣, 3♠), (3♣, 3♥), (3♣, 3♦), (3♠, 3♥), (3♠, 3♦) and (3♥, 3♦);
- The events player 1 is dealt a pair of kings and player 2 is dealt a pair of kings are nonexclusive (they can both occur);
- The events player 1 is dealt two connectors of hearts higher than J and player 2 is dealt two connectors of hearts higher than J are exclusive (only one can occur);
- The events player 1 is dealt (7, K) and player 2 is dealt (4, Q) are non-independent (the occurrence of the second depends on the occurrence of the first, while the same deck is in use).
These are a few examples of gambling events, whose properties of compoundness, exclusiveness and independency are easily observable. Theseproperties are very important in practical probability calculus.
The complete mathematical model is given by the probability field attached to the experiment, which is the triple sample space—field of events—probability function. For any game of chance, the probability model is of the simplest type—the sample space is finite, the space of events is the set of parts of the sample space, implicitly finite, too, and the probability function is given by the definition of probability on a finite space of events:
Combinations[edit]
Games of chance are also good examples of combinations, permutations and arrangements, which are met at every step: combinations of cards in a player’s hand, on the table or expected in any card game; combinations of numbers when rolling several dice once; combinations of numbers in lottery and bingo; combinations of symbols in slots; permutations and arrangements in a race to be bet on, and the like. Combinatorial calculus is an important part of gambling probability applications. In games of chance, most of the gambling probability calculus in which we use the classical definition of probability reverts to counting combinations. The gaming events can be identified with sets, which often are sets of combinations. Thus, we can identify an event with a combination.
For example, in a five draw poker game, the event at least one player holds a four of a kind formation can be identified with the set of all combinations of (xxxxy) type, where x and y are distinct values of cards. This set has 13C(4,4)(52-4)=624 combinations. Possible combinations are (3♠ 3♣ 3♥ 3♦ J♣) or (7♠ 7♣ 7♥ 7♦ 2♣). These can be identified with elementary events that the event to be measured consists of.
Expectation and strategy[edit]
Games of chance are not merely pure applications of probability calculus and gaming situations are not just isolated events whose numerical probability is well established through mathematical methods; they are also games whose progress is influenced by human action. In gambling, the human element has a striking character. The player is not only interested in the mathematical probability of the various gaming events, but he or she has expectations from the games while a major interaction exists. To obtain favorable results from this interaction, gamblers take into account all possible information, including statistics, to build gaming strategies. The oldest and most common betting system is the martingale, or doubling-up, system on even-money bets, in which bets are doubled progressively after each loss until a win occurs. This system probably dates back to the invention of the roulette wheel. Two other well-known systems, also based on even-money bets, are the d’Alembert system (based on theorems of the French mathematician Jean Le Rond d’Alembert), in which the player increases his bets by one unit after each loss but decreases it by one unit after each win, and the Labouchere system (devised by the British politician Henry Du Pré Labouchere, although the basis for it was invented by the 18th-century French philosopher Marie-Jean-Antoine-Nicolas de Caritat, marquis de Condorcet), in which the player increases or decreases his bets according to a certain combination of numbers chosen in advance.[1][2] The predicted average gain or loss is called expectation or expected value and is the sum of the probability of each possible outcome of the experiment multiplied by its payoff (value). Thus, it represents the average amount one expects to win per bet if bets with identical odds are repeated many times. A game or situation in which the expected value for the player is zero (no net gain nor loss) is called a fair game. The attribute fair refers not to the technical process of the game, but to the chance balance house (bank)–player.
Even though the randomness inherent in games of chance would seem to ensure their fairness (at least with respect to the players around a table—shuffling a deck or spinning a wheel do not favor any player except if they are fraudulent), gamblers always search and wait for irregularities in this randomness that will allow them to win. It has been mathematically proved that, in ideal conditions of randomness, and with negative expectation, no long-run regular winning is possible for players of games of chance. Most gamblers accept this premise, but still work on strategies to make them win either in the short term or over the long run.
House advantage or edge[edit]
Casino games provide a predictable long-term advantage to the casino, or 'house' while offering the player the possibility of a large short-term payout. Some casino games have a skill element, where the player makes decisions; such games are called 'random with a tactical element.' While it is possible through skillful play to minimize the house advantage, it is extremely rare that a player has sufficient skill to completely eliminate his inherent long-term disadvantage (the house edge or house vigorish) in a casino game. The common belief is that such a skill set would involve years of training, extraordinary memory, and numeracy, and/or acute visual or even aural observation, as in the case of wheel clocking in Roulette. For more examples see Advantage gambling.
The player's disadvantage is a result of the casino not paying winning wagers according to the game's 'true odds', which are the payouts that would be expected considering the odds of a wager either winning or losing. For example, if a game is played by wagering on the number that would result from the roll of one die, true odds would be 5 times the amount wagered since there is a 1/6 probability of any single number appearing. However, the casino may only pay 4 times the amount wagered for a winning wager.
The house edge (HE) or vigorish is defined as the casino profit expressed as a percentage of the player's original bet. In games such as Blackjack or Spanish 21, the final bet may be several times the original bet, if the player doubles or splits.
Example: In American Roulette, there are two zeroes and 36 non-zero numbers (18 red and 18 black). If a player bets $1 on red, his chance of winning $1 is therefore 18/38 and his chance of losing $1 (or winning -$1) is 20/38.
The player's expected value, EV = (18/38 x 1) + (20/38 x -1) = 18/38 - 20/38 = -2/38 = -5.26%. Therefore, the house edge is 5.26%. After 10 rounds, play $1 per round, the average house profit will be 10 x $1 x 5.26% = $0.53.Of course, it is not possible for the casino to win exactly 53 cents; this figure is the average casino profit from each player if it had millions of players each betting 10 rounds at $1 per round.
The house edge of casino games varies greatly with the game. Keno can have house edges up to 25% and slot machines can have up to 15%, while most Australian Pontoon games have house edges between 0.3% and 0.4%.
The calculation of the Roulette house edge was a trivial exercise; for other games, this is not usually the case. Combinatorial analysis and/or computer simulation is necessary to complete the task.
In games that have a skill element, such as Blackjack or Spanish 21, the house edge is defined as the house advantage from optimal play (without the use of advanced techniques such as card counting or shuffle tracking), on the first hand of the shoe (the container that holds the cards). The set of the optimal plays for all possible hands is known as 'basic strategy' and is highly dependent on the specific rules, and even the number of decks used. Good Blackjack and Spanish 21 games have to house edges below 0.5%.
Online slot games often have a published Return to Player (RTP) percentage that determines the theoretical house edge. Some software developers choose to publish the RTP of their slot games while others do not.[3] Despite the set-theoretical RTP, almost any outcome is possible in the short term.[4]
Standard deviation[edit]
The luck factor in a casino game is quantified using standard deviation (SD). The standard deviation of a simple game like Roulette can be simply calculated because of the binomial distribution of successes (assuming a result of 1 unit for a win, and 0 units for a loss). For the binomial distribution, SD is equal to , where is the number of rounds played, is the probability of winning, and is the probability of losing. Furthermore, if we flat bet at 10 units per round instead of 1 unit, the range of possible outcomes increases 10 fold. Therefore, SD for Roulette even-money bet is equal to , where is the flat bet per round, is the number of rounds, , and .
After enough large number of rounds the theoretical distribution of the total win converges to the normal distribution, giving a good possibility to forecast the possible win or loss. For example, after 100 rounds at $1 per round, the standard deviation of the win (equally of the loss) will be . After 100 rounds, the expected loss will be .
The 3 sigma range is six times the standard deviation: three above the mean, and three below. Therefore, after 100 rounds betting $1 per round, the result will very probably be somewhere between and , i.e., between -$34 and $24. There is still a ca. 1 to 400 chance that the result will be not in this range, i.e. either the win will exceed $24, or the loss will exceed $34.
The standard deviation for the even-money Roulette bet is one of the lowest out of all casinos games. Most games, particularly slots, have extremely high standard deviations. As the size of the potential payouts increase, so does the standard deviation.
Unfortunately, the above considerations for small numbers of rounds are incorrect, because the distribution is far from normal. Moreover, the results of more volatile games usually converge to the normal distribution much more slowly, therefore much more huge number of rounds are required for that.
As the number of rounds increases, eventually, the expected loss will exceed the standard deviation, many times over. From the formula, we can see the standard deviation is proportional to the square root of the number of rounds played, while the expected loss is proportional to the number of rounds played. As the number of rounds increases, the expected loss increases at a much faster rate. This is why it is practically impossible for a gambler to win in the long term (if they don't have an edge). It is the high ratio of short-term standard deviation to expected loss that fools gamblers into thinking that they can win.
The volatility index (VI) is defined as the standard deviation for one round, betting one unit. Therefore, the VI for the even-money American Roulette bet is .
The variance is defined as the square of the VI. Therefore, the variance of the even-money American Roulette bet is ca. 0.249, which is extremely low for a casino game. The variance for Blackjack is ca. 1.2, which is still low compared to the variances of electronic gaming machines (EGMs).
Additionally, the term of the volatility index based on some confidence intervals are used. Usually, it is based on the 90% confidence interval. The volatility index for the 90% confidence interval is ca. 1.645 times as the 'usual' volatility index that relates to the ca. 68.27% confidence interval.
It is important for a casino to know both the house edge and volatility index for all of their games. The house edge tells them what kind of profit they will make as percentage of turnover, and the volatility index tells them how much they need in the way of cash reserves. The mathematicians and computer programmers that do this kind of work are called gaming mathematicians and gaming analysts. Casinos do not have in-house expertise in this field, so they outsource their requirements to experts in the gaming analysis field.
See also[edit]
References[edit]
- ^'Roulette'. britannica.
- ^'D'Alembert roulette system'.
- ^'Online slots Return to Player (RTP) explained - GamblersFever'.
- ^'Return to Player and Hit frequency - What do these mean? - GetGamblingFacts'.
Further reading[edit]
- The Mathematics of Gambling, by Edward Thorp, ISBN0-89746-019-7
- The Theory of Gambling and Statistical Logic, Revised Edition, by Richard Epstein, ISBN0-12-240761-X
- The Mathematics of Games and Gambling, Second Edition, by Edward Packel, ISBN0-88385-646-8
- Probability Guide to Gambling: The Mathematics of Dice, Slots, Roulette, Baccarat, Blackjack, Poker, Lottery and Sport Bets, by Catalin Barboianu, ISBN973-87520-3-5excerpts
- Luck, Logic, and White Lies: The Mathematics of Games, by Jörg Bewersdorff, ISBN1-56881-210-8introduction.
External links[edit]
Gambling Simulation
A simple gambling simulation program is easy to write. Even a simple program is fun to play with, but a more sophisticated program is more fun.
The Internet now offers the possibility of gambling on-line, with 'real money'. The software for this system is quite sophisticated. There are several issues/problems involved:
- What are the rules of the game being simulated (the exact rules)?
- How can the game be represented inside the computer?
- How can the user-interface be created (start with a highly simplified version)?
- How can the game be connected to an E-cash system?
- How can a larger casino system be created from many games?
- How can multi-player games be created using a server?
- How can the simulation be made more realistic, to increase the fun (animation, 3D, sounds)?
Top-Level Design (tasks)
Here is a list of tasks to be performed by an on-line roulette simulation:
- Log-in (user identifies themselves)
- Give user 'chips' (money) to start with
- User places bet(s)
- Spin the wheel
- video simulation of spinning wheel (happens at the client)
- generate random result(s) (happens at the server)
- coordinate server and client by transmitting data - Decide whether the user wins or loses
- Pay winnings or deduct losses
Low-Level Design (modules)
Here is a list of useful modules to solve problems in an on-line roulette program:
- User-ID verification
- Roulette-wheel animation
- Matching red/black to numbers
- Secure communication system for client/server exchanges
- Background graphics and sound routines (e.g. chips 'clunking' onto the table)
- E-payment system
Useful Standard Functions (Java)
Random Numbers: int number = rand(0,36) -- choose a random number between 1 and 36
Grouping Numbers: group = number / 3 -- integer division, returns a whole number result
Even or Odd : result = group % 2 -- this result is 0 for even, 1 for odd numbers
importjava.awt.*;
publicclassRouletteextendsEasyApp
{publicstaticvoidmain(String[]args)
{
newRoulette();
}
LabellMoney=addLabel('Money',40,40,60,30,this);
TextFieldtMoney=addTextField(',100,40,100,30,this);
ButtonbBet=addButton('Bet',40,70,80,30,this);
ButtonbSpin=addButton('Spin',120,70,80,30,this);
TextFieldtBet=addTextField(',40,100,80,40,this);
TextFieldtChoice=addTextField(',40,140,80,40,this);
TextFieldtNumber=addTextField(',120,100,80,80,this);
intmoney=1000;
intbet=0;
intbetting=0;
Stringchoice=';
publicvoidactions(Objectsource,Stringcommand)
{
if(sourcebBet)
{makeBet();}
elseif(sourcebSpin)
{spin();}
}
publicRoulette()
{
setTitle('Raging Roulette');
setSize(250,200);
setBackground(Color.green);
tNumber.setFont(newFont('Arial',0,50));
tNumber.setForeground(Color.white);
tNumber.setBackground(Color.green);
tBet.setFont(newFont('Arial',0,30));
tChoice.setFont(newFont('Arial',0,30));
tMoney.setFont(newFont('Arial',0,16));
tMoney.setText(money+');
}
publicvoidmakeBet()
{
do
{
betting=inputInt('How much do you want to bet?');
}while(betting<0 betting>money);
bet=betting;
choice=input('Betting on : Red, Black, or a Number');
tBet.setText(betting+');
tChoice.setText(choice);
}
publicintrand(intlowest,inthighest)
{
return(int)(Math.floor(Math.random()*(highest-lowest+1)+lowest));
}
publicvoidspin()
{
longstart=System.currentTimeMillis();
do
{
intnum=rand(0,36);
tNumber.setText(num+');
if(num0)
{tNumber.setBackground(Color.green);}
elseif(((num-1)/3)%20)
{tNumber.setBackground(Color.red);}
else
{tNumber.setBackground(Color.black);}
repaint();
}while(System.currentTimeMillis()-start<3000);
money=money+checkWinner();
tMoney.setText(money+');
}
publicintcheckWinner()
{
if((tNumber.getBackground()Color.red)&&(tChoice.getText().equals('Red')))
{returnbet;}
elseif((tNumber.getBackground()Color.black)&&(tChoice.getText().equals('Black')))
{returnbet;}
elseif(tNumber.getText().equals(tChoice.getText()))
{return36*bet;}
else
{return-bet;}
}
publicvoidpause(longmillis)
{
longstart=System.currentTimeMillis();
do
{
}while(System.currentTimeMillis()-start<millis);
}
}
Class Project
The prototype Raging Roulette contains lots of ideas which are useful for other gambling simulations. Slot machines, dice, card games, and any other gambling game can be simulated in a similar fashion.
Our class project will concentrate on multi-player games rather than casino games. A multi-player game has several players, all equal, and the winnings/losses are moved from player to player. There is no 'house'. This is more like how real people play games with friends - for example, card games like poker.
Our project is to build several multi-player gambling games. The players will exchange V-money (virtual money), kept in a virtual bank (managed by the teacher).
Rather than implementing a standard game like roulette or poker, students will design their own gambling games. Here is an example:
Divide and Conquer - an Invented Game
Each player places a bet and chooses a number between 2 and 12. The numbers and bets remain secret from the other players. The minimum bet permitted is 50 dm. The total of all the bets forms a 'pot'. Two dice are then rolled. If one of the players guessed the result correctly, he/she wins the entire pot. If more than one player bet on that number, the player who bet the most money wins the entire pot - the others lose. If there is a tie, they split the pot. If nobody bet on that number, the money remains in the pot for the next game.
Example Games ( Assume there are three players - Alice, Bob, Carla )
Alice | Bob | Carla | Pot | Dice Roll | Winner |
50 dm on #7 | 100 dm on #6 | 50 dm on #8 | 200 | #7 | Alice |
50 dm on #7 | 100 dm on #7 | 50 dm on #8 | 200 | #7 | Bob |
200 dm on #7 | 100 dm on #6 | 50 dm on #8 | 350 | #9 | No Winner |
200 dm on #7 | 150 dm on #7 | 50 dm on #8 | 400+350 | #8 | Carla |
Project Organization
Each student creates a game (specifies the rules) and writes programs to implement the on-line version. This includes a server program which generates the random results and makes payments to winners, as well as the client program which runs on the user's computer and takes bets and displays results. To prevent any cheating (secret 'lucky numbers'), the program code must remain public (open source). Also, the authors cannot win any V-money playing their own games.
The teacher will implement the V-cash system. This will include virtual salaries for all students on a daily basis, as well as bonuses for outstanding programs or clever ideas. (Absent students forfeit their daily salary.)
Spinning Wheel Bingo
The server programs must be designed to interface properly with the V-cash system, so that winnings can be correctly posted to student accounts. Incorrect payments may result in fines for the programmers.
Development Steps
- Try out the Raging Roulette simulation
- Invent a new game, based on dice, cards, spinners, or some other random
- Write a stand-alone version, like Raging Roulette, including a simple user-interface, the random-result generator, and simplified pay-off system (without an actual bank-file)
- Connect to server-based E-cash and convert payoff system to 'real' E-cash (the teacher will make the E-cash system
- Integrate your program into the Our-Casino system
- Improve the user-interface to be more realistic
- Refactor into a multi-player, client-server game