William M. Briggs

Statistician to the Stars!

Page 3 of 751

Tests For Randomness Aren’t What You Think

Here is a random event. When I wrote this article I either had a quarter or a nickel in my pocket; I did not have both.

Did I have a quarter in my pocket? You do not know. You have not been given enough information to say for certain. The “event” of my having a quarter (or nickel) in my pocket is random to you. This paragraph is also a perfect test for randomness, because why? Because here we have demonstrated randomness, which is to say, a state less than certainty in your mind, which has been proven. Therefore the test is perfect.

Random, as I have written many times, and which is proved in Uncertainty, means unknown or unpredictable and nothing more.

Now before we leave this example, consider that I (Yours Truly) caused the “event” of the quarter or the nickel in my pocket. The event is not random to me, the causal agent. It would not be random to you, either, if you knew the cause (perhaps you were peeking in my window, you naughty reader).

A reader at Roulette 30 as me to take a look at a “test for randomness“, which you might first read.

These tests work in the following fashion. A string of numbers has been caused to be by some process. Usually this process is known, or at least could be, if this process is one of the many deterministic “pseudo random number generators”. The “pseudo” is there to tell you the process is as rigorously deterministic as the sequence 1, 2, 3, …

Now in these tests for “randomness”, the cause of the number sequence is either ignored or it genuinely unknown. The cause has to be there, of course, even if the sequence has been produced by harnessing some quantum mechanical procedure; only with these, we know we cannot know the cause.

We already know the correct definition of random. When a cause is know, the event or sequence is no longer unknown, hence it is not random. A sequence can thus be “random” to one person, and non-random to another.

Naturally, if we know the cause, we can predict the sequence. But what if we could not predict the sequence only imperfectly? Keep that question in mind.

All probability is conditional on assumed evidence of premises. If we have B = “A thirty-eight-sided object only one side of which is labeled ’00’ and only one side will be revealed to you”, the probability of seeing in ’00’ is, given B and only B and no other evidence, 1/38. Suppose that is the only information you have. If you wanted to predict, the best you could do is say the probability is 1/38.

If we could learn something, anything, really, about the cause, or somehow come into possession of information related to the cause, but not the cause itself, we could augment our base knowledge and deduce a different prediction, larger or smaller than 1/38 depending on how probative this information is.

The event, in this sense, would be “less random”. Any time the probabilities, based on new evidence, moves toward the extremes (0 or 1), it is better known, hence less random. But unless we can determine or know the cause, the probability will still be less than extreme, and the event will still be random. And

Let’s add new evidence in the form of a string from the sequence, observed (or assumed) in the past. Given B, we can deduce the probability of seeing such a sequence, or the probabilities of functions of this sequence (one function is the total ’00’s; there are an infinite number of functions). The probabilities won’t necessarily match the observed relative frequencies of the sequence (or function), but why should they? Relative frequency is not the same as probability.

It could be, as often is, the probability of the sequence (or some function), given B is low. Since there are an infinite number of functions, we could always find one that has a low probability given B. So low probability in itself isn’t especially interesting.

The real test, then, is predictability. Suppose we augment B by the observed sequence: call this augmented evidence B+. Then it might be that the function in which we’re interested has a high probability given B+, but low probability given B.

Very well. Past sequences are not of much interest: future ones are. We could use B+, and B, to predict probabilities of new sequences (or functions). Pay attention closely, now.

If you can find an opponent willing to take bets on the sequence and your opponent uses B to formulate probabilities, and you use B+, then if the augmented information in B+ has anything to do with the cause of the sequence (even at second hand, if you understand me), then you can make money from your opponent.

But if you were merely fooling yourself with B+, then you will lose money, since B better predicts the sequence.

The true test of “randomness”, then, is in the predictions you can make, since unless any observed sequence is impossible given B, you might be fooling yourself.

In other words, if you think you have found a system which can beat the casino (which uses B), by discovering some hidden sequence of numbers (which implies a B+), the only way to prove it is to take the casino’s money.

