Friday, July 30, 2010

The Sound of Music

I've always been intrigued by music; there's something almost incomprehensible about its appeal, which, nevertheless, you desperately want to comprehend. At least I do. And the best I can do is sort of nibble 'round the edges.

For one thing, it's a temporal art form. Mostly you experience it over time, however long it takes to hear a performance (or a recording thereof). And if you feel its impact, be it sadness, suspense, gladness, or even a kind of horror, that too is felt over the duration of the music. It never happens that a piece of music saves up all of its emotional impact for a single whap in the face, like a painting or a sculpture might. Yes, I'm aware that those art forms have nuances that can take extended or repeated viewings to appreciate. But for those forms, it is possible for the entire gestalt to strike you at a single moment, followed by a sustained decay of gradual discovery.

To be sure, trained musicians can look at a musical score and apprehend it. But even then—unless they are familiar with the music, and sometimes even then—they hear the music in their head, once again over time.

And the emotions you feel—oh! Music seems to speak to us in a language that is uniquely suited, not for communication, but only for emotional transference. A strain of music can connote hope or despair, struggle or triumph, seemingly no matter your roots or background. You almost think that if only somehow that universality could be harnessed, you could solve the world's problems in a single swoop—but then, that sounds like a travesty to be visited on music. At times I feel as though it should be protected from that kind of directed use.

Music stays in us. We have a tune stuck in our head. As much as we may appreciate the Mona Lisa or the David, how often do we complain that one of those (or their modern counterparts) are stuck in the same way? Maybe music gets a leg up from being a primarily auditory art form. We get so much of our information about the world from our eyes; our ears are generally accompanists, not the featured performer. As a result, though, it works its magic subliminally, providing a soundtrack for us. Seeing a visual art form may put us in an ecstatic trance of exploration, but rarely does it pull something directly out of us, something we recognize. Whereas surely all of us have songs that invariably draw forth some sharp memory. Music makes us aware that we have a story.

None of which brings me much closer to being able to comprehend its appeal in any meaningful way.

Thursday, July 15, 2010

A Tale to Tell

People love to tell stories. It's something that I think is fundamentally built into the human psyche. Having others' attention and entertaining them with a good story is as strong a rush as there is. I've heard that the vast majority of criminals, when arrested, will simply confess because the urge to tell their story to a captive audience is just too strong.

This tendency manifests itself even when there is, quite literally, no story to tell. The clustering illusion denotes the human impulse to see significance in random patterns. Suppose a series of ten coin flips goes as follows: T, H, H, H, T, T, T, T, T, T. A lot of people (but hopefully not too many of my own readers) would see the coin as streaky, though how they would react to that perception might vary: Some might conclude that the coin was "due" for heads and bet that way, while others might conclude that it was on a "tails" streak and bet that way. (For what it's worth, I flipped a quarter ten times and that's exactly the way they came out.)


This has major implications for how we watch and remember sporting events. Maybe the most obvious example of this is the so-called "hot hand" in basketball: the idea that a shooter is "in the zone," and more likely than normal to hit any given shot. Various studies have looked for and failed to find evidence for the hot hand. It's entirely possible that the hot hand is wholly illusory, that it's just the clustering illusion in play. However, as Carl Sagan was wont to say, absence of evidence is not evidence of absence. Except for free throws, in which shot selection and defense have no play, shooting accuracy is highly contextual. Some shots are wide open, while others are tightly contested. They are shot from all over the field. Some are shot on the run, others are shot on the step back, while still others are spot up shots. What's more, players are intensely aware that they're hot, and as a result may shoot any hot hand they have in the foot (as it were). All these factors conspire to make the hot hand difficult indeed to discern. (For free throws, there is apparently a moderate hot hand; see this paper (or at least its abstract) by Jeremy Arkes.)

But a more basic example is in how we all remember and talk about the game afterward. We talk about the shooting struggles of such and such a player, and how (if our team won) he overcame that adversity and pushed through to get the win. We look back in our memory and find events that, although they seemed minor at the time, turned out to have momentous impact on the outcome of the game. Consider this account of Game 7 of the 2010 NBA Finals:
With 8:24 left in the third quarter, Celtics point guard Rajon Rondo picked up a loose rebound off Paul Pierce's miss from 19 feet, and pushed it back in to put the Celtics up 49-36. And through 28 minutes of play, Kobe Bryant had had an abysmally poor night on the offensive end. He had shot three of 17 from the field and one of three from the free throw line for seven points and a true shooting percentage of only 19 percent. Largely as a result of his terrible performance, the Lakers found themselves down by 13. To be sure, Bryant had eight rebounds (four of them on the offensive end), but that hardly put a dent in his overall play.

