Wednesday, February 25, 2009

Brew Crew Ball on the Brewers' Offense Rebounding

As always, good stuff from BCB.

It's the same basic idea as what I talked about here, except they actually, y'know, use real numbers and come to an actual conclusion. Long story short, we can expect our five core players (Braun, Fielder, Hardy, Hart, and Weeks) to add 5 wins just by rebounding from a bad offensive year last year.

In other news, the Brewers ended their first Spring Training game against the Oakland A's with a 3-3 tie after ten innings. Worth noting, IMO, is that Corey Hart went 2-2 with a home run and a walk. Yes, it's a tiny sample size and not worth extrapolating anything from, but this team needs Hart to be contributing this season, and it's nice to see he's at least capable of putting up some numbers. Hopefully the trend will continue...

Also, I've been meaning to mention this, but I hope that Macha starting Suppan in the first Spring Training game doesn't mean he wants him to be the Opening Day pitcher. As I indicated before, I don't even like the idea of anyone other than Gallardo being the opening day starter, and I especially don't like the idea of Suppan being the opening day starter. I don't think Suppan will be as bad in '09 as he was in '08, but barring a freak occurrence, he's the worst pitcher in the rotation, and it just doesn't make any sense to give him the most starts.

Monday, February 23, 2009

Not offering arbitration: smart move?

The OC Register, in a piece on the smartest baseball moves of the offseason, praise the D-Backs, Yankees, and Phillies for not offering arbitration to Adam Dunn, Bobby Abreu, and Pat Burrell, taking the point of view that the cheap contracts these sluggers ended up with in a down market justified the move. I disagree with this.

By not offering arbitration, the clubs lost out on draft-pick compensation for these players. However, they also took away the players' options to accept arbitration, which would've resulted in the clubs paying overpriced salaries to Dunn, Abreu, and Burrell. This is why the move is praised, but, the move only saved the clubs money if Dunn, Abreu, and Burrell would've accepted arbitration.

Sure, in hindsight the three of them would've been better off accepting arbitration, but out of 24 players offered arbitration, only two accepted, and they're both little-known relief pitchers (Darren Oliver and David Weathers). Furthermore, several players definitely did hurt themselves by declining arbitration, most notably Jason Varitek. With this in mind, I find it quite likely that players offered arbitration would've declined it, anyway, thereby netting their clubs a pick, and losing them nothing.

Granted, you can't always count on such things, and the GMs moves to not offer arbitration certainly looks better now than it did at the time, but I don't think I'd go so far as to praise the move.

Tuesday, February 17, 2009

Brewers, Hart, avoid arbitration

"Presumably settled somewhere near the midpoint" of $3.25 million.

I have to say, I figured if Doug Melvin's arbitrationless streak had come to an end this spring, it would've been with Prince, so I guess I'm kind of not surprised at the settlement.

How Hart does next season is one of the questions I'd like to see answered. I don't know what the hell happened to him in September, but it was bizarre. He went from hitting .299/.310/.523 to hitting .173/.192/.245. That's a drop of 100 points in OPS+. Admittedly, this can perhaps be partly explained by a .213 BABIP, but it's still awful. I find it unlikely that Hart suddenly forgot how to play baseball when the calendar turned, but maybe opposing pitchers have figured him out. Hopefully it's just a case of really bad luck, and he comes right back to his former self as the season begins.

Rare triple-post day!

Ryan Braun on steroids: "I would never do it because if I took steroids, I would hit 60 or 70 home runs."

It's kind of a dumb thing to say, but I love that he's being a cocky bastard here, rather than an evasive douchebag, like most players tend to be when the topic of steroids comes up. Really, when it comes to steroids, I pretty much come down on the side of, "Yeah, it's a bad thing, and we should do something about it, but is it really this big of a deal?" With that in mind, I appreciate that rather than tow the party line and act all serious, Braun is having some fun with it.

Of course, if he does hit 60 or 70 home runs in a season someday (it could happen), then this quote might come back to haunt him...

Hey-la, hey-la, my Gagne's back

Minor league deal, no terms as of yet

Gagne gets a lot of shit for being shit, but he wasn't too bad in the second half of last year. He mainly got a bad reputation for having some high-profile meltdowns, and forgettable solid performances. He's an arm, though, and if the price is right, it can't hurt to have some of those lurking around down in AAA and thereabouts.

Macha not likely to name Gallardo Opening Day Starter

I dunno if I like this.