I do not say such a thing is impossible, for it is not. There have been reports of devices which allow discovery of “B+”s. Which is why casinos ban such devices.

Why Decision Analysis Isn’t Straightforward

Heads I win, Tails you lose.

Vast subject, decision analysis, but we can get a grip on a corner of it if we consider the simplest of problems, the do-don’t do, yes-no, gonna happen-ain’t gonna happen, simple dichotomous choice. Which is to say, there are one of two decisions to make which will result in a limited horizon of effects.

Consider the most apolitical decision Yours Truly can think of, the take-it-or-leave-it umbrella problem. Carry it and you’re protected from Mother Nature; forget it and you might get wet. Yet if you take it and it doesn’t rain, you have to carry the ungainly thing around. What to do?

Textbooks say to first calculate the probability of the event, which is here rain. Now the probability of the event is calculated with respect to certain evidence, which for most people will be the weatherman’s report. Most of us would take whatever he says as “good enough”, which isn’t a bad strategy because meteorologists do a mighty fine job forecasting rain for the day ahead. So adept are they, that the issued numerical value of the probability can be trusted; it is reliable and measures up to other, technical qualities of goodness which needn’t concern us here.

Next is to figure the costs and rewards of the various actions. Here there are four. Take the umbrella and it rains or not, or leave the umbrella and it rains or not. Something (of course) happens to you in each of these scenarios. None of these happenings are the least quantifiable—how do you quantify not getting wet because it didn’t rain but you carried an umbrella?—but in order to work decision analysis we must pretend they are because decision analysis is a quantitative science.

So we must invent a quantification using the idea of “utility”, indexed by “utiles”, i.e. quantum, individualistic units of good and bad. Not getting wet might be a dozen good utiles, while my getting wet is a negative seventeen utiles. On the other hand, the burden of carrying an umbrella scores a negative three utiles. On the other other hand, even if it doesn’t rain I can use the umbrella to intimidate cabs that try to cut me off in intersections (somehow they have no compunction running over unarmed people but are frightened of plowing into a sharp stick—try it) which might be worth seven good utiles and might be worth nothing if I meet no cabs. And what is more suave than sporting a Brigg umbrella? Five positive utiles right there no matter what.

Since I get to (and must) make these up, there is no criticizing them. They are what they are—and they may not even be that. Sitting here now, I can’t make up my mind how to specify the complete set of utiles. Yet I do manage to everyday carry an umbrella or not, so I must be implementing some kind of decision process. Surely whether or not to carry an umbrella is a trivial decision (except on days I’m wearing my nicest brogues), but even so it is an astonishingly complex task to specify or articulate how I make it.

Utility is “individualistic” because one of my utiles is not equivalent to one of yours, except by accident. Further, even if we could set up a rate of utility exchange between you and me—say we agree one of my utiles equals 3.2 of yours—the relationship is not linear. That is, it is not the case that 10 utiles of mine would equal 32 of yours: it could be anything. There just is no way of knowing. But, like I said, if we want to use decision analysis we have to pretend it is knowable.

Now if we could quantify the four scenarios and the (conditional-on-certain-evidence) probability of the “event” (which necessarily gives us the probability of the “non-event”), decision analysis provides us a formula for what to do. Well, several formulas, actually: maxi-max, mini-max, expected value, etc. There isn’t universal agreement on which formula to pick. All these formulas begin in the same place: with the four scenarios quantified in terms of utile “loss”, which might be negative hence a gain, or utile “gain”, which also might be negative hence a loss. Plus the (conditional) probability for the event. Idea is to set up a table with columns headed “rain” and “no rain” and rows labeled “carry” and “not carry”: each of the intersections, or “cells”, has a utility (loss or gain). It might look like this:

  • Carry—Rain, u1
  • Carry—No rain, u2
  • No carry—Rain, u3
  • No carry—No rain, u4,

