by
Sam Allen
Your Commodore is good at calculating probabilities, provided you know what numbers and which formulas to type in. This is a branch of mathematics which is heavily dependent on logic and one in which it is easy to arrive at wrong answers due to errors in logic. Some confidence games are based on common mistakes in calculating probabilities. In Nevada casinos you will find the table game of Chuck-a-Luck in which there are three dice in a rotating cage having an hourglass shape. You bet on one or more of the six possible numbers and the cage is rotated. If your number comes up on one die you win even money. If it comes up on two dice you win twice the amount of your bet, and if it comes up on all three dice you win three times the amount of your bet.
People who dimly remember having studied probability in high school algebra courses sometimes reason as follows: "The probability of my number coming up on one die is 1/6, so the probability of its coming up on one of the three is three times this, or 1/2. That is a fair bet right there, and the other payoffs are gravy, so obviously this game favors the player." This is a con game in which the player is permitted to con himself.
What the player has forgotten is that his simple rule for addition of probabilities applies only if the possible outcomes are mutually exclusive. Such is not the case here, for your number coming up on one of the dice does not prevent it from coming up on others as well. When the events are not mutually exclusive one must subtract the probabilities of repeats. Rather than doing this, let's run through the 6^3 = 216 possible ways the dice can come up and count those cases in which a particular number comes up exactly once.
Let's say the number comes up on die A. There are 5 ways it can not also come up on die B and 5 ways it can not also come up on die C, so the number of cases in which the number comes up only on die A is 5 x 5 = 25. The number of ways it can come up exclusively on die B is the same, and also is the same for die C, so the number of ways a particular number can come up once only on any of the three dice is 3 x 25 = 75. The probability that this will happen is 75/216 which is approximately equal to 0.35 and is considerably less than one-half. The number of ways a particular number can come up on exactly two dice is equal to the number of ways it can fail to come up on the third. This is five times the number of dice it can fail to come up on, or 15. The probabililty of your number coming up on exactly two dice is 15/216.
There is only one way in which your number can come up on all three dice, so the probability of this happening is 1/216. Now lets calculate the values of the winning outcomes. If your number comes up exactly once you get two units back, so the value of this outcome is 2 x 75/216 = 150/216. If it comes up twice you get three units back, so the value of this outcome is 3 x 15/216 = 45/216. If it comes up on all three you get four units back, so this outcome has a value of 4/216. Adding these up, we get the value of the winning outcomes as 199/216 units. All the other possible outcomes are losers with the value of -1 unit. Adding the two, we see that the net value of the game to the player is - 17/216 or approximately -0.0787. This means that the house has an edge of nearly 8%, which is more than that of some of the other games. Joe Tourist will never figure out why he doesn't consistently win at Chuck-a-Luck.
Here is a proposition that someone actually tried to sell me on. He was a salesman for a filing service for entries in a U. S. Government lottery for oil exploration leases on federal land. His proposition was "Maybe there is only one chance in 100 of your entry being selected in the lottery, but if you file 100 entries, then you are SURE to win." When I challenged him on this he didn't try to convince me, so he knew that it was wrong. Actually, the probability of your winning the lottery is equal to the number of entries you file divided by the total number of entries filed. You never are sure to win unless nobody else files. The salesman tried to obscure common sense by turning it into an abstract problem in probabilities.
Even treating the situation in an abstract way, he was wrong. Let w be the probability of your winning at least once in n tries. If p is the probability of winning in a single try, then assuming that the outcomes are independent of each other
If you want to know the number of tries needed to attain a certain probability of winning you can use the formula
with n rounded up to the next larger integer. This formula uses natural logarithms, but you can use any kind of logarithm. Since both p and w must lie in the range 0 to 1, both the numerator and denominator will be negative. If w is set very close to 1, then n becomes very large. Industrialists Roy Kroc and Ross Perot know this formula. It means that if you want to be pretty sure of winning you have to be persistent.
When it comes to doing the actual calculations, there are many excellent handheld calculators which can do the job. Of course you want a scientific model which has the logarithm and exponential functions. Your Commodore 64 or 128 can function as such a calculator due to its built-in BASIC interpreter. What is more, it is programmable, and its 64K of memory is more than you will find on any programmable calculator except the most expensive such as the Hewlett- Packard HP-48X. Although the latter is a powerful calculator with much built-in software, it is programmed in Forth, not BASIC, and there is a steep learning curve. Also, the Commodore is faster.
Subsequent articles in this series will concentrate on making your inexpensive Commodore do the work of a high priced HP-48X.
NEXT |
---|