Tag Archives: Baseball

The Game Theory of the Cardinals/Astros Spying Affair

The NY Times reported today that the St. Louis Cardinals hacked the Houston Astros’ internal files, including information on the trade market. I suspect that everyone has a basic understanding why the Cardinals would find this information useful. “Knowledge is power,” as they say. Heck, the United States spends $52.6 billion each year on spying. But game theorists have figured out how to quantify this intuition is both interesting and under-appreciated. That is the topic of this post.

Why Trade?
Trades are very popular in baseball, and the market will essentially take over sports headlines as we approach the July 31 trading deadline. Teams like to trade for the same reason countries like to trade with each other. Entity A has a lot of object X but lacks Y, while Entity B has a lot of object Y but lacks X. So teams swap a shortstop for an outfielder, and bad teams exchange their best players for good teams’ prospects. Everyone wins.

However, the extent to which one side wins also matters. If the Angels trade a second baseman to the Dodgers for a pitcher, they are happier than if they have to trade that same second baseman for that same pitcher and pay an additional $1 million to the Dodgers. Figuring out exactly what to offer is straightforward when each side is aware of exactly how much the other values all the components. In fact, bargaining theory indicates that teams should reach such deals rapidly. Unfortunately, life is not so simple.

The Risk-Return Tradeoff
What does a team do when it isn’t sure of the other side’s bottom line? They face what game theorists call a risk-return tradeoff. Suppose that the Angels know that the Dodgers are not willing to trade the second baseman for the pitcher straight up. Instead, the Angels know that the Dodgers either need $1 million or $5 million to sweeten the deal. While the Angels would be willing to make the trade at either price, they are not sure exactly what the Dodgers require.

For simplicity, suppose the Angels can only make a single take-it-or-leave-it offer. They have two choices. First, they can offer the additional $5 million. This is safe and guarantees the trade. However, if the Dodgers were actually willing to accept only $1 million, the Angels unnecessarily waste $4 million.

Alternatively, the Angels could gamble that the Dodgers will take the smaller $1 million amount. If this works, the Angels receive a steal of a deal. If the Dodgers actually needed $5 million, however, the Angels burned an opportunity to complete a profitable trade.

To generalize, the risk-return tradeoff says the following: the more one offers, the more likely the other side is to accept the deal. Yet, simultaneously, the more one offers, the worse that deal becomes for a proposer. Thus, the more you risk, the greater return you receive when the gamble works, but the gamble also fails more often.


Knowledge Is Power
The risk-return tradeoff allows us to precisely quantify the cost of uncertainty. In the above example, offering the safe amount wastes $4 million times the probability that the Dodgers were only willing to accept $1 million. Meanwhile, making an aggressive offer wastes the amount that the Angels would value the trade times the probability the Dodgers needed $5 million to accept the deal; this is because the trade fails to occur under these circumstances. Consequently, the Angels are damned-if-they-do, and damned-if-they-don’t. The risk-return tradeoff forces them to figure out how to minimize their losses.

At this point, it should be clear why the Cardinals would value the Astros’ secret information. The more information the Cardinals have about other teams’ minimal demands, the better they will fare in trade negotiations. The Astros’ database provided such information. Some of it was about what the Astros were looking for. Some of it was about what the Astros thought others were looking for. Either way, extra information for the Cardinals organization would decrease the likelihood of miscalculating in trade negotiations. And apparently such knowledge is so valuable that it was worth the risk of getting caught.

How to Get a Ball at a Game, AKA the Best Thing I Will Ever Write

Right before I left San Diego for Rochester, I wrote a post in one of the Los Angeles Angels’ fan message boards. On the surface, it explains how to catch baseballs at baseball games. In practice, it was a recap of the first 22 years of my life. It apparently struck a chord and popped up on the site’s front page later that night.

(Ironically, I wasn’t home when it was featured—I was at a Padres game.)

I run into it every year or so, and I end up drawing the same conclusion every time: even though it predates all the Game Theory 101 stuff by more than a year, it is the best thing I have ever written and probably the best thing I will ever write. As such, I am preserving it here so I will never lose it.



I have been an Angels fan since the tragedy known as the 1995 season. I grew up in the northern part of Los Angels (sic) County, so I don’t have a very good reason why I wear red instead of blue. It just is what it is. The downside was that I virtually never went to Angels games as a kid due to the fact that my parents did not like sports and we lived a pretty long distance away.

But the rare times I did went, I always dreamed of catching a ball—a foul ball, batting practice ball, home run ball, a ball flipped up to the stands by a groundskeeper, any ball. Of course, we always had cheap seats too far away to get anything during a game. And a batting practice ball? That would have required getting to the game early—and the bottom of the first inning does not qualify.