where each of the ui‘s are the utilities (the indexes are arbitrary). Again, I can express these utilities in terms of loss or gain. For example, under Carry—Rain I am awarded 12 utiles but pay 3 for carrying, which is a gain of 9 utiles or a loss of -9 utiles. Of course, it was I who picked just these two considerations; there could have been more, making the utility calculation more involved. In any case, in the end I must end up with one number (in simple versions of decision analysis).

Now the probability that it Rains is some number (with respect to some evidence); call it p. Of course, p might not be a number, a unique number. Decision analysis requires, however, that it be stated as a unique number. In the “expected value” version of the decision analysis formulas, perhaps the most popular in economics, we calculate the “expected” utility for each cell, which is easy:

  • Carry—Rain, p*u1
  • Carry—No rain, (1-p)*u2
  • No carry—Rain, p*u3
  • No carry—No rain, (1-p)*u4.

If the probability of rain is 50%, and my u1 is 9 (or -9), then the cell gets a 4.5 (or -4.5). And so on for the other cells. Next step sums the “expected” values across the decisions, i.e. the rows. Here that is:

  • Carry, p*u1 + (1-p)*u2
  • No carry, p*u3 + (1-p)*u4.

The result will be some number for each row, stated in terms of either loss or gain in utiles. The “optimal” decision, in one framework, is the one which minimizes the “expected loss” or maximizes the “expected gain.” That’s it. What’s nice about this is its cookbook nature, the whole process is automated, easily programmed into spreadsheets and understood by bureaucrats. Naturally, its ease is one of its biggest problems.

What does “expected” mean? Not what you think in English. It has to do with the utiles you’ll win or lose if you repeat the decision-outcome pair many times, which might make sense for carrying an umbrella since you face that choice often, but it has no plain-sense meaning for one-time or few-time decisions, like say betting whether Pope Francis will resign his office in 2017.

We assumed the numerical probability was reliable, which it is for day-ahead weather forecasts. But what about for that resignation? It’s easy enough to cobble evidence to compute a probability for this event, but how reliable is the evidence? Nobody knows. There are so many different aspects of evidence one might accept that the probabilities conditional on them could be anywhere from zero to one, which isn’t too helpful.

It was already acknowledged that picking the utilities is difficult to impossible. Probabilities are often non-quantified. And then, even when all is numerical, it could be that ties exist in the calculations, with the result that there is no clear decision.

Yet decisions are still made. Now this either means our decision-making process is not like any formal analytic method, or that our process is like some analytic, quantified method with implied numerical values, but with the acknowledgement we might not be able to discover these values. But if this latter supposition is true, then there exist implied values for every decision method (mini-max, maxi-min, etc.), even when those methods insist upon different decisions. It is thus more likely that our decisions are rarely like formal methods, and that formal methods only approximate how people make actual decisions.

The Coming Metaphysic

Etienne Gilson’s The Unity of Philosophical Experience was recommended to me by Fr Rickert (whom regular readers will recognize) and I in turn recommend it to you. The book was the result of Gilson’s William James Lecture given long ago at the once-faithful Harvard.

The lecture traces philosophy from its high point in times medieval commanded by St Thomas Aquinas, to the insinuation of nominalism and the direct path to the skepticism, scientism, and materialism of today. That story, in his brief summary, is this (p 246):

Plato’s idealism comes first; Aristotle warns everybody that Platonism is heading for scepticism; then Greek scepticism arises, more or less redeemed by the moralism of the Stoics and Epicureans, or by the mysticism of Plotinus. St. Thomas Aquinas restores philosophical knowledge, but Ockham cuts its very root, and ushers in the late mediaeval and Renaissance scepticism, itself redeemed by the moralism of the Humanists or the pseudo-mysticism of Nicolaus Cusanus and of his successors. Then come Descartes and Locke, but their philosophies disintegrate into Berkeley and Hume, with the moralism of Rousseau and the visions of Swedenborg as natural reactions. Kant had read Swedenborg, Rousseau and Hume, but his own philosophical restoration ultimately degenerated into the various forms of contemporary agnosticism, with all sorts of moralisms and of would-be mysticisms as ready shelters against spiritual despair. The so-called depth of philosophy being regularly attended by its revival, some new dogmatism should now be at hand.