So, I'm not going to start pissing on Macha right away, and so far he's seemed like a pretty solid guy, but here's, really, the first sort of real decision we've heard from him...and I think it's a bad one. I mean, Gallardo is far and away our best pitcher; he's projected to have an ERA around 3.50 next year, and no one else on the staff is projected to go under 4.00. He may be the least experienced, but talent, ultimately, trumps experience, and we should give our best starter the most starts, simple as that. Now, I will grant, that I am not well-versed in the impact of experience on this sort of thing, and the impact of pressure situations on a young pitcher's development, but can the impact really be enough to offset that wide of a talent gap?

Furthermore, is this sort of thing really necessary with Gallardo? Everything we hear about him is that in addition to being a great pitcher, he's Mr. Poise and thrives under pressure. Is he really not up to the task of Opening Day? I'm not sure I buy that.

And I also don't totally buy that being the Number One starter is that much more pressure. I mean, the argument used here is that you'd always be going up against every other team's number one, but that's just not the case; off days and a injuries scramble up pitching rotations pretty damn fast, and the ace matchups don't always happen all that often.

So, in other words, I'm waiting to judge on Macha, but this move displeases me; I feel it's a rather significant cost with no obvious gain.

Thursday, February 12, 2009

Looper Deal is Official

One year, $4.75 million

I like it, because depth...is good. Seriously, though, while we don't have superstars, I think the rotation is pretty solid now. It's easy to feel down on the team because we lost Sabathia and Sheets and haven't really replaced them, but I think an important thing to keep in mind is that we wouldn't have needed Sabathia so much last year if the team's offense hadn't completely fallen off the face of the Earth in September. Here's a chart of the runs/game each month that I think illustrates that well:



As you can see, I also added in a line for the Simple Runs Created (SRC) per game, which is the runs we should have scored based on the team OBP, SLG, and at-bats. (It's calculated as OBPxSLGxAB. As an aside, looking at that formula is a useful way to see why OBP is more important than SLG; while an increase in SLG only increases its own variable, an increase in OBP increases both itself and AB, because a team with a higher OBP isn't getting itself out as easily, and so is stepping up to the plate more). While it's already obvious that September was just terrible offensively for the Crew, the SRC/G line emphasizes the fact that, while the team did not score many more runs per game in May than they did in September, this was more a consequence of bad luck; based on how they were hitting, they should've scored something more like 4.6 runs per game, instead of 3.9. However, September was not a case of bad luck; clearly, the team just totally stopped hitting.

There are some explanations for this: Ryan Braun, while he was still in the lineup, was battling a back injury that clearly hampered his effectiveness, and Corey Hart, for some reason, just ceased to exist as offensive force. Also, Gabe Kapler was unable to play because of a shoulder injury; while Gabe wasn't a regular player, I do feel that if he had been available to sub for Hart a few times, that may have helped Hart break out of his slump (but that's just conjecture on my part). Anyway, clearly this was a freak occurrence, and it's unlikely that next year the team will suffer another September slump.

My point, then, is that if the team had continued to score runs at the same rate they had beforehand (4.8 runs/game), they would've scored an additional 31 runs, which is 31 runs that the pitching staff could've allowed. Spread out over 162 games, that's 0.2 runs. So, if the offense can avoid another bizarre teamwide slump, the pitching stuff can have an ERA 0.2 runs worse and still get the same results, which doesn't sound too bad.

---------------------------------------------------------------------------
Notes: Just some random stuff I noticed when I was doing up the numbers that I wanted to share:

-September was the only month in which the Crew scored fewer than 100 runs, scoring 94. However, August was the only month in which they allowed fewer than 100 runs, allowing only 72. That's 2.67 runs per game. We all remember how dominant Sabathia and Sheets were, but damn, that's just incredible to see it in cold print like that.

-August was also the Brewers' best run-scoring month, as they scored 151 runs. Again, just to reflect on this, they scored more than twice as many runs as they allowed. However, based on Simple Runs Created, July was actually their best offensive month; they should've scored 150 runs instead of the 138 that they did, and in August they should've scored 145 runs. The better number for July was fueled entirely by a .032 point increase in SLG, as they actually had a slightly lower OBP and 9 fewer at-bats.

Tuesday, February 10, 2009

Further details on baseball+game theory