So I went through childhood with zero, zilch, nada. Undeterred, I went to college. Armed with my own car and my own money, I could go to a lot of games as early as I wanted to. Now I was bigger, faster, and stronger. And, dammit, I wanted a ball.

I kept striking out.

Junior year rolled by, and my then girlfriend bought us tickets to a game. I took her to batting practice. Maybe my luck would change. Maybe I could get a ball. Maybe I could impress her.

And with one flip from a groundskeeper by the bullpen, it did.

Unfortunately, one isn’t satisfying. I thought it would be, but it’s definitely not. You get a rush from getting your first, and you immediately want to get another. So I kept going to batting practice in search of a second high.

It never came.

In college, I studied political science. I was introduced to a tool known as game theory midway through my junior year. Rather than trying to craft a more clever argument than the next guy, you can use game theory to construct models of the political interactions you are trying to describe. The neat part is that, once you have solved the game, your conclusions are mathematically true. If your assumptions are true, then the results must follow as a consequence.

The other cool part is that game theory is applicable to more than just political science. Life is a game. Game theory is just trying to solve it. The trick is figuring out how to properly model situations and what assumptions to make. Take care of those things, and you can find an answer to whatever question you want.

Baseball is a game, but so is hunting down baseballs as a fan. We all want to get them. The question is how to optimally grab one when everyone else is trying to do the same thing.

Fast forward to Opening Day of my senior year. I was standing there, hoping like hell a ball would find its way into my glove. If I stayed there long enough, I am sure one would have eventually gone right to me. But batting practice is short, and I would hate to only get one ball every 100 games I go to.

Then I noticed something a little revealing. It seemed like there would always be a couple people who would get three or four balls every time I went to the ballpark. I would always hear people say “lucky” with a hint of disdain the second, third, and fourth times they caught a baseball. But let’s be honest—it would take a tremendous amount of luck to get four baseballs in a single game if unless you were doing something everyone else wasn’t. You are lucky just to get one. But four? Skill.

That’s when the game theorist slapped the naïve young boy inside me. The people who were getting all of the balls weren’t game theorists, but they sure did understand the game being played better than everyone else there, myself included. I figured out that batting practice isn’t some sort mystical game of luck, it’s a spatial optimization game. Spatial optimization games can be solved. I did some work, came up with an equilibrium (game theoretic jargon for “solved the game”), and came up with a plan. In sum:

Since then, I have never left a session of batting practice with fewer than three balls.

Why am I telling you this? After all, the more people who know the secret, the harder it will be for me to catch a ball.

Well, here is the sad part. It turns out that I am a half-decent game theorist, so the University of Rochester accepted me into their PhD program. I leave on Monday. Yesterday was my last game. But it was a successful day:

That’s Barbara, my favorite usher in Angels Stadium. I can’t count how many times I have heard her tell parents to stop dangling their five year olds over the railing trying to siphon a ball off a fielder. (It baffles me why parents take such a risk in the first place. I’m pretty sure it is because the parents want the ball for themselves more than they want it for their kids.) I couldn’t leave California without getting a picture with her.

What do I do with my collection? I don’t have one. During my initial college years of ball-catching failure, I read an article about the (presumed) record holder for most balls grabbed ever. He keeps all of them. I think he is a jerk. As a kid, it was my dream to get a ball. As an adult, getting a ball is a novelty—a story to relay to your friends, take pictures of, and write silly little posts about on baseball forums. After reading the article, I swore I would give the first ball I caught to a kid trying to live the dream.

That moment had to wait for my junior year. The groundskeeper flipped the ball into my glove. I showed it to my girlfriend and found a mother with her five year old son sitting a few rows behind us. I asked if she would take a picture of us with the ball. She obliged. Although he was clueless, her poor son had no hope of getting a ball. So I thanked her for snapping the photo and tossed the ball over to her son. If that wasn’t the best day of his life so far, it has to rank pretty high.

I have kept that tradition alive all the way to today. As I pack my car this weekend, there won’t be any baseballs in it. I have no batting practice ball collection. I haven’t kept a single ball. I will never be able to make my dream as a kid come true—it’s too late for that—but I can get close every time I toss a ball to someone who reminds me of me as a kid. Perhaps that will be my son one day.

And if you thought my days of getting baseballs was over, think again. The Angels play the Rangers in Arlington on Thursday. I will be driving through Texas that day. Rangers fans won’t stand a chance.

Fun with Incentives: Baseball Contracts Edition

Continuing in the long line of “why do people structure these things in such a crazy way” posts, we have the sad story of Phil Hughes. Hughes is a pitcher for the Minnesota Twins. Like many other players, Hughes’ contract has specific benchmarks that reward bonuses. One in particular gives him $500,000 if he pitches 210 innings this year.