And this new dogmatism will be?

We’re now at the point where the need for metaphysics, and for philosophy in general, is denied by many. Yet as the man said, to deny philosophy is to philosophize. It is impossible to speak of ideas without a philosophy grounded on some metaphysic. And we have edged closer to scientistic atheism than agnosticism, with sloganeering and as-yet-fulfilled promises that science will answer all questions. Impossible, of course, because science cannot explain itself. Though it thinks it can.

Now I am not here interested in the correct metaphysics: I think it is the one propounded by St Thomas, or something like it, and which can be found in this series. And neither should you here be interested in the correct metaphysical stance. What we want to ask is this: what metaphysics and what philosophy will be adopted by the majority?

Perhaps the key phrase of Gilson’s is this: “with all sorts of moralisms and of would-be mysticisms as ready shelters against spiritual despair.” Scientists now find shelter against despair in the idea they are defeating an old enemy, which is supernaturalism. Their series of self-declared triumphs bolsters their spirits. The future is bright! We will soon graduate from our youth to a time when all traces of the supernatural and superstition are vanquished! In this way, Scientism is yet another Utopia. Point is: because of the blitzkrieg, scidolators have not had time to look back on the battlefield to see what they have wrought. Despair is ahead, waiting for them, but they don’t yet realize it.

Wait until they find it! When Christianity is but a minority position, held only by relics and quiet fanatics, only then will come the moment when the blatant limitations of science will be realized. The future that seemed only Day will become Night. Science says nothing matters, a true theorem given the implicit but denied metaphysics of materialism accepted by scientists. And if nothing matters then (you can see this coming) nothing matters, not even science.

Science will harness Nature’s powers? So what: nothing matters. Science will improve man’s life? So what: nothing matters. Science will answer the question, What Is It All About? It already has: nothing matters. Nothing good—nor nothing evil—can flow or follow from this conclusion, for there is no good or evil when nothing matters.

Despair will hit. The spiritual and philosophical vacuum must needs be filled. With what? Nostrums from yoga? Stretch your way to infinity! The cult of health? War for fun and profit? Nihilism as official policy? It won’t be sexual liberty, which is already old and stuffy (just ask the youth in Japan). Gender mania? I don’t buy it, since much of this is reaction against Christianity, and when that enemy is removed so is the need for reaction.

No. I think instead it will be a fractured variation of Idealism. Our thoughts define not necessarily what is, they will say, but our will defines what things mean. We see this element in gender mania. Science will tell us what is. If nothing matters, as science assures, it will be discovered that at least our will must matter. The reason for existence is us, it will be said. And that conclusion will lead to the search, and of course the discovery, of exemplars, ideals of humanity. If we think the cult of celebrity is bad now, wait until science tells us what an ideal man is like.

You Need To Beat More Than Just The Odds

Note: this is a sketch of a talk I gave yesterday at a conference filled with computer programmers, network and software engineers.

This is Las Vegas, the land of magic. Penn & Teller, Siegfried & Roy, David Cooperfield. And now me. I won’t do any tricks, but I’ll let you in on a secret.

The way to make a woman disappear is to walk up to her and say, “Hi, I’m a statistician!” Poof! She vanishes!

Bad news is, unlike the tricks on the strip, there isn’t any way to make her undisappear. So use this trick sparingly.

Vegas is also the land of gambling, and gambling means probability.

Now you might figure that facility with figuring the odds—knowing the probabilities—is all you need to be a good gambler. This isn’t so. To make a living at gambling—and many do—you do need to figure the odds, yes, but you need to beat more than just the odds.

If you can’t consistently beat more than just the odds, you will go hungry. Then you’ll be forced to take up some less glamorous profession for your daily bread, like say programming a computer.