Okay, so, I've found that trying to gather the data I want to pull this off is going to take a while, so I'd like to start off by introducing the sort of methodology I have in mind. The way I'm thinking I'd do this right now is to start by creating a basic model where the actions available to the pitcher are to throw each of his different pitches in or out of the zone, so the total number of actions would be twice the number of pitches the pitcher has, and where the actions available to the hitter are to swing or not to swing. This is, admittedly, still a simplified model, but I think it's a good starting point. If this goes well (once I have real data, that is), areas I think I might move onto are: first, further subdividing the actions available to the pitchers into throwing pitches at different parts of the strike zone; and second, giving the hitter actions like, "Swing if the pitch is located at a certain position x amount of time after the pitcher's release"; in other words, to try to incorporate the fact that the hitter can decide whether or not to swing based on where the pitch seems to be heading, but only shortly after it leaves the pitcher's hand. This data is all available from pitch-f/x.

Once this model is set up, utilities have to be found for every possible combination of actions. The great thing about doing this model for baseball is that the utilities are actually very easy to find. They can be simply measured in terms of runs, and each possible outcome after a pitch has a specific run value (this is, essentially, the basis of John Walsh's runs100 system he uses at The Hardball Times). Every pitch will either end up as some sort of hit (a single, double, triple, or home run), some sort of out (groundout, flyout), or a ball or strikeout. (I'm ignoring, for simplicity's sake, things like hit-by-pitch, catcher's interference, etc.) The value of each of these things can be calculated in terms of runs by looking at how each event changes the run scoring expectancy. Here is a table for the values of the various hits, and the out, from Tom Tango's excellent The Book:



Establishing a value for balls and strikes is slightly more difficult, but still doable. Every count has a different run expectancy; not surprisingly, "hitters' counts", with more balls than strikes, increase the run expectancy, while "pitchers' counts" have the opposite effect. The value of a ball or strike can then be measured as the extent to which it changes the run expectancy of the count. John Walsh used this approach in developing runs100, and here are the values he came up with:





Now, it would be more useful to do different payoff matrices for pitches for each count, and that's the sort of thing I plan to do eventually, but for now, I'm going to come up with an average ball/strike value by averaging these numbers. This is technically incorrect, because some counts are rarer than other counts, but I don't have those relatively frequencies offhand, and, again, this post is about focusing on methodology, rather than correct numbers. This is what I came up with:



Now that we have a value for each outcome, the next step is to find the probability of each outcome, given each combination of actions from the pitcher and the hitter. This is where pitch-f/x data would come in. As I haven't waded through that swamp yet, I'm going to make up data for a fictional pitcher, pitcher X, to try to illustrate the principle. Let's say pitcher X has two pitches, a fastball and a curveball, and he can locate both of them either in or out of the zone. Let's look at the possibilities for when the hitter doesn't swing, first, as that is simpler.

If the hitter doesn't swing, clearly, the pitch is either a strike or a ball, and the outcome is dependent on where the pitcher meant to throw the ball, and how accurately he does so. Let's say that the pitcher can locate his fastball in the strike zone 70% of the time, and outside the zone 90% of the time. Let's also say he can locate his curveball in the zone only 50% of the time, and out of the zone 70% of the time. Therefore, if he attempts to throw a fastball in the zone and the batter doesn't swing, it will be a strike 70% of the time, and a ball 30% of the time. The percentages for other possibilities can similarly be found.

Now, if the batter swings, clearly things get more complicated. First of all, we have to take into account that, as explored above, the pitcher only locates his pitches properly some of the time. Next, we have to find the probability the hitter makes contact at all. I'll say that when Pitcher X throws his fastball in the zone, hitters make contact 90% of the time; when he throws it out of the zone, they make contact 40% of the time; and when he throws his curveball in the zone, contact is made 70% of the time; out of the zone, 20%.

Continuing with this ream of made up data, suppose that 70% of the time when batters make contact on any of Pitcher X's pitches, the result is a groundout or flyout. Of the remaining 30%, which are all hits, 50% of them are singles, 22.5% are doubles, 22.5% are home runs, and 5% are triples. This gives us this chart of probabilities:


(click on pictures to see larger)

Now that we have a list of probabilities, we can combine that with the list of values for each outcome to create a payoff matrix. The table looks like this; the value in each cell is the utility (measured in runs) to the hitter; the pitcher's utility is just the same value times (-1).



As you can see, most outcomes are unfavorable to the hitter. This is not surprising, as hitters make an out 60-70% of the times they step to the plate, and an out has a negative run value.

Now that we have a payoff matrix, we want to find the Nash Equilibrium, and therefore find the appropriate frequency with which the pitcher should throw each pitch, and the hitter should swing. Hopefully I'll get that up in a blog post tomorrow.

