spacer
{Arrest This Man, He Talks In Maths } spacer

Blog : Archives : Homepage

With your feet in the air, and your head on the ground . . .

spacer
spacer

{Wednesday, April 26, 2006}

 
For all the Bill James, Billy Beane, Moneyball talk about optimally predictive baseball statistics, I've still never heard of this conceptually simple, but computationally intensive statistic:

First, consider all the at-bats in all the major league games ever played: at the time of a given at-bat, there's a game condition, which can be neatly summarized by 3 simple measures: Current difference in score, current inning & number of outs, and current positioning of runners on base (e.g. leading by 2, 4th inning with 1 out, a runner on second.) You can add more variables if you want (also increasing degrees-of-freedom) but I think this is a good minimal set of measures. Okay, now let's call these measures D (difference), O (outs), and R (runners). For each triple {D,O,R}, there's an associated probability that the team will win the game, in the end; we'll call this p(W|{D,O,R}). To create a 'look-up table' for this stat, we need to crunch through every at-bat in MLB history (or the last 50 years, or whatever) and calculate the probabilities.

Okay, so: When the batter comes up to the plate, the team's chance of winning is p(W|{D,O,R}i), with 'i' denoting the fact that this is the 'initial' state. We can look the value up in our table. The result of the player's at-bat is p(W|{D,O,R}f); the team's chance of winning has changed, and taken on some new value. The player's contribution to the team, therefore, has been p(W|{D,O,R}f)-p(W|{D,O,R}i). Simple!

The two best things about this stat are:

(1) It measures 'clutch peformance' in a really meaningful, and nicely continuous way. If A-Rod hits lots of HRs, but really does actually tend to hit them in the late innings of blowouts, he will get a lower 'score' than you'd expect from the stats we usually look at; if a guy is an awesome situational hitter, drawing walks when he should (to best help the team), getting down the sacrifice bunt, etc, he'll get a higher score.

(2) It's directly interpretable in terms of a player's expected impact on his team, in terms of wins & losses. Really, what more could you want from a stat?


The way I described it is really a slight over-simplification. Players should get 'points' for anything attributable to them as an 'action'; if a guy steals a base, he's changed the {D,O,R} state, and should get credit for it. Like, Dave Roberts would have gotten a massive p(W|DOR) jolt for stealing that base off of Rivera & Posada in game 4 a few years ago, even though he didn't even have an AB in the game. Better yet, you can apply the stat equally well to pitchers: each batter a guy faces results in a change in p(W|DOR). Using this stat, in fact, might be a cool way to resolve the debate about how important closers are relative to starters, and who the best closers are; it would be ideal, since it provides such a direct measure of 'clutch' performance, and closer is the position where that matters most consistently.

One cool potential addition: add measures for 'games left in the season' and 'number of games in or out of the playoffs', to get a handle on clutch performance on a longer timescale. You wouldn't build these factors into the main look-up table; instead you'd just use them to weight the player's d(p(W|DOR)): if you hit a game-winning HR for a team 25 games out, in August, that's less meaningful than bunting a guy over to third for the first out in the 9th when you're down by one, for a team just a half game up in the wildcard race, in mid-september.


The only disadvantage of this stat, that I see, is the fact that it gives so much weight to clutch performance. If you think psychology has no impact on the game at all, and situational hitting ability is homogeneous across the leage, then you'd take an A-Rod HR late in a blow-out as just as predictive of his chances of helping the team in a close game, regardless of the situation. Turned around, you don't want to make the Type 1 error of thinking apparently 'clutch' contributions are more predictive than they actually are. However, players have so many ABs in a season, and in a career, than with a continuous stat like this, I don't think 'spurious' clutch performances will affect things too much: there's not enough noise.

I'd love to actually compute this stat. I wonder who has the necessary database, coded the right way. I figure it's got to exist.

posted by Miles 3:34 PM
  (1) comments
 
Why, you ask, should you be concerned with the question 'who would ask the question "how many words, at minimum, are required to ask 'what is the maximum number of sequential question marks you can grammatically place at the end of a hierarchically structured query like this?'?"?'?