On the play, however, Pierce injured his shoulder and had to sit out for a spell. Bryant thought he saw something that he could exploit as a result, and went to work. On the very next play, he drove into the lane and drew a shooting foul on forward Rasheed Wallace. He only made one of his two free throws, but from then on his performance surged abruptly upward. Starting with that play and for the rest of the game, Bryant gathered seven more rebounds and shot three of seven from the field and 10 of 12 from the free throw line for 16 points and a true shooting percentage of 65 percent, leading his team to a 83-79 win for the title.
Sounds pretty interesting, doesn't it? Makes you wonder what it was that Kobe saw that he could take advantage of. I would wonder, too, except that I just now made it up. Everything else is true, but the sentence in bold is conjured out of whole cloth. Actually, Kobe simply tossed his hands in frustration for a second before taking the inbounds pass and dribbling it upcourt. In trying this narrative out on a couple of folks, though, I found that it was compelling because once people see the remarkable contrast between Kobe's play before that moment and his play after it, they assume that something equally remarkable must have happened to precipitate it. We will latch onto any little thing as an explanation, even if it had no more to do in fact with the game than any other little thing. Right place, right time.

As far as I can tell, though, there was nothing in that game that happened to Kobe. Aside from a trio of truly horrible shots that he took with the shot clock running down, his shot selection was not noticeably worse while the Lakers were falling behind than it was during their comeback. Sometimes, you know, a cigar really is just a cigar.

Friday, July 2, 2010

Points on the Board

In the wake of the Lakers' mud-slogging Game 7 win in the NBA Finals over the Boston Celtics by the score of 83-79, some fans were incredulous that a team could shoot 32.5 percent (27 of 83) and still win. In fact, many of them felt that the Celtics lost the game, rather than the Lakers winning it. To me, that sounds a little silly, inasmuch as basketball is a head-to-head sport. If the Lakers were shooting that poorly, presumably the Celtics had something to do with that, and just as presumably, the Lakers were doing something else to win the game.

So what was that something? I'll give you a little hint. It begins with "offensive," and it rhymes with "rebounding."

In the unlikely event you haven't caught on, a major key to the Lakers' victory was their offensive rebounding; they won that battle 23-8 over the Celtics. To be sure, gathering 23 offensive rebounds is usually a dubious feat, for it requires the team to miss far in excess of 23 shots. So to a large extent, the dominance of the Lakers on the offensive boards was a reflection of their miserable 32.5 percent shooting clip.

However, the Celtics only gathered 32 defensive rebounds, meaning that of the 55 rebounds available after Lakers misses, the Lakers collected almost 42 percent of them. So not only did the Lakers get a lot of offensive rebounds, they got them at an stunning rate, and that doesn't depend on how many shots they missed. To give you an idea of just how stunning that is, the NBA league average is about 26 percent. The Lakers were more than half again as effective at getting offensive rebounds. By contrast, there were 38 rebounds available on the Celtics' offensive end, and they got only 8 of them, for an offensive rebounding rate of 21 percent, a bit lower than average.

That suggested the following little puzzle: All those offensive rebounds increased the Lakers' overall efficiency at the offensive end, by giving them extra shots at the basket on each possession. Can we express that increased efficiency in terms of shooting percentage—in effect, collapsing the two figures into one?

I believe we can. Suppose for the moment that we don't care about free throws, three-point shots, and all those aspects of scoring that in truth are rather important. We only care about the raw shooting percentage. The Lakers hit 0.325 of their shots. If their offensive rebounding rate was 0 percent, then the fraction of their shooting possessions (as opposed to possessions that end with a turnover, say) that they score on is 0.325.

However, in truth, they rebounded 0.42 of their misses. They miss 1 - 0.325 = 0.675 of the time, so out of all their shooting possessions, they end up with the ball again on 0.42 × 0.675 = 0.28 of the time. Then they'll score 0.28 × 0.325 = 0.09 of the time, and so on. If they miss, they can rebound again, which they'll do 0.28 × 0.675 × 0.42 of the time. And so on.