Monday, February 9, 2009

Combining Baseball and Game Theory

Baseball, at its heart, is a game between pitcher and hitter, and this game is particularly susceptible to game theory analysis. Over the next few weeks, I want to try to start figuring out ways to break down this game theory, and perhaps understand the game better. I'm not entirely sure how this would work, but I have some ideas.

To get the basic idea of how a game theory interpretation of an at-bat would go, let's look at an extremely simplified version of the pitcher-hitter confrontation. Suppose that on any given pitch, the pitcher has two choices: throw a strike, or throw a ball; and the hitter also has two choices: swing, or don't swing. Suppose that if a hitter swings at a strike, they make solid contact and get a hit, and if he swings at a ball, he whiffs. This would create a payoff table looking something like this:



The hitter, unsurprisingly, benefits from swinging at strikes and not swinging at balls, whereas the pitcher benefits by getting the hitter to swing at balls and not swing at strikes.

This is all unsurprising, but when used in a much more detailed model, this could be a tremendous tool for analysis. What I hope to do is, by analyzing pitch-f/x data, come up with accurate utility numbers to plug into payoff matrices for pitchers, and then with these utility numbers, find Nash Equilibria for the pitchers against league-average hitters (or against specific hitters). These Nash Equilibria would give us the frequency at which the pitchers theoretically should throw each of their pitches, which could then be compared to the frequency they actually do throw these pitches.

To give an example of how this could be used, consider this article from Hardball Times, where Josh Kalk looks at pitch sequencing and finds, among other things, that throwing the same pitch twice in a row is often effective. One possible explanation for this is that hitters just don't expect to see the same pitch twice in a row; indeed, under the section on curveballs Kalk says, "The main exception appears to be curveball/curveball, which appears surprisingly good. Hitters must not be expecting a second curveball. Maybe they got in a hole early and then when they laid off the first curveball they were expecting the pitcher to come back with something hard."

However, if pitchers always followed their curveball with another curveball, hitters would never be fooled, because they'd expect the second curveball. Clearly, there is some frequency at which it is best to follow a curveball with another curveball, and a game theory model has the potential to find this frequency.

Hopefully I can wring enough good data out of pitch-f/x to get some real conclusions out of a game theory model.

Saturday, February 7, 2009

A-Rod reportedly tested positive for steroid use in 2003

This won't end well.

This is going to be one hell of a story in a memetic sense, because the moment the average fan hears this, they're just going to feel vindicated for hating Alex Rodriguez. As I've pointed out here before, these steroid allegations just become a test of how well a player controls his public relations, and Rodriguez has notably failed at that, becoming one of the most hated players in the game even though he's one of the best.

Really, a better question might be why this took so long. I believe it was around the time the Mitchell Report came out, I remember reading an article that including some commentary from Alex Rodriguez on steroid use, and included the caveat, "Of course I've never used it," etc., and I thought at the time, "Is that really all it takes to ward off suspicion?" Granted, I don't follow the steroid news all that closely, but as far as I can remember, this is the first time I've heard it suggested that A-Rod is a user.

Anyway, the take home point is that this report/allegation/what-have-you is going to stick. The moment people hear about this test, they're going to make up their minds that A-Rod used and that's that and nothing can convince them otherwise. It's not like if, say, Derek Jeter had a positive test turn up, in which case people would suggest it must be a faulty test and demand more evidence.

Thursday, February 5, 2009

Bill Gates is crazy

Bill Gates released mosquitoes at the TED conference.

I have to say, I'm very disappointed with this news. If someone as rich and powerful as Bill Gates is going to go batshit insane, there are way cooler ways he could do it. For example, he could call a press conference and say, "President Obama, I understand the need to protect American lives from foreign threats, but this involves putting American lives at risk. In light of this, I'm proud to present you with a new combat brigade of 10,000 troops...made entirely out of butter," and then he'd pull back a curtain to reveal 10,000 soldier sculptures, each uniquely hand-crafted out of Land O'Lakes Sweet Cream.

Or he could build a gigantic airplane hangar, and pay guys to hang out there all day, firing off automatic weapons and practicing karate, and if anyone asks him what it's for, he'd respond, "To kill James Bond." If it was pointed out to him that James Bond is a fictional character, he'd say, "That's not what the Major told me."

Or he could say, "Ladies and gentleman, in the future, we'll purchase more and more consumer goods from vending machines. Ladies and gentleman...the future is now. I present to you the first gerbil vending machine."