(To my knowledge no one has previously pondered this. If you'd like to try setting a new world record (5 ?s, at the time of posting) just click that "comments" link below.)

posted by Miles 3:24 PM

  (1) comments

{Wednesday, April 19, 2006}

 
A cool little discovery courtesy my subconscious, always-tune-humming mind:

Listen to The Pretenders' "Middle of the Road".

Now listen to The White Stripes' "Fell in Love with a Girl".


Check that out. Who knew?

posted by Miles 2:56 PM

  (1) comments

{Tuesday, April 11, 2006}

 
I've walked the same route to work at least 500 times. Somehow, it wasn't until this morning that I realized: if I walk on the right side of street on my way in, in the morning, I can be in the sun the whole way. I'm walking basically due South, so when the sun is rising, in the East, the houses on the left side of the street cast a shadow over the sidewalk on that side, but the right side of the street is in direct sunlight.

An amazingly simple fact, but one that had never entered my mind; I just always optimize my path to be the absolute shortest distance.

I only thought of it today, I think, because yesterday afternooon I was thinking about how to optimize the placement of my garden to maximize sunlight.

An unexpected side-benefit of gardening . . .


And speaking of which, can I just say how amazing it is to get out of bed, in the early morning of a beautiful spring day, and go out to work in my garden? It's a great way to start a day.

posted by Miles 11:21 AM

  (0) comments

{Monday, April 10, 2006}

 
It came to me, a couple of weeks ago, that I really wanted a garden. I haven't gardened since I can't remember when; maybe when I was 9 or 10 years old. The idea just came out of nowhere, but once the seed was planted, so to speak, I couldn't get it out of my mind. I spend most of my time in front of a computer; it gets old. There's something about getting your hands dirty, doing something physical. Then too, there's something about fresh vegetables, right off the vine or out of the ground.

So this weekend Jess helped me get everything I needed, at Home Depot, and today I "built" my garden:

Here's the plot, before I started:



. . . and after I tilled it:



I wanted a raised garden, so I built this enclosure out of pressure-treated 12x2's, 4 feet to a side:



Then I dug a shallow trench around the perimeter of the plot, set the 'box' in place, and added 8 cubic feet of Miracle Grow Garden Soil. Voila! A garden!



I've left the fun of planting for another day. :-) More updates later . . .

posted by Miles 8:50 PM

  (1) comments

{Tuesday, April 04, 2006}

 
There's a pretty cool article on an experimental surgical treatment for severe, medication-resistant depression in this week's New York Times Magazine:

A Depression Switch?

An excerpt:

Now Lozano threaded a guide tube — "It's a straight shot," he said later, "really quite easy" — down between crevices and seams to one side of Area 25, which is in two small lobes at the midline of the brain. He slid the first electrode and its lead down the tube, then repeated this for the other side. All this took nearly two hours. After he double-checked his locations, he wired the leads to a pacemaker and gave Mayberg a nod. They could turn it on anytime now.

Mayberg had squeezed into a spot at Deanna's side some time before. She had told Deanna that if anything felt different, she should say so. Mayberg wasn't going to tell her when the device was activated. "Don't try to decide what's important," Mayberg told her. "If your nose itches, I want to know." Now and then the two would chat. But so far Deanna hadn't said much.

So we turn it on," Mayberg told me later, "and all of a sudden she says to me, 'It's very strange,' she says, 'I know you've been with me in the operating room this whole time. I know you care about me. But it's not that. I don't know what you just did. But I'm looking at you, and it's like I just feel suddenly more connected to you.' "

Mayberg, stunned, signaled with her hand to the others, out of Deanna's view, to turn the stimulator off.

"And they turn it off," Mayberg said, "and she goes: 'God, it's just so odd. You just went away again. I guess it wasn't really anything.'

"It was subtle like a brick," Mayberg told me. "There's no reason for her to say that. Zero. And all through those tapes I have of her, every time she's in the clinic beforehand, she always talks about this disconnect, this closeness and sense of affiliation she misses, that was so agonizingly painful for her to lose. And there it was. It was back in an instant."

Deanna later described it in similar terms. "It was literally like a switch being turned on that had been held down for years," she said. "All of a sudden they hit the spot, and I feel so calm and so peaceful. It was overwhelming to be able to process emotion on somebody's face. I'd been numb to that for so long."

posted by Miles 1:20 AM

  (0) comments

{Monday, April 03, 2006}

 
I want a new car.

This one: http://toyota.jp/bb/



There's just one problem; it's not sold in the US. Yet. But Daaaammn.

You should explore the site linked above, even though it's heavily flash & beaming to you direct from Japan, meaning it's pretty slow to load. Go into the site, and try the "Experience" link. :-)

posted by Miles 11:05 AM

  (4) comments
spacer