It's much more concise to put this symbolically, as follows:

Fraction of shooting possessions ending with a score = 0.325 + 0.675 × 0.42 × 0.325 + 0.675 × 0.42 × 0.675 × 0.42 × 0.325 + ...

Each time, there's an extra factor of 0.675 × 0.42, representing the Lakers missing and then picking up the rebound. Since this can happen an arbitrary number of times in a given possession, this equation can have an infinite number of terms (well, limited only by the length of the game). This is called a geometric series, and fortunately, there's a simple formula that allows you to calculate the sum without adding and multiplying an infinite number of terms. Therefore,

Fraction of shooting possessions ending with a score = 0.325 ÷ (1 - 0.675 × 0.42) = 0.45

That is to say, 45 percent of shooting possessions end in a score for the Lakers. Not to put too fine a point on it, that's still fairly awful. But not as awful as the original shooting percentage suggested.

But now, as I said, I'm going to try to combine the offensive rebounding and the shooting percentage into a single composite figure, by asking this question: Suppose the Lakers gathered only 26 percent of their misses as rebounds (the league average), instead of the 42 percent they actually gathered. How much better would their shooting have had to be in order to match that 45 percent per-possession efficiency? In symbolic terms, solve for x:

x ÷ (1 - (1- x) × 0.26) = 0.45

I'm not going to make you do that for homework; I'll just give you the answer: It turns out that x = 0.38. In other words, if the Lakers had crashed the offensive boards like an average team, they would have had to shoot 38 percent in order to score on 45 percent of their shooting possessions. Like I said: Bad, but not historically bad—not bad like 32.5 percent bad.

To put it another way, their tremendous offensive rebounding was worth 5.5 percentage points on their shooting. That's huge: 5.5 percentage points is usually worth about 10 points on the scoreboard by the end of the game.

We can turn this approach to the Celtics, too. They shot 41 percent (29 of 71), and picked up 21 percent of their offensive rebounds. That means that they ended 47 percent of their shooting possessions with scores:

0.41 ÷ (1 - 0.59 × 0.21) = 0.47

However, if they had just rebounded like an average team on their offensive end, they could have shot a bit worse and still matched that per-possession efficiency. Solve for y:

y ÷ (1 - (1- y) × 0.26) = 0.47

Again, I'll save you the algebra and give you a peek in the back of the book: y = 0.395. That is, if the Celtics were an average rebounding team, they would have achieved that efficiency by shooting just 39.5 percent. A bit better than the Lakers, but I think you'll agree that 39.5 to 38 is a lot closer than 41 to 32.5. Almost six times closer, even.

Now, the Lakers actually won, which means they must have done other things as well to get the win. For one, they turned the ball over somewhat less often, even with all the extra cracks at their offensive end: just 11 turnovers to Boston's 14. And the Lakers also visited the foul line more often (although some of those free throws were toward the end of the game, when the Celtics were fouling to stop the clock, and the Lakers shot poorly on their extra free throws just the same). Those two factors were enough to put the Lakers over the top. But the dominant factor in overcoming an awful shooting performance was their persistence in rebounding on the offensive end.

Friday, June 4, 2010

Say It, You Know You Want To

I think it's safe to say the time has arrived.


You should be able to get a somewhat larger version by clicking on the above image.

Friday, April 30, 2010

Bending Over Backwards

One of my favorite science bedtime stories (didn't you have those when you were a kid? or now, if you're still one?) involves the French physicist Prosper-René Blondlot (1849-1930), whose principal claim to fame, sadly, was a non-discovery.

In this particular case, Blondlot was working in his laboratory in the wake of a flush of discoveries concerning radioactivity and X-rays. Apparently, he was trying to polarize X-rays (a tricky task owing to their high frequency and short wavelength), and as part of his attempt he placed a spark gap in front of an X-ray beam. After a few experiments with this set-up, it seemed to him that the spark was brighter when the beam was on than when it was off.

He attributed this to a new form of radiation, which he called N-rays after his home town and university of Nancy. He may have been influenced by all the work on radioactivity and X-rays then going on, but at any rate, he set about immediately to investigate attributes of the new radiation. It appeared, he said, to be emanated by many objects, including the human body. It was refracted by prisms made from various metals, although these had to be specially treated in order to prevent them from radiating N-rays themselves.

