A number of years ago, I had the not-too-common opportunity of going behind the scenes at a casino in Asia. A computer hardware vendor wanted to show me the use of his parallel processing computer that was used to run the back-office at this casino.

What caught my attention, however, was the fact that as I passed through the staff entrance, it was like taking a trip from Disneyland into a Dragon's Lair. The contrast was overwhelming. There were no blinking lights, no merriment, and certainly no scantily clad singers to take your mind off your last loss.

**Bandits Everywhere**

So-called because they might very well rob you of whatever cash you have in your pockets, one-armed bandits account for 70% of a casino's income. With the emergence of the microchip, the name is now a misnomer, as slot machines have become more like buttoned-down con men using random number generators to manage their well-designed payouts to players.

The amounts these gaming machines pay out, and the frequencies of those payouts, are carefully selected to yield a certain fraction of the money played to the house (the operator of the slot machine or casino), while returning the rest to the players during play. In slot machine parlance, this is called a Return To Player (RTP) percentage.

As an example, suppose a certain slot machine costs $1 per spin and has a return to player of 95%. It can be calculated that over a sufficiently long period, such as 1,000,000 spins, the machine will return an average of $950,000 to its players, who have collectively inserted $1,000,000 during that time. In this (simplified) example, the slot machine is said to pay out 95%. Individual payouts of different amounts come with different probabilities where the objective is to let you "taste" some small winnings so that you will continue to stay and play -- and lose.

According to the article in Wikipedia, a mid-sized payout designed to thrill the player might be an 80:1 payout that occurs on average once every 219 plays.

**Certain Probability**

The 95% payout above can be viewed as a mathematical average called the expected value. The sum of all the individual payouts (including the negative ones) multiplied by their corresponding frequencies equals this expected value. The frequency of payout can also be termed a *probability*.

The paragraph in the last section mentioned an 80:1 payout occurs "*on average *once every 219 days." Notice the words "on average." This is because a probability of 1 in 219 (or 0.0045662) occurs only after a sufficiently long period. Probability and expected values are long term concepts.

Along the way, the sum of the different payouts occurring with their respective frequencies give rise to a variance around the expected 95% payout. In other words, the actual payout in the short term might be more or less than the expected 95% payout.

How close the actual payout is to the expected payout of 95% at any instant depends on the number of plays. Let's say it has been determined by the casino that the probability of an actual payout between 94% and 96% occurs after 100,000 plays with 80% probability. What this means is if play occurred a large number of times at 100 identically-programmed slot machines, in exactly 80 of these machines, the actual payout after 100,000 plays would be between 94% and 96%.

This is the Law of Large Numbers at work -- something that I also alluded to in my last article. It illustrates the link between a theoretical probability and what you really experience along the way.

At the end of the long run, the casino will pay back 95% collectively to all the people playing its slot machines. A single player might win an 80:1 payout on his first try --although it is highly unlikely he will. Another player might have a winning streak and win several times in a row. But at the end of the day, it is with *certainty* that the casino will earn 5% from all players collectively assuming an RTP of 95% --- and if they keep on playing which is something the algorithms in the microchips are designed to encourage.

**Investment ****Portfolio Payouts**

Like a slot machine, a portfolio of investments has an expected payout, which is effectively its return with your bet being your dollar investment in the portfolio. The returns have not been generated by a random number generator but the effects of the market often result in a distribution similar to one that is randomly generated. (See my article entitled "Actively Passive Asset Allocation.")

As an example, let's look at the return differences for Kraft Foods (KFT) in the histogram on the right where the blue bars are the actual occurrences while the red bars are randomly generated from a distribution with the same mean and standard deviation. The short bars on the far right of the histogram are like high payouts in a slot machine with low probability. The expected payout would be somewhere near the middle for a near normal distribution. This is the zero point on the x-axis in the case of our return difference graph since the graph charts the actual returns minus their expected value.

In the game of investments the possibility of you achieving your expected return (or equivalently, getting a return difference of zero) is flanked on both sides by returns that may be either below or above your targeted return. Unlike a casino, you do not have the luxury of playing the same game over the long run or a great number of times. Unlike also a casino's controlled environment, the game of investments includes "slot machines" with algorithms that may vary from day to day.

While it is possible to chart fairly stable distributions like the one for Kraft with sufficient historical data, it should now be clear that reducing the area on both sides of the expected value is critical in the game of investments. Reducing this area on both sides of the expected value is possible if you have a portfolio of 2 stocks or more with low correlation.

A diversified or optimized portfolio is an exercise that can help mitigate the disastrous effects of portfolio volatility.

**Problem or Solution?**

The problem with probability is not the concept of probability itself. The casino uses the theory of probability to make money. Insurance companies use the laws of probability to calculate insurance premiums -- and they make money.

Like a casino, you should have a long-term view on investments. But without the controlled environment of the casino or the resources of an insurance company, the Law of Large Numbers, which dictates the link between your actual and long-term expected returns, makes investments somewhat trickier.

The formula for the Law of Large Numbers comes in various forms and one only has to reference a College textbook on Statistics to view it in all its mathematical glory.

Contained somewhere within these Greek symbols is a template for the lone investor who has neither large numbers nor unlimited funds on his side, The formula says that the probability of your actual return closing in on your expected return can also be improved by reducing the variance of returns. Reducing this variance is what diversification and portfolio optimization is all about.

An adviser told me once that he had a portfolio that had a 68% probability of yielding between a 8% and 14% return. He then confidently went on to say that this meant the portfolio would see a minimum return of 10% return 2 out of every 3 years.

Since 2 divided by 3 gives about 67%, he was not to be faulted arithmetically. But he was wrong in regard to the mathematics of probability. Only in the long run or on average would it be 2 out of every 3 years.

In a world of randomness, it would have been better if the advisor had told me that he managed to re-construct his portfolio so that it had a 95% probability (i.e. a higher probability) of yielding between 8% and 14% or a 68% probability of returning between 10% and 12% return (i.e. a more precise tolerance).

You see, in a world of randomness, it is the improvement in the metric that makes the difference, and not the actual metric itself. Probability is not a problem after all. It is actually part of the solution.

**Disclosure: **I have no positions in any stocks mentioned, and no plans to initiate any positions within the next 72 hours.