And if you thought saying, “I’m a statistician” worked magic, just wait until you’re forced to admit something like, “I manage a TCP/IP stack with a specialty in abstraction layers.” Walk down the streets of San Jose after Eight PM and you’ll see how efficient a trick this is.

So let’s figure how to figure the odds, and then figure more than the odds.

I was walking up First Avenue with a friend, minding my own business, when a barrage of crayons rained down on me. Crayons—as in Crayola.

I looked up in time to see a school bus roar past, the windows open, the kids laughing like maniacs.

My first thought was to the utility of restoring corporal punishment in schools. But my second was to probability, because my friend noticed that one of the crayons stuck in the crease of my hat. I was wearing a fedora, as all gentleman do. I believe it was an orange crayon, obviously bitten in half. My friend, pointing to the stuck crayon, and thinking himself hilarious, said, “What are the chances of that!”

Now, statisticians are always hearing that joke. And we’re always expected to smile at it, to pay a compliment to the comedian for his originality. But the feeling that joke induces is the same as the one meteorologists experience when they hear some wag say, for the eighteen-hundredth time, “Everybody talks about the weather, but nobody does anything about it!”

It is in these frequent moments we wished we did manage a TCP/IP stack, because no one has any idea what that is.

There are, though, plenty of inside TCP/IP jokes. Like, “An IPv6 packet walks into a bar. Nobody talks to him.”

If you understand that, we’re back to our magic trick.

Anyway, the answer to these what-are-the-chance questions never changes. It is always the same number. It is a number you all know very well. I’ll let you prove that to yourself in the few minutes.

Even stranger, though, is that that number is consistent with this truth: there is no such thing as probability (and therefore no such thing as odds). It doesn’t exist. It doesn’t have being. Probability is always a state of mind.

Probability is something you bring to a problem; it is not something already there, to be discovered. Neither is it subjective, something you make up. It’s fixed by your assumption.

Here is a simple demonstration of this paradoxical truth. Before I came up here, I took my hotel key card and put it into either my left or right jacket pocket. What’s the probability it’s in the left?

Those who said one-half were starting with these assumptions: the key card must be in one of two pockets, and the left is one of these pockets. The probability of left given those assumptions we deduce (correctly) as one-half.

But think. What if you saw me getting dressed? I saw me getting dressed, so such a horrific spectacle is not impossible. Then you’d have different assumptions. You’d know, like I know, which pocket the card is in. On your new assumptions, the probability is either 0 or 1, depending on what you saw.

So here are two separate probabilities for the same event. Both are correct, and both are products of what you bring to the situation.

As an aside, the failure to account for the differences in states of knowledge is responsible for the confusion over the infamous Monty Hall problem. Heard of that? Game show host says there’s a prize behind one of three doors. Contestant picks a door, say 1, and Monty opens another, say 2, and asks contestant if he’d like to switch to 3. What’s the probability, given these assumptions and none other, the prize is behind 3? Work on that in the back of your mind.

How about a coin flip? Probability of one-half for heads, right? No.

Only on the assumption, “this is a two-sided object which when flipped must show either heads or tails” is the probability one-half. On the assumption a physicist, who measures the spin and upward force, would make, the probability is (again) 0 or 1, depending on those measures. It turns out to be easy to measure the state of a coin.

Something (actually many things) causes that coin to come up heads, and those causes are related to spin and force. If we knew the spin and force, we’d be able to guess the outcome, and thus come to a different probability. This proves there are only unknown causes, and that probability, randomness, and chance do not exist. Randomness didn’t make the coin heads, physics did.

The lesson for both the key card and coin—for they are identical situations probabilistically—is not just that probability is not unique, but that the more you know, the better you are at guessing the outcome.

We’re getting closer to why you have to beat more than just the odds.