It was all very interesting, and for some time, there was a burst of scientific activity on N-rays. The problem was, the N-rays themselves were very shy and retiring, and many physicists had trouble reproducing the results obtained by Blondlot and his staff. But Blondlot always maintained either that they had inferior equipment, or inferior perception.

You see, there was no objective recording of N-rays. All one had was a subtle brightening of a spark, which Blondlot and his colleagues were already prepared to see. To lend at least some notion of objectivity to the research, Blondlot took photographs of the sparks and other N-ray phenomena, but this merely replaced subjective judgment of a live spark with subjective judgment of a photograph. Means for measuring the light output were not sufficiently reliable or accurate yet to resolve the matter.

What did resolve the matter in the end was a visit to Nancy by the American physicist Robert Wood (1868-1955). Wood had tried himself to detect N-rays and had failed signally. Frustrated at his wasted efforts, and curious as to the differences between Blondlot's staff and equipment and his own, he travelled across the ocean to see for himself.

Wood had by this time in his career established himself as something of a debunker, a sort of turn-of-the-century James Randi. But Blondlot was no charlatan; on the contrary, he was firmly convinced of his own discovery. So he had no misgivings about demonstrating his N-rays before Wood and others. He darkened the laboratory (the better to see the increase in brightness). He set his aluminum prism on a platform to refract the N-rays, made some measurements, rotated the platform a bit, made some more measurements, and so on, all the while casually detecting the N-rays. For his own part, Wood could see nothing of what Blondlot was describing. But he kept quiet, waiting for the experiments to conclude.

When they did, and the lights were turned back on, there was general astonishment, for despite all the careful measurements on the refraction of N-rays, there was no aluminum prism sitting on the platform. Wood had, it turned out, pocketed the prism early on in the experiment. The entire time, Blondlot and his staff had been obtaining gradually changing measurements of an unchanging experimental set-up. That spelled the end, for all intents and purposes, of N-rays.

What happened? Intentional deception can be ruled out rather easily, since Blondlot would have known that careful experimentation would eventually disprove N-rays; it would have been a most temporary fame. Nor was he a shoddy scientist. Before the N-ray affair, he was known for having measured both the speed of light and the speed of electricity through wires, a task that had stymied others, and which established that the two were very close (though not quite the same).

Consensus today is that Blondlot had simply wanted to believe in N-rays, expected and wanted to see the predicted brightening, so much that he really did see it, sincerely. It has been suggested that he may have been motivated by nationalism; X-rays were discovered by the German physicist Wilhelm Roentgen, and Germany had recently taken a sizable chunk of France, so that Nancy was now uncomfortably close to the French-German border. But my own feeling is that it almost doesn't matter. At some point, the desire to see his discovery of N-rays vindicated became its own driving force.

The N-ray affair is often cited in support of what is, in my opinion, a central—perhaps even the central—insight of scientific discovery: The easiest person to fool is yourself. And fooling yourself is a necessary prelude to fooling others; charlatanry would have been easier to expose. Exhibit A in support of this position is the sad fact that although N-rays essentially died a hard death in 1904, Blondlot lived on for another quarter century, continued to be productive in science, and took his belief in the existence of N-rays to his death.


It is because it is so easy to fool oneself that science is, and must be, an essentially social activity. It is often said that in science, experimental data rules the day. That's overstating it a bit. Experimental data is indeed necessary for science to progress, but that data means little without scientific theory to organize it (and vice versa). It's not that the data is more important than the theory, but that it validates it, makes it less likely to fool yourself or anyone else. And there's a strong social pressure, within the scientific community, for one to bend over backwards in an attempt to subject one's theories to as much scrutiny as possible. It's that intense examination, which eliminates many theories but marks the ones that survive with an imprimatur of robustness, that distinguishes science from so many other human activities (ahem, politics?) and has made it one of the most successful endeavors of all.

Wednesday, April 14, 2010

Back, Slash, Back!

Remember this post? Probably not, but now I have some company and/or vindication. Check out this xkcd comic, drawn by the redoubtable Randall Munroe.


Observe: Friends don't let friends say "backslash" in their URLs.

Tuesday, March 23, 2010

A Beginning, a Middle, and an End

