# Expected value (EV) & variance in gambling.

The expected value, or *"EV"* is the mathematical expectation of something occuring, determined by the probability of it happening across any given number of instances or volumes. So, if flipping a coin with a 50% probability of heads, and 50% tails, 100 times the EV would be a result of 50 of each - 50% of 100 coin flips is 50. If we bet on the the Bankers hand in Bacarrat, with a win probability of 0.4586, 10,000 times, the expectation is to win 4,586 of the hands we bet on (0.4586 x 10,000). If we bet £1,000 on roulette, with a HE of 2.70%, the EV would be to lose £27.00 (2.70% x £1,000), and so on . . .

But as anyone who has ever gambled will know, the theoretical EV rarely occurs in practice - which is due to natural "variance" in the results that occur. The fewer incidences in our exercise, the greater the variance is likely to be, the more the less so. If you were to flip a coin 25 times, the variance would be much greater relatively than if you were to do the same exercise with 2,500,000 flips. Over time, the actual results tend to average out to their expected value (a phenomena commonly referred to as "*The Law of Large Numbers*"). The good news is that it is possible to predict the range of variance in results by using a pretty simple statistical technique (and you don't need to be a maths genius to do it!).

Variance is measured in what are known as ** "Standard Deviations"** (sometimes denoted as sigma with a σ symbol), which is a range measured from the EV. Three standard deviations either side of the EV cover 99.73% of all possible results. Probably the best way to illustrate this is to show how it's calculated and then applied using an example:

Let's say we flipped a coin three dozen times (n=population=36). The EV (expected result) is that we would end up with 18 heads and 18 tails (p=probability=0.5000)? But that probably won't happen in practice. To calculate the normal range of variance, it's fairly straightforward:

1 x standard deviation = square root of (n*p*(1-p)) = Sqrt(9) = 3

3 x standard deviations = 3 x 3 = 9, and if we measure this each side of the EV of 18 (plus and minus it) we end up with a range of 9-27. If the results return the number of heads (or tails) as being anywhere between 9 and 27 times, they would be considered to fall within three standard deviations of the expectation, and therefore be within the range of normal variance (ie a result that would be returned 99.73% of the time).

Below is a representation of the normal frequency distribution curve. It shows the standard deviations at the bottom and you can clearly see that most instances fall between +/-0-1σ, fewer between +/-1-2σ and much fewer within +/-2-3σ. Virtually nothing falls further than +/-3σ from the EV.

To give an indication of just how rare a +/-4σ result is, such events occur only 6 times in every 100,000 trials; +/-4σ covers 99.994% of expected outcomes or, looking at it another way, occur with odds of 15,786-1 against. In the above example, if someone told you they'd flipped a coin three dozen times, and only received 3 heads, you'd be quite justified in having doubts - this result isn't impossible, but is pretty unlikely.

Here's a link to a table of data that shows the particulars for up to +/-7σ - a truly rare occurance:

Table of Standard Deviation data

(*Data provided with the compliments of Wikipedia*)

Here's another link to a useful tool that will quickly indicate the percentage of the population under any specified proportion of the bell curve:

https://www.mathsisfun.com/data/standard-normal-distribution-table.html

In the past, during a search of the web. I stumbled across the following Excel spreadsheet which I think is great for use by degenerate gamblers. It's a spreadsheet tool, created by one of the senior lecturers at Coventry University, and has been designed to quickly calculate the range of normal variance of an event, based upon the population (number of instances of something) and probability of it happening. Take a look at:

Link to Excel file (23Kb - opens in a new window)

© Neville Hunt & Sidney Tyrrell, Coventry University, 1999.

n = the population, ie the number of instances

(flips of the coin, rolls of the dice, hands played etc)

p = probability of the event happening

(expressed as a decimal)

mu = mid point of the distribution curve

(ie the "expected value" - EV)

sigma = 1 x standard deviation

(sometimes denoted as σ)

On the probability table, entering a range of outcome values (from-to) will return a probability (expressed as a decimal) of the outcomes within this range occuring. This is particularly useful for determining the probability of a particular outcome occuring, although the results are only returned to four decimal places (100th of a percent).

Let's take an example: you flip a coin a hundred times, and want to know the probability of getting 69 heads.

Enter n=100

p=0.50

from=69, to=69

The result that is returned is 0.0001, or 0.01% (which has been rounded up). This is close to 4σ, and can be seen to be - as 3σ would be 50+(3x5)=65 (50 being the EV and 1σ being 5).

From a gaming point of view, this tool is particularly useful for poker players wishing to know the normal (expected) variance of results for various contested hands (ie overpair v underpair pre-flop, roughly 82%/18% with just a 0.38% chance of a draw) or casino table games players wishing to calculate their maximum possible loss from a visit to the tables.

Let's look at an example of potential losses over a session of 200 hands of Bacarrat, wagering £10 on the banker's hand everytime. Using this tool I've calculated:

Worst case scenario for banker wins: 70 (probability=0.4586, range of normal variance = 70-112 wins), @ £9.50 = wins totalling £665 (banker wins are paid at 19-20)

Worst case scenario for draws: 7 (probability=0.0952, range of normal variance = 7-31 draws), no loss as wager returned

Therefore, worst case scenario for losing hands = 123 (200 minus 77), @ £10 = losses totalling £1,230.

So, the worst possible outcome for this visit to the casino would be incurring a net loss of £565 (being £1,230 losses offset by £665 in wins).

You could always do the inverse calculation, and determine the maximum potential win in the same way for this session. The probabilty figures used in this example were taken from the Wizard of Odds Bacarrat page.

So, in summary, it is possible within reason to predict the results of some gaming opportunities using maths and some simple statistical techniques. You certainly don't need to be a genius to do this, and nearly all of the information required to do it already exists on the web - somewhere (you just need to track it down).