Let’s stay with the coin. The odds of heads are one to one on the standard assumption. Suppose we make a bet that I pay you a dollar if heads, or you pay me if tails. That’s fair, as long as neither of us knows or can control the causes of the flip—which is a dicey assumption. Some magicians are good at controlling these causes. That’s what magic is all about.

But what if I pay you only eighty cents if heads, and you still must pay me a dollar if tails? That fair? No? Why?

That mismatch in payment is the basis of all casino operations.

That mismatch is also why you have to beat more than just the odds to win. The odds of a head, given the simple assumption we’ve been working with, are 1 to 1. But with the mismatch in payment, it is like the probability has been adjusted to 44% instead of 50% for heads (or odds of 1.25 to 1 against). Heads will still come up roughly half the time, but since you’ll pay more on each loss, it is like heads only come up 44% of the time.

To win at coin flips, then, requires acquiring more knowledge about each flip, like a physicist might be able to do. You have to gather enough new information to not only make up that 6% deficit, but to exceed it, else the game will be roughly a tie between you and your opponent.

Barring specialized physics equipment, or lacking the talent of manipulating flips like magicians can, you won’t be able to do this. So you’ll have to find a new game.

How about Blackjack? You have to make total of 21 or beat the dealer without “busting”. To make this easy, suppose there is only one deck. You’re the only player and have just been dealt a Jack, and the dealer shows an 8. What is the probability you get a blackjack with your second card? Given the usual assumptions, it is 4/50, or odds of 11.5 to 1 against, because there are 4 Aces in the 50 cards left and you need one of them.

But what if you got a peek at the bottom card of the deck after the dealer shuffled it and was putting it into the shoe? If that card was an Ace, then your chance is lower, because you can’t possibly be dealt that Ace. But if were any other card, your chance is higher, because you’ve effectively removed that card from the deck.

Instead of 4/50, the probability is 4/49: 8% to 8.2%. Seems like a small difference, but that kind of edge works in your favor over many hands.

This is also why card counting works. Card-counts acquire that extra information you need to beat more than the odds.

But you have to be really good at counting, because the edge it gives you even if you play perfectly, is only around 1%. It’s worse than that, because casinos are onto the usual tricks of card counters. Many are now using continuous shuffling machines to reshuffle the used cards after each hand, which removes most of the advantages of counting.

So you have to find another game. There are two in which you still have the opportunity to beat more than the odds: poker and sports. Even better, the casinos, since they take a small cut of each play, don’t care what mechanisms you use to acquire the extra knowledge you need. The cuts, or vig, they do take do mean, though, that you still have to beat more than the odds.

Sports betting is a world unto itself, where insider knowledge can really pay, usually when betting against somebody acting on sentiment. Figuring the odds in poker given the usual assumptions about a deck of cards, and what cards you can see that have already been played, are easy. Anybody can learn how in an afternoon. Yet even if you master these, you’ll still lose.

You’ll lose because of the casino cut, but you’ll also lose because the expert players, the game’s true psychologists, will beat you. They will beat you because they know how to acquire that needed extra knowledge—you’ll give it to them.

The extra knowledge is written all over your face, in your movements, in the way you fiddle with your chips, in the way you play and bet the cards in front of you, and in the way you played and bet your previous hands.

Poker is huge and growing bigger. The cycle builds on itself: as new players enter, the pros get richer, and those riches entice new player. The cycle repeats. Yet the only way to get good at it is to lose—and learn why you lost.

[At this point, I demonstrate a card-reading experiment, in which I distribute four blank cards and ask people to write their favorite playing card on it. The chance I guess the right person of each card is 1/24. I got all four correct. To the poker tables!]

Addendum for webpage: Oh, that number of all what-are-the-chance questions? It’s 1. The probability of anything that happened is 1. It’s only the unknown, future events that are uncertain. And Monty Hall? The probability on the assumptions the prize is behind door 3 is 2/3, meaning the contestant should always switch.

« Older posts Newer posts »

© 2017 William M. Briggs

Theme by Anders NorenUp ↑