One thing I alluded to in my previous post, but never made entirely explicit, is the notion that there are distinct phases to a basketball game (and indeed to many sports competitions), which we might call—by analogy to chess—the opening, the midgame, and the endgame. The difference between the opening and the midgame is pretty ill-defined, and in my conception is based on the feeling that teams like to start games by trying out the various things they've worked on in practice, but within a general framework, and by the time they've gotten some ways into the game (after the first set of substitutions, say), they've got an idea for what's going to work in this game, and put it into practice in earnest. As I say, it's not a clear-cut distinction and we could argue endlessly (and, I think, pointlessly, though I'd be happy to be proved wrong) about where the exact division is.

But in my opinion, from a stats geek point of view, there is a clear-cut distinction between the midgame and the endgame. And the strategies are, empirically, different in the two parts of the game.

The whole objective of a basketball game (and in most games that involve points) is to outscore your opponent. And as basketball consists primarily of a sequence of alternating possessions, the goal should be to score more in each possession than your opponent does, by and large. That's why statistics such as points per possession are supplanting others like points per game, and rightly so. The former accounts for the fact that a game consists of a rather arbitrary but evenly matched number of possessions for each team, and the latter doesn't.

In fact, I'd argue that that objective—outscoring your opponent on a per-possession basis—is exactly the definition of the midgame. During this phase, which lasts for most of the game, you are trying to be as efficient as you can on the offensive end, while preventing your opponent from doing the same. Makes sense, doesn't it?

The question that you might be asking, though, is why this isn't your objective the entire game, why this is only the goal for the midgame. And the answer to that (you knew I had one coming, didn't you?) is that during practically any game, there comes a point where the actual scoring margin outweighs average efficiency.

Perhaps the simplest example is the decision about whether or not to shoot a two-point shot (a "deuce") or a three-point shot (a "trey"). Suppose the shooting percentage on the former is x percent, and on the latter is y. In the midgame, where all you're concerned about is the average number of points scored on the shot, you prefer the deuce if 2x > 3y, and you prefer the trey otherwise (ignoring offensive rebounding and the like, which we shouldn't do in a more extensive example).

In the endgame, however, it can be quite different. Suppose you're down two, and you have the ball with the shot clock off. You're going to hold for the final shot. The question is, what shot should that be?

If you shoot the deuce and you make it, you'll tie the game and go into overtime, where you'll win about half the time (studies apparently show that any apparent "skill" at winning overtime games is just a matter of small sample size). The winning probability is therefore x/2. On the other hand, if you shoot the trey and make it, you'll win the game outright, with probability y. So in this case, in the endgame, you prefer the deuce only if x > 2y (a strictly stronger condition than in the midgame), and you prefer the trey otherwise. (And as the defensive team, you probably want to shift more of your attention to the three-point line than you would during the midgame.) The point of this little example is that your objective is shifted, from efficiency in the midgame, to winning probability in the endgame.

The next question: When does this shift take place?

There's no one right answer, but I think one place to start is one I mentioned in connection with a rule of thumb I came up with for determining when a game is mostly out of reach. (Not to put too fine a point on it, a fellow by the name of Bill James also came up with the same rule.) To first order, I think, that same epoch in the game is where the switch between midgame and endgame happens (or "ought" to happen). After that point, the team that's trailing tries tactics that are not the most efficient (and therefore wouldn't be used during the midgame) but nevertheless maximize one's chances of winning the game; the team that's ahead plays to prevent their opponents from utilizing their preferred endgame tactics.

There's a bit of a catch, though, in that my rule (OK, Bill James's and my rule), strictly speaking, applies only to evenly matched teams. For the most part, that's not a stretch in the NBA, but you could imagine a game between an NBA team and a college team, even a very good college team. If both teams just try to be as efficient as they can, the NBA team will blow out the college team. In order to win, the college team would have to play their endgame practically from the opening jump, by employing some kind of gimmick, such as a non-stop trapping defense. Lest you think this is some kind of merely theoretical possibility, such a ploy has been tried in some circles, to some success.

And it likely has some statistical validity, for inferior teams can generally win only by introducing more chaos into the game (in the non-technical sense), which increases scoring variance. And there's no question gimmicks usually do that. Most of the time, they still won't work, but they'll give you a puncher's chance.

What's the point, in the end? As a kind of pie-in-the-sky proposal, since the objectives in the various phases are different, analyze them differently. Collect or synthesize different statistics for them. And maybe, as a result, you learn something new about why some teams can finish, and others can't.