My notes for this page:

The casino always wins: random variables.

26 The casino always wins: random variables.

Slide 0

The beginnings of probability theory were greatly determined by gambling, which initially did not provide the very best reputation for this field of mathematics. Consequently, in these episodes on stochastics we have repeatedly tried to direct our attention to other applications that usually are also more interesting.

Today is an exception. For the new topic of random variables, it actually makes sense to think about why although many people have lost money gambling, there are seldom – if ever – reports about a casino failing.

Slide 1

Random variables – we just used the term – are very simply functions.

But what are they exactly, and what lies behind this type of function? Let’s work this out step by step.
Once again, it’s about looking at and classifying situations in which randomness plays a role.

Slide 2

I have already said that gambling should play a role today. Are you familiar with the game “chuck-a-luck”? It works very easily.

You wager one euro and play against the bank. You select a number of spots between 1 and 6. Then three dice are rolled.

If at least one die comes up with the number you selected, you receive your wager back and also one euro per die with your selected number.

If your number doesn’t come up, you lose your wager.

Slide 3

The key question for you is:  How does your wallet change?

We can describe that using a function. We can uniquely assign each result of the random experiment “rolling three dice” a number from the set {-1; 1; 2; 3} because a person either loses one euro or receives 1 or 2 or 3 euros.

Let’s assume you have selected the number 6.
Then your wallet loses one euro for all combinations of three dice without a 6. And it gains three euros only for a triple match (6,6,6).

Slide 4

In general, a win or a loss is assigned to each triple of three numbers (and that is the rolls). This function has the domain   and the image Ω = { -1, 1, 2, 3 }.
All 63 = 216 triples of whole numbers between 1 and 6 are assigned one of the numbers from Ω.

Slide 5

Let’s go through it once in concrete terms. Assume that a player has selected “6.” Then all combinations of three numbers between 1 and 6 without a “6” means that the player loses one euro at the end. Here are all combinations of three numbers between 1 and 5.

You see all possibilities listed here.

And remember, the player receives three euros in only a single case out of the 216 cases.

Slide 6

Let’s define the term.

Let W be a finite sample space. Then each function X of set Ω in the set of real numbers (and yes, in reality it is a sensible subset most of the time)

is a random variable (or stochastic variable) mapped to Ω. Each ω from Ω is thus clearly assigned a real number X(ω).

If we assign to each possible value of the random variable the probability that the random variable will assume this value, we come up with the probability distribution of the random variable.

Let’s look at the example again using these terms.

Slide 7

In the chuck-a-luck example, the domain of the function of the random variable is 

and its image is

W =  {-1, 1, 2, 3}.

And what do the probabilities for the individual results look like and consequently the probability distribution?

Slide 8

We thus have to see how great the probabilities

          P(X = -1) 

          P(X =  1)

          P(X =  2)

          P(X =  3) are.

Then we can determine whether this game of chance is worthwhile for the players.

Slide 9

We can easily determine the probabilities; the rules of combinatorics are used here. We simply have to determine the favorable and the possible cases. Altogether, there are 63 = 216 possibilities for combinations of three. Of these cases, 53 = 125 do not include a “6”. There are 3 x 52 = 75 possibilities for rolling one “6” and two other numbers because the other numbers can appear on the first and second rolls, the first and third rolls, or the second and third rolls. Rolling a “6” twice and one other number results in 3 x 5 = 15 possibilities. The other number can be rolled the first, second, or third time. And finally, the combination of “6” three times happens exactly once.

Thus

       

       

       

       

Slide 10

If we use a table to represent this, we see the probability distribution at a glance. We see the possible winnings in the first row, and the corresponding probabilities are in the second row.

Slide 11

We can now work with these numbers and consider what happens if you play constantly. If you do that, then in the long run you would

lose 1 euro   in 125 of 216 cases

win 1 euro    in 75 of 216 cases

win 2 euros   in 15 of 216 cases

win 3 euros   in 1 of 216 cases

You could “weight” the probabilities using these values and in this way determine an “average win” (or likewise an average loss) per game.

Slide 12

You see it here. We have multiplied the loss of one euro and the possible winnings with the respective probabilities and calculated the sum. The result is or roughly -0.08. We call this the “expected value.”

It is not difficult to recognize that the result is a loss, albeit small, for the player. And this loss amounts to 8 eurocents per game on average.

Slide 13

The expected value of a random variable X is the sum of all assumed real values that have been multiplied with their respective probability:

The expected value is therefore something like the average value of the random variable per experiment in the long run.

Slide 14

Once again in concrete terms.

Is chuck-a-luck a fair game? Quite obviously, E(X) would have to be equal to 0 in a fair game. We have calculated that E(X) < 0.

If the game is repeated very often, you can expect an average loss of about 8 eurocents per game, and that means that the game is not fair (which certainly isn’t really surprising).

Slide 15

We can very nicely illustrate the expected value and the necessary calculations in this case with a small domain of the function.

Imagine a bar that is labeled like a number line. Objects with the masses 125/216, 75/216, 15/216, and 1/216 are located at the points -1, 1, 2, and 3. Then we can define the expected value as the “balance point.” If you support the bar at this point, the bar is balanced.

Slide 16

Let’s look at another example. We will keep it in the context of gambling.

Have you ever played classic roulette? A ball rolls and lands on one of 37 numbers (at least in the European variation), of which 18 have a red background, 18 a black background, and one a green background. A simple possibility of betting:  You bet on RED or BLACK.  If the ball lands on the bet color, the win is twice the wager. Otherwise, the wager is lost.

Sounds good, right? A fair game? Calculate it for yourself. Wager one euro again.

Slide 17

You can immediately rule out that it is a fair game.

Of 37 possibilities, only 18 – and thus less than half – are favorable cases. This can turn out well only for the casino.

Nevertheless, let’s calculate: In 18 of 37 cases, you win one euro, and in 19 of 37 cases, you lose one euro. Thus

 

Slide 18

Now you open a casino. Your solid mathematical knowledge should pay off financially for once.

You offer a game in which the wager is one euro again.

Here’s how the game works: Two dice are rolled. The wager is lost if neither die lands on a “6.”  What could the winnings look like for a “6” on one or two dice so that you don’t end up with a deficit and the game isn’t too unfair?

Slide 19

This is what it looks like in a formula, clearly, and as a table. The value “-1” is clear; you can’t exactly let your customers lose more than their wager. We want to find the winnings m and n if a “6” lands face up one or twice.

We’re looking for solutions to the inequality

 

because for a solution = 0, our existence would be jeopardized.

This looks simpler if we rewrite it. We want solutions to the inequality n + 10•m < 25.

In an inequality with two unknowns, there are an infinite number of solutions in theory. We’ll look at this more closely right away.

Slide 20

You see examples here.

For n = 2 and m = 1, 2 + 10•1 = 12 < 25

For n = 2 and m = 1.5, 2 + 10•1.5 = 17 < 25

For n = 4 and m = 2, 4 + 10•2 = 24 < 25

These winnings are therefore possibilities for your casino. However, it may be doubtful whether your customers would be satisfied with overly small winnings like in the first and second rows.

Slide 21

You can already tell. It isn’t easy at all to keep the right balance. However, the expected value allows you to evaluate the situation well.

Slide 22

That’s all for today. All the best to you; it’s nice that you were here. Until next time.

Tip: Log in and save your completion progress

When you log in, your completion progress is automatically saved and later you can continue the training where you stopped. You also have access to the note function.

More information on the advantages