If slot machines are random numbers, how can they be programmed to win a certain number of times? How can something be both random and programmed?

1.64K viewsEngineeringOther

If slot machines are random numbers, how can they be programmed to win a certain number of times? How can something be both random and programmed?

In: Engineering

12 Answers

Anonymous 0 Comments

It’s a common misconception that “random” means “completely unpredictable”. Something being random only really means it’s unpredictable *in the very short term*. In the long term, randomness follows very predictable patterns.

Let’s consider a game where you roll a single six-sided die, and, depending on what you roll, you either win $1 or lose $1. Of course, it’s impossible for me to know exactly what your *next* roll will be. BUT, we can be pretty certain that, if it is a fair die and you roll it many many times, each number is going to appear *approximately* 1/6th of the time. The more times you roll, the closer things will get to being even.

So, if I’m a casino, how can I tune this random game to make sure I come out ahead of you? One easy method is to say “If you roll a 1, you win, but if you roll any other number, I win”. Now for every roll, there’s a 5/6 chance that you lose. Again, it’s entirely possible that you’ll roll two ones in a row and be up $2, but the more times you roll, the more likely it is you’ll eventually lose more than you win. In fact, I could even say “if you roll a 1, you get $2, but if you roll any other number, you lose $1”, and I would *still* make money after enough rolls (see the end of my comment for the math).

We can tune it to be more fair by saying 1 *and* 2 make you win, or even “perfectly” fair by saying all even numbers make you win. In all of these situations, the outcome of each individual roll is truly random in that you can never know *for sure* if you’re going to win or lose the next roll. But the long-term outcome is also predictable in that you know the odds of a win or a loss, which are not necessarily equal, and over time, the actual rolls will get closer to those odds.

So it is a simple matter of tuning the odds/probabilities of the game to be in the house’s favor. The exact methods for this depend heavily on the game. For a slot machine, even if it is truly random, you can just make it so that there are more “losing” combos than winning ones.

In practice, things like slot machines may not even be *truly* random, just varied enough that they seem like it, which makes tuning the odds even simpler.

Some key search terms to learn more:
– “The law of large numbers”, which is what tells us that the more times we roll that die, the closer we will get to each side showing up 1/6th of the time. There is also a related but slightly more advanced topic called the “central limit theorem”.

– “Expected value”, which is how we can more precisely calculate/estimate how much money you will win from our game after a certain number of rolls. For example, in the case where a 1 gets you $2 but every other number loses you $1, we can calculate the “average” value of a roll as ($2)x(1/6) + (-$1)x(5/6) = -$0.50. In other words, if you played a ton of times and took the average of your winnings/losings, you should expect to have lost approximately 50 cents per roll – that’s the *expected value* of a single roll. Obviously you can never actually lose exactly 50 cents on a given roll, but if you play 1000 times, you will almost assuredly be very close to $500 in the hole.

You are viewing 1 out of 12 answers, click here to view all answers.