209 2/3s innings? Worthless! Who needs someone who pitches 209 2/3s innings?

But 210 innings? Yep! Definitely worth a half million dollars.

You can see where this is going. The Twins were rained out on Friday. He pitched in a double header today. However, this pushes his next start back a day, his start after that by another day, and so forth. Due to some unfortunate timing, this will ultimately mean he will (probably) end up with one fewer start than he should otherwise. Extrapolating a reasonable expectation of number of innings per start, losing this one start will likely mean he will not reach the 210 inning threshold and thus not receive a $500,000 bonus.

For completeness, this post might all be for nothing. If Hughes averages 7 2/3s innings per start for the remainder of the season, he will reach 210 innings and the point will be moot. But it seems doubtful that this will happen for two reasons. First, the Twins have him under contract for two more years; with the team eliminated for the playoffs, it makes little sense to stretch him out when a younger pitcher in greater need of MLB experience could get those innings. Second, if you were the owner of the team and could reasonable limit his innings for the rest of the season, why wouldn’t you save yourself a half million dollars?

So why oh why are contract structured in this way? I don’t have a good answer. It would be exceedingly easy to simply structure contracts so that the incentive pays a pitcher a fixed amount per inning. This ensures that teams will use pitchers for the number of innings that is economically worthwhile and do not face the incentive-twisting discontinuity between 209 2/3s innings and 210 innings.[1] Transaction costs could conceivably force actors to accept these discontinuities, but that does not seem to be a problem here. Instead, agents and players seemingly accept these contractual terms despite the obvious conflicts of interest they create.

[1] To be fair, the contract has something like this built-in. Hughes receives quarter million dollar bonuses for 180 innings and 195 innings. But there is still no good reason to create these discontinuities.

New Working Paper: Risk Aversion in Sports Contract Negotiations

I got curious about sports free agency after Jered Weaver resigned with the Angels for five years and $85 million. Pitchers of his caliber on the free agent market pick up much larger contracts. Why didn’t Weaver wait it out until free agency? And, given that he was going to resign with the Angels, why did he sign when he did and not a month before or a month after?

After working out the logic, I think I have a reasonable answer. I will be presenting my findings at the SABR conference at the end of the month, but the paper is available here right now.

The basic concept involves risk aversion. Weaver alerted me to the idea when he asked “how much more money do you really need?” Although Weaver would have certainly made more money had he made it to free agency, there was inherent risk in waiting. What if he suffered a catastrophic injury in the meantime? He would go from making nine figures to virtually nothing in the blink of an eye. As such, Jered willingly accepted a smaller amount in expectation; the luxury of guaranteed money was worth paying the premium.

My conference paper expands on this idea. I show that if a player is risk averse enough, he will always resign with his team no matter how much money he would make on the free agent market. This is good news for teams, as the exclusive bargaining rights allow them to leverage the risk of injury to get their players to accept contracts for smaller amounts—which is exactly what we saw in the case with Jered Weaver.

However, risk aversion is an internal trait that is difficult to directly observe. Teams might not know exactly how risk averse a player is, which makes it hard to know how much the team should offer the player. My paper investigates such a dynamic. In this case, the team increases its offers over the course of the season. The player accepts when the team finally meets his requirements. Meanwhile, the team is willing to increase its offers because playing games credibly demonstrates the player’s tolerance for risk. This explains why we see variation in the timing of contract signings; more risk averse players sign earlier in the season, while more risk tolerant players sign later on.

The paper also proves three other neat findings. First, you may intuitively believe the team would only benefit from increasing player safety. However, the model shows that the team actually benefits in contract extension negotiations from some level of danger—otherwise, the team cannot exploit the player’s risk aversion at all. Second, it questions the wisdom of suspending contract negotiations during the season, as it prevents the team from learning more about the player as the season progresses. Finally, it advises teams to pay more attention to players’ level of risk aversion during the draft season; all other things being equal, more risk averse players sign for less money, which allows the team to concentrate its resources on other players.

You can view a version of my presentation on YouTube below. If you are going to the SABR conference, then please drop in to Ballroom 3 from 3:00 to 3:25 on Thursday to see me make the presentation in person. And, once again, you can click here to download the full paper.

Game Theory of Baseball Talk

Today, I’m giving a talk at the University of Rochester about game theory in baseball. You can see the slides by clicking here. Topics include throwing breaking balls with a runner on third base, optimal defensive positioning against a bunt, and how to catch a ball at a game. Enjoy.

New Working Paper on Bunting

If you are interested in the game theory of baseball, you should head over to my working papers page. I just uploaded a new article on optimal hitting strategy during a no hitter. As it turns out, a batter can never bunt with a no hitter in progress and still maximize his team’s probability of victory. The article has a full proof of the claim.