Or he could build a complete replica of a small town from the 1950s in the middle of the Nevada desert and hire people to smoke pipes and lead normal lives working in factories and soda fountains, just like the good old days...except none of them would wear any pants.

Anyway, I think I've made my point: if Bill Gates is going to go off the deep end, he should just commit and really do it like only he can. Releasing mosquitoes is weak sauce.

Wednesday, February 4, 2009

Rock, Paper, Scissors, and Game Theory

Game theory has long been a fascination of mine, and I'm finally getting a chance to take a class on it here at NYU. We recently had a class where we found the mixed-strategy Nash equilibrium for rock, paper, scissors (RPS), and it made me curious about Nash equilibria for other variants of RPS, which are manifold.

First, of course, I'm going to have to explain some these game theory terms that I'm throwing around. The essence of game theory is exploring decision-making when the outcome of your decision is dependent on someone else's decision. When this is in a two-player game, it's often expressed through a payoff matrix, like so:



This is a payoff matrix for RPS. The left column shows the moves for player one, and the top row shows the moves for player two. The payoffs to each player are listed in the cells, with the format [Player 1's payoff, Player 2's payoff], where a 1 represents a win, a -1 represents a loss, and 0 represents a tie.

Now that we have a payoff matrix, we'll want to find an equilibrium. Specifically, we're going to look for a Nash equilibrium. A Nash equilibrium exists where both players are pursuing a strategy such that neither can improve their payoff if the other play continues to pursue the same strategy. It is obvious that there is no "pure strategy" Nash equilibrium for RPS; that is to say, there's no possible equilibrium where each player plays one move all the time. If player 1 always throws scissors and player 2 always throws rock, player 1 can improve his payoff by always throwing paper instead. However, if he does this, then player 2 can improve his payoff by always throwing scissors, and so on.

When a game has no pure strategy Nash equilibrium, we search for a mixed-strategy Nash equilibrium. A mixed strategy is a grouping of pure strategies, with a proportion assigned to each for often it should be played. In the case of RPS, there is a mixed-strategy Nash equilibrium where each player plays each strategy one-third of the time. This is intuitively unsurprising; each move will win, lose, or tie one-third of the time each.

Another variant of RPS is Rock, Paper, Scissors, Lizard, Spock, which, in an effort to reduce ties, expands upon the original RPS ("RPS Classic", I suppose) by adding in lizard, which eats paper and poisons Spock, but is crushed by rock and decapitated by scissors, and Spock, who vaporizes rock and bends scissors, but is poisoned by lizard and disproved by paper (he is fictional, after all). The payoff matrix for rock, paper, scissors, lizard, Spock is as follows:



It is somewhat more interesting than the classic RPS chart, and certainly does cut down on the number of ties (the probability of a tie is reduced from 1/3 [3/9] to 1/5 [5/25]). However, the Nash equilibrium is essentially the same as for the original RPS: both players play each strategy 1/5 of the time. It's the same game, just slightly expanded.

However, there is another five move variant of RPS that actually adds an additional strategic wrinkle: Rock, paper, scissors, fire, water. In this variant, the original rules hold, except fire beats everything except water, and water, in turn, loses to everything except fire. The payoff matrix looks like this:



The game is said to come with the stipulation that fire can only be used once in one's life time, but this is silly, as the Nash equilibrium can be shown to be, actually, each player playing fire one-third of the time, water one-third of the time, and rock, paper, and scissors each one-ninth of the time. The reason for this is that it's really become a balanced game between three actions, where the three actions are fire, water, and RPS. Fire beats RPS, which beats water, which beats fire. Each of these actions should be played one-third of the time, but "playing" RPS properly means playing rock, paper, and scissors each one-third of the time, and 1/3*1/3=1/9.

The reason I bring this up, and have made such a long blog post about such a ridiculous topic, is because I find this result to be interesting, and worth thinking about, because it is counterintuitive. While water would seem to be arguably the least valuable move, because it only defeats one other action while the other four defeat at least two actions, it actually should be played three times as often as rock, paper, or scissors, even though those would seem to do more. It is solely because the one action that water beats, fire, is the most powerful that water is so valuable move. I think there is a useful lesson to be had here when considering counterintuitive value and pricing. Unfortunately, I don't think I know that lesson yet.

Tuesday, February 3, 2009

Perche no?

In New York and Boston, the subway trains run on the right, just like the cars do.

In London, the subway trains run on the left...just like the cars do.

In Rome, however, the cars run on the right and the subway trains run on the left. I feel like that's a perfect metaphor for Italy.