Showing posts from July, 2017

Habits versus intelligent practices

"It is of the essence of merely habitual practices that one performance is a replica of its predecessors. It is of the essence of intelligent practices that one performance is modified by its predecessors." -- Gilbert Ryle, The concept of mind, p. 42

Feeling hot, hot, hot

So I think some confusion has been generated in our ongoing discussion of "the hot hand" by the word "streaks." And a good bit of that confusion has been my fault, for including the word "streak" when what I really wanted to talk about was just "hotness" itself -- and here I'm thinking of you, Bob Murphy.

Ha ha, just joking, I swear to you all that I never picture Bob and I showering naked together. Never! For real.

In any case, what I am indicating is the feeling that anyone who has played a sport or music, for any length of time, has had that they "on" at some moments, and not at others. And the TGV authors, besides trying to demonstrate that "hot hands" aren't predictively useful, also imply that the idea that "I am hot right now" is some sort of cognitive illusion.

It seems that TGV may be incorrect on their predictive findings, but that's not what I have been addressing. I am asking "Does a la…

Newest Course Offering

Discrete mathematics, now under construction.

It is an archetypal truth

"that the social structure is corrupt and incomplete." -- Jordan Peterson

Of course, we are obligated at all times to improve the social structure we find ourselves in as much as we can.

But the problem with ideologues is that they think that simply because the current social structure is "corrupt and incomplete," that therefore they are justified in completely demolishing that existing structure.

No, the new structure they establish will also be "corrupt and incomplete," and, per their logic, also require complete destruction.

A "corrupt and incomplete" social structure is always preferable to no social structure.

Misunderstanding narcissism

Many times, people apply the term "narcissist" someone who thinks a lot of themselves. But clinically speaking, that is almost the complete opposite of what the term really means.

Narcissists are, in fact, people who think so little of themselves that all of their actions are directed towards the maintenance of that extremely fragile self-image. So, for instance, if someone tells me Donald Trump is a narcissist, I know they have no idea what they are talking about. Trump may perhaps be an egomaniac, but he is absolutely not a narcissist.

Sense and reference

A couple of readers confused about my post on definitions.

If we change the sense of a turn, we may change its reference as well. (Not always: if we change the sense of X from "the evening star" to "the morning star," X still refers to the same thing!)

But we have not changed any of the facts about what X used to refer to. So if we were to change the sense of the term "cat" to "a large, leaping Australian marsupial," it would henceforth refer to what we now call kangaroos. But that does not mean that the non-human mammal currently living in my house will suddenly have a pouch! Similarly, if we define a new mathematical symbolism, call it Mnew , that is the same as ours (which we can call Mold) for the first use of number, but every subsequent time it is mentioned, its value goes up by one, so that in Mnew, 2 + 2 = 5, since the second '2' means what '3' means in Mold. That 2 + 2 = 4 is always true in ordinary arithmetic, whatever…

Statistical analysis of agent-based models

I have observed that, when one writes a paper using one's own agent-based model, it is now common practice to perform statistical analysis of the output of the model.

This is like hiding an Easter egg under a shrub so that your paper can "discover" it there in its conclusion.

Worst use of "methodology", 2017

FBI profiler commenting on a series of murders: "They were all done with the same methodology."

Is a new, stricter, but still arbitrary threshold really the answer?

Read into Things

A few weeks ago I walk into a coffee shop. I have a book in hand, and as I lean in to look at the menu, I place my book on the counter. The barista observes innocently, "Hey! Another customer came in with a book earlier. Is there a book sale going on around here or something?"

Merry on Rome and America

I don't think I have ever been cited this much in an essay.

What Is a Planet?

Fights over the best definition of a term are often a quagmire: there is no "correct" or "incorrect" definition in the same sense that there is a correct answer to what 2 + 2 equals. Instead, definitions are either more or less useful. If someone tries to define "animal" as "any entity in the physical universe," that definition is not wrong in the same sense the answering "5" to the 2 + 2 problem is wrong. The right attack on that definition is to point out that it renders the word "animal" less useful than does the currently prevailing definition.

"Common usage" is one factor in deciding how we should define a term. All other things being equal, we should defer to common usage. But common usage is not a trump card that defeats all other considerations.

For instance, when Copernicus forwarded his heliocentric model of the solar system, he was, among other things, offering a new definition of "planet." For…

The Real Meaning of "Due to Chance"

Sometimes, people have become so enamored with statistical methods they have hypostatized the terms used in such analysis, and have taken to treating ideas like "chance" or "regression to the mean" as if they could be the actual causes of events in the real world.

The analysis of probability distributions arose largely in the context of dealing with errors in scientific measurements. Ten astronomers all measured the position of Mercury in the sky at a certain time on a particular evening, and got ten different results. What should we make of this mess?

It was a true breakthrough to analyze such errors as though they were results in a game of chance, and to realize that averaging all the measurements was a better way to approach the true figure than was asking "Which measurement was the most reliable?"

This breakthrough involved regarding the measurement error in a population of measurements as being randomly distributed around the true value that a perfe…

A Fixed Roulette Wheel

In the comment section of this post, Bob Murphy asks how I would respond to a paper beginning:

"Abstract: It is well-known that players at the craps table are said to have a 'hot hand' after several advantageous rolls. The rollers themselves often report subjectively feeling 'in the zone' during streaks of successful rolls. However, using both Monte Carlo simulations and Bayesian inference models, we conclude that such 'patterns' are illusory and provide no operationally useful betting opportunity."

The idea is sound, but I think the point Bob wants made can be illustrated even better with an example from Willful Ignorance, a book which Ken B. recommended to me, but now seems to be willfully ignoring! (Sorry, Ken, I could not resist that joke.)

The author tells the story of George, a bright inventor who has figured out how to hack a casino's roulette wheel so that it produces a winning number he wants on command. So he could, say, produce one hu…

A problem with Computer Science education, at present

The approach of giving students "little" problems, and rewarding students who are able to "solve" the problem as rapidly as possible with a high grade, teaches an "anti-pattern": hack your way as fast as possible to any program that can solve the problem you have been assigned.

A skilled software engineer does not approach a "customer" (which customer might actually be his boss, or a marketing executive, etc.) request in that way at all: instead, given X has been requested by "the customer," a skilled software engineer resists fulfilling the request as fast as possible, and instead begins to think:
Is it really necessary to program anything at all to fulfill this request? Perhaps some existing capability in the system actually already satisfies the customer request, if only the customer is educated on how to properly use that capability.Is the request so hard to fulfill, and its fulfillment of such marginal value, that the customer sho…

No, I Don't Believe Probability Judgments Are "Subjective"

Tom was, I think, worried that this is what I was suggesting. Then he got what my claim is. But in case others misapprehend it...

1) There are no judgments whatsoever that are "purely subjective." Any judgment is an attempt to assert something about the world. Although Oakeshott's arguments on this point (in Experience and Its Modes, chiefly) are more robust, I think M. Polanyi's arguments in Personal Knowledge are still very good but also more accessible. If I claim that "The odds of that coin coming up hands are one in two," I am saying something about the world "out there," rather than commenting upon some "purely personal" state of my own.

2) As such, there are better and worse judgments about what the probability of some event is. If all I know is, "Tom is flipping a fair coin," then the correct probability to assign to "The coin will come up heads" is .50. One way to defend my claim here is to note that anyone …

Hot Streak Length

The critics of this model claimed "It implies a streak length of one."

Well, it doesn't:

import random

SHOTS = 50
in_streak = False
hot_streaks = 0
hot_total = 0

print("Shooting with hot streaks:")
for shot in range(1, SHOTS):
    hot = (random.random() < .5)
    if hot:
        hot_total += 1
        if not in_streak:
            in_streak = True
            hot_streaks += 1
        make = (random.random() < .66)
        in_streak = False
        make = (random.random() < .33)
    mark = 'X' if make else 'O'
    print(mark, end='')
print("Average hot streak length = " + str(hot_total / hot_streaks))

print("Shooting without hot streaks:")
for shot in range(1, SHOTS):
    make = (random.random() < .5)
    mark = 'X' if make else 'O'
    print(mark, end='')

And the output is:

Macintosh:statistics gcallah$ ./
Shooting with h…

The Internet Is a Wonderous Place!

I have programed for 30 years now. I have published dozens of articles in professional software engineering journals. I have written programs used to trade tens of millions of dollars of securities each day. I teach computer science.

And today Ken B. informed me that if I set a random variable once outside of a loop the result will be different than if I set it anew each time around the loop!

Great Minds Think Alike...

"probability is indeed a degree of certainty..." -- Jacob Bernoulli

"It is most certain, given the position, velocity, and distance of a die from the gaming table at the moment when it leaves the hand of the thrower, that the die cannot fall other than the way it actually does fall... Yes it is customary to count the fall of the die... as contingent. The only reason for this is that those things which... are given in nature, are not yet sufficiently known to us." -- Jacob Bernoulli

"Probability, in its mathematical acceptation has reference to the state of our knowledge of the circumstances under which an event may happen or fail. With the degree of information which we possess concerning the circumstances of an event, the reason that we have to think that it will occur, or, to use a single term, our expectation of it, will vary."  -- George Boole

Probability is about our knowledge...

and not a fixed feature of the world "out there."

A couple members of the commentariat I have complained that in this model, it is necessary to have "inside knowledge" to beat someone who thinks the odds are 50-50 on any given shot. Now, I don't care whether you want to call what "Gene" knows in that model "inside knowledge" or not. Either way, that is missing the more important point: "the odds" change with our knowledge of a situation.

To illustrate: imagine I ask you to predict the odds that an American, male, 40-year-old will live to be 78? Well, if that is all the information you have, you should answer "Even odds." (I looked that up, but from here on out my odds are all just plausible-sounding guesses.)

But now I tell you, "Oh, and he's a heavy smoker."

Oops, better revise that forecast: say, 2-1 against.

But then I add, "And so were all of his deceased male relatives that we can identify, and th…

Not Surprised Rob Got This Wrong, but

et tu, Ken?

Because it is trivial to show that the hot streaks in my first program on this topic are real, and can be bet on successfully by anyone who knows they exist, and it only takes a couple more lines of code:

SHOTS = 100
MISS_BET = False

gene_stake = 100
kr_stake = 100
gene_bet = MAKE_BET

make = 0.0
print("Betting with hidden hot streak mechanism:")
for shot in range(1, SHOTS):
    hot = (random.random() < .5)
    gene_bet = MAKE_BET if hot else MISS_BET
    if hot:
        make = (random.random() < .66)
        make = (random.random() < .33)
    if gene_bet == make:
        gene_stake += .97
        kr_stake -= .97
        gene_stake -= 1.03
        kr_stake += 1.03

print("Gene's final holdings = " + str(gene_stake))
print("KR's final holdings = " + str(kr_stake))

KR, thinking the outcome is 50/50, are willing to "make book" and take bets on either side, so long as they get a house &…

Either The Supreme Court was doing just what I claimed...

Or Clarence Thomas doesn't really know anything about how the Supreme Court works:

"As Justice Clarence Thomas points out in his separate opinion (joined by Justices Samuel Alito and Neil Gorsuch), when the Court reviews a stay, it is essentially assessing whether lower-court rulings will be ultimately reversed on the merits. There would be no reason for the Supreme Court to narrow the lower-court stays of the travel ban if the justices were of a mind to concur in the lower courts’ reasoning."

So Josiah, please take this up with Justice Thomas.

TGV on Hot Hands

Tversky, Gilovich and Vallone wrote a famous paper "debunking" the idea of a "hot hand." When they did so, they conflated two very different questions:

1) Is it sensible to feed the ball to a player with a "hot hand," since he has a greater chance of making his next shot? I.e., is there predictive value in this phenomena?

2) Is the impression that players have that sometimes they are "on" and sometimes not an illusion? I.e., does the phenomena exist at all?

The findings of their paper, if accurate (and recent research suggests they are not), would show that there is no predictive value in hot streaks, whether or not they really exist. But by defining "hot streaks" as simply being this predictive value, the authors, without any basis for doing so, also claimed that players' perception of being "on" at certain times is just an illusion.

So any reader complaining that my recently posted model "does not follow the TGV d…

A Simple Model of Real But Random-Looking Hot Streaks

This model is not supposed to be realistic!


Before every shot, a player enters either the state "hot streak" or "cold streak" with probability 1/2.

A player on a hot streak has a 2/3 probability of hitting a shot during that streak.

A player on a cold streak has a 1/3 probability of hitting a shot during that streak.

We can program this, and know with certainty that there are periods when the player has a 2/3 chance of making a shot, and periods when he has a 1/3 chance... and yet it does not help us at all in predicting the next shot. (From the outside, not knowing if the streak is "on" or not, there is always a 50% probability that the next shot will go in.)

Here is a Python program implementing this algorithm and also implementing another loop with a simple 50% chance of hitting for comparison:

import random

SHOTS = 50

print("Shooting with hot streaks:")
for shot in range(1, SHOTS):
    hot = (random.random() < .5)
    if hot:

Fisher on Scientific Judgment

"The Natural Sciences can only be successfully conducted by responsible and independent thinkers applying their minds and their imaginations to the detailed interpretation of verifiable observations. The idea that this responsibility can be delegated to a giant computer programmed with Decision Functions belongs to the phantasy of circles rather remote from scientific research." -- Ronald Fisher

Thanking Ken B. for his Willful Ignorance...


Ken recommended the book Willful Ignorance to me. It arrived today; I randomly* opened it up and found a section on "The Ignorance Fallacy." In the section, the author, Herbert Weisberg, discusses the "hot hand fallacy." After a quick review of the evidence, he writes:
So, it appears that streakiness is just a myth. Or is it?

Let us accept for the moment the hypothesis that pure randomness can plausibly explain almost any hot hand streak in sports or games. Does that necessarily imply that such streaks do not really exist? Consider that there are a great many factors, most not measurable, that might influence any individual outcome, such as one particular game or at bat... What the research certainly tells us is that if such factors exist, they must be haphazard enough to appear essentially random. And this is precisely what I have pointed out a number of times in the past: the findings "debunking" hot hands are all entirely consistent …

The worst IT book EVER!

Man, I feel so cheated. I bought a book by some Polya fellow that claimed it would explain "How to Solve IT."

But I'm 50 pages in, and the guy just can't stop banging on about mathematics; not a peep about IT yet!

"Self-Plagiarism" Versus Good Engineering Sense

I've always had a problem with the notion of "self-plagiarism": I suggest it is just an artifact of IP law, and not, like "other plagiarism," a matter of honesty.

If Joe gave me idea X, and I publish it as my own, I am lying, and failing to give Joe proper credit.

But if Genet gave Genet + 1 idea X, does it really make any sense to say that Genet + 1 is lying in saying that the idea was his?

Well, no, it obviously doesn't. The only purpose of the strictures on "self-plagiarism" is to enrich copyright holders at the expense of an author being able to re-use his own ideas.

And all of my training as a software engineer rebels against this concept: as an SE, you want to re-use code at every chance you can!

UPDATE: A quote on code re-use:
Code reuse

Only suckers start from scratch. In fact, today I took out some code I wrote over the summer, changed five lines, and started it running again. Woo hoo. It was sitting there in a code repository waiting fo…

"Procedure" and "Data Structure" - A Distinction without a Difference

"The inner coming-to-be or genesis of substance is an unbroken transition into outer existence, into being-for-another, and conversely, the genesis of existence is how existence is by itself taken back into essence."
- Hegel, Phenomenology of Spirit (paragraph 42) What happens in computer programs?

Classically, an algorithm is a well-defined procedure that takes input and returns output. The input is some piece of data. You know, a number; or string. The procedure turns this number into another number; or a string into a number. Or whatever.

Literarily, a crystallized objective object comes in. Upon it acts the action of a thousand rapid hands too quick to see. Finally, fresh out of the fire, the result pops out, separate from its furnace, like a piece of toast from the maw of the toaster.

Briefly, Data. Process. Data.

We didn't come out of the womb knowing this pattern though. We had to be taught. A teacher had to guide our hands, pointing, "Look! Those numbers! T…

Statistically Significant Harm Caused by Statistical Significance

I have argued before that the great importance placed on α = .05 in statistical studies is an attempt to replace educated judgment with a technical decision. But that decision itself is arbitrary: there is no particular reason to choose .05 over .04, or .06, or any other number less than .50.

It turns out it is even worse than I thought: an education that focuses on such a cutoff leads "researchers to interpret evidence dichotomously rather than continuously. Consequently, researchers may either disregard evidence that fails to attain statistical significance or undervalue it relative to evidence that attains statistical significance."

Education in statistics, at least as it is too often taught today in schools, makes one worse at likelihood judgments.

A Big Data Problem

"Suppose we are constructing a prediction of some measured response in terms of 20 characteristics...  a common event in machine learning. How large is 20-dimensional space? If we divide each predictor's range into quartiles, the 20-dimensional space is divided into 420 different sections. If you have a billion individual cases, on average there will be only one case every thousand sections. Hardly an empirical base to build upon with confidence!" -- Stephen M. Stigler, The Seven Pillars of Statistical Wisdom

Come again?

Journalists are supposedly taught to keep sentences and paragraphs short, so that their writing is easy to follow. How, then, did the following come about?

"However, Jazz management opted not to risk losing Hill in free agency without a suitable replacement after he declined their attempts to sign him to an extension during the season, trading Oklahoma City's lottery-protected 2018 first-round pick to the Minnesota Timberwolves for Rubio before the July 1 deadline to use salary cap space remaining from last season."

I've read that three times now, and while I understand it involves three teams, two players, and a draft pick, I really don't understand much more than that.

Bleg: Does Skype have the worst user interface ever?

OK, I have "Pending contact request"s on Skype. The obvious thing to do would be to make that message itself a link to the dialogue where you accept the request.

But Skype did not do that.

A second best would be have an option on the "contact" menu called something like "Accept pending requests."

But Skype did not do that.

A third best might be to double click on the contact from whom one has the pending request, and then get a button or something to accept the request.

But Skype did not do that.

I have searched Skype help for "pending" and "accept": nothing. Searching for "request" explains how to send a contact request. I asked both of the people who sent me requests if they know how to accept requests, and neither of them has any clue. I have googled, but every result I get seems to describe some earlier version of Skype because the "Accept" button they talk about is not where they say it should be.

What, exactl…

Did you know...

Fortran was updated less than 10 years ago?

Being a developer

A nice post from my friend Scott Johnson on being a developer.

The identitarians are not always wrong!

I have often asserted here that no ideology could ever gain any traction if it did not contain at least some partial truths. So, for instance, libertarians are certainly correct in asserting that any attempt at economic regulation tends to get captured by special interests.

Similarly, although the racial and sexual "identitarians" often spout nonsense, they are certainly correct in thinking thay mainstream discourse often "priveliges" certain groups.

For instance, Netflix captioning, when a person is speaking a European language, almost always reads, "Speaking Russian," "Speaking Italian," etc.

But when almost any non-European language is being spoken, the captioning reads, "Speaking in native language."

I see similar reports on athletes from Africa: "Olu speaks five African dialects." Because, you see, there is a single language, called "African," and Ga and Ewe and Twi and Fante and Wolof and Swahili and... are a…