Matt Garza, Fifth No-Hitter of 2010 July 26, 2010
Posted by tomflesher in Baseball.Tags: Dallas Braden, Roy Halladay, Ubaldo Jimenez, Edwin Jackson, no-hitters, Year of the Pitcher, Matt Garza
add a comment
Tonight, Matt Garza pitched the fifth no-hitter of 2010. He joins Edwin Jackson, Roy Halladay, Dallas Braden, and Ubaldo Jimenez in the Year of the Pitcher club.
As I pointed out when Jackson hit his no-hitter, no-hit games are probably Poisson distributed. Let’s update the chart.
The Poisson distribution has probability density function
Maintaining our prior rate of 2.45 no-hitters per season, that means . Our function is then
The probabilities remain the same:
| n | p | cumulative |
| 0 | 0.0863 | 0.0863 |
| 1 | 0.2114 | 0.2977 |
| 2 | 0.2590 | 0.5567 |
| 3 | 0.2115 | 0.7683 |
| 4 | 0.1296 | 0.8978 |
| 5 | 0.0635 | 0.9613 |
| 6 | 0.0259 | 0.9872 |
| 7 | 0.0091 | 0.9963 |
| 8 | 0.0028 | 0.9991 |
| 9 | 0.0008 | 0.9998 |
| 10 | 0.0002 | 1.0000 |
And though the expectation (E(49)) and cumulative expectation (C(49)) remain the same, the observed values shift slightly:
| E(49) | Observed | C(49) | Total |
| 4.23 | 5 | 4.23 | 5 |
| 10.36 | 11 | 14.59 | 16 |
| 12.69 | 8 | 27.28 | 24 |
| 10.36 | 17 | 37.65 | 41 |
| 6.35 | 1 | 43.99 | 42 |
| 3.11 | 5 | 47.10 | 47 |
| 1.27 | 1 | 48.37 | 48 |
| 0.44 | 0 | 48.82 | 48 |
| 0.14 | 1 | 48.95 | 49 |
| 0.04 | 0 | 48.99 | 49 |
| 0.01 | 0 | 49.00 | 49 |
The tailing observations (say, for 4+ no-hitters) don’t quite match the expected frequencies, but the cumulative values match quite nicely. There might be some unobserved variables that explain the weirdness in the upper tail. Still, cumulatively, we have 47 seasons with 5 or fewer no-hitters, which is almost exactly what’s expected. This is unusual, but not outside the realm of statistical expectation.
600 Home Runs: Who’s Second? July 25, 2010
Posted by tomflesher in Baseball, Economics.Tags: Alex Rodriguez, Dodgers, Jim Thome, Manny Ramirez, home runs, binomial distribution, 600 home runs, quick and dirty stats, Twins
add a comment
Alex Rodriguez is, as I’m writing this, sitting at 599 home runs. Almost certainly, he’ll be the next player to hit the 600 home-run milestone, since the next two active players are Jim Thome at 575 and Manny Ramirez at 554. Today’s Toyota Text Poll (which runs during Yankee games on YES) asked which of those two players would reach #600 sooner.
There are a few levels of abstraction to answering this question. First of all, without looking at the players’ stats, Thome gets the nod at the first order because he’s significantly closer than Driving in 25 home runs is easier than driving in 46, so Thome will probably get there first.
At the second order, we should take a look at the players’ respective rates. Over the past two seasons, Thome has averaged a rate of .053 home runs per plate appearance, while Ramirez has averaged .041 home runs per plate appearance. With fewer home runs to hit and a higher likelihood of hitting one each time he makes it to the plate, Thome stays more likely to hit #600 before Ramirez does… but how much more likely?
Using the binomial distribution, I tested the likelihood that each player would hit his required number of home runs in different numbers of plate appearances to see where that likelihood reached a maximum. For Thome, the probability increases until 471 plate appearances, then starts decreasing, so roughly, I expect Thome to hit his 25th home run within 471 plate appearances. For Manny, that maximum doesn’t occur until 1121 plate appearances. Again, the nod has to go to Thome. He’ll probably reach the milestone in less than half as many plate appearances.
But wait. How many plate appearances is that, anyway? Until recently, Manny played 80-90% of the games in a season. Last year, he played 64%. So far the Dodgers have played 99 games and Manny appeared in 61 of them, but of course he’s disabled this year. Let’s make the generous assumption that Manny will play in 75% of the games in each season starting with this one. Then, let’s look at his average plate appearances per game. For most of his career, he averaged between 4.1 and 4.3 plate appearances per game, but this year he’s down to 3.6. Let’s make the (again, generous) assumption that he’ll get 4 plate appearances in each game from now on. At that rate, to get 1121 plate appearances, he needs to play in 280.25 games, which averages to 1.723 seasons of 162 games or about 2.62 seasons of 75% playing time.
Thome, on the other hand, has consistently played in 80% or more of his team’s games but suffered last year and this year because he hasn’t been serving as an everyday player. He pinch-hit in the National League last year and has, in Minnesota, played in about 69% of the games averaging only 3 plate appearances in each. Let’s give Jim the benefit of the doubt and assume that from here on out he’ll hit in 70% of the games and get 3.5 appearances (fewer games and fewer appearances than Ramirez). He’d need about 120.3 games, which equates to about 3/4 of a 162-game season or about 1.06 seasons with 70% playing time. Even if we downgrade Thome to 2.5 PA per game and 66% playing time, that still gives us an expectation that he’ll hit #600 within the next 1.6 real-time seasons.
Since Thome and Ramirez are the same age, there’s probably no good reason to expect one to retire before the other, and they’ll probably both be hitting as designated hitters in the AL next year. As a result, it’s very fair to expect Thome to A) reach 600 home runs and B) do it before Manny Ramirez.
Micah Owings and Cobb-Douglas Production July 22, 2010
Posted by tomflesher in Baseball, Economics.Tags: David Ortiz, Micah Owings, run production, Reds, Brooks Kieschnick, Cobb-Douglas function
add a comment
Micah Owings, who is one of the best two-way players in baseball since Brooks Kieschnick, was sent down to the minors by the Cincinnati Reds yesterday. As big a fan as I am of Micah (really, look at the blog), I think this was probably the right decision.
Owings was being used as a long reliever. For a big-hitting pitcher like Micah, that’s death to begin with. Relievers need to be available to pitch, so the Reds couldn’t get their money’s worth from Owings as a pinch hitter, since he wouldn’t be available to re-enter the game as a pitcher unless they used him immediately. They also weren’t getting their money’s worth as a pitcher, since, as Cincinnati.com notes, the Reds’ starting pitching was doing very well and so long relief wasn’t being used very often.
Letting Owings start in AAA will give him the best possible outcome – he’ll have regular opportunities to pitch, so he won’t rust, and he’ll get to bat at least some of the time. Owings needs to be cultivated as a batter because that’s where his comparative advantage is. I doubt he’ll ever be at the top of the rotation, but he could be a competent fifth starter. If he pitches often enough to get there, he’ll add significant value to the team in terms of his OBP above the expected pitcher. He’ll get on base more, so he’ll both advance runners and avoid making an out.
A baseball player is a factory for producing run differential. He does so using two inputs: defensive ability (pitching and fielding) and offensive ability (batting). In the National League, if a player can’t hit at all, he’s likely to produce very little in the way of run differential, but at the same time, if he’s a liability on defense, he’s not likely to be very useful either. Defense produces marginal runs by preventing opposing runs from scoring, and offense produces marginal runs by scoring runs. Having either one set to zero (in the case of a pitcher who can’t hit at all) or a negative value (an actively bad pitcher) would negatively affect the player’s run production. This is similar to a factory situation where labor and equipment are used to produce goods, and that situation is usually modeled using a Cobb-Douglas production function:
with Y = production, z = a productivity constant, K = equipment and technology, L = labor input, and is a constant between 0 and 1 that represents relatively how important the input is. K might be, for example, operating expenses for a machine to produce widgets, and L might be the wages paid to the operators of the machine. This function has the nice property that if we think both inputs are equally important (that is,
= .5) then production is maximized when the inputs are equal.
In general, production of run differential could be modeled using the same method. For example:
where P = pitching contribution, F = fielding contribution, B = batting contribution, and and
are both between 0 and 1 and would vary based on position. For example, David Ortiz is a designated hitter. His pitching ability is totally irrelevant, and so is his fielding ability outside of interleague games. The DH’s
would be 0 and his
would be very close to 0. On the other hand, an American League pitcher would have an
very close to 1 since pitcher fielding is not as important as pitching and his hitting is entirely inconsequential in the AL. Catchers would have
at 0 but
much higher than other positions.
The upshot of this method of modeling production is that it shows Owings can make up for being a less than stellar pitcher by helping his team score runs and be a considerably better investment than a pitcher with a slightly lower ERA but no run production.
Adventures in the Mets Bullpen: One-Run No-Decisions and Vulture Wins July 19, 2010
Posted by tomflesher in Baseball.Tags: Mets, Roy Halladay, Johan Santana, Yovani Gallardo, Francisco Rodriguez, Tyler Clippard, Phil Cuzzi, Ted Lilly, Randy Wels, Jason Stark, Phil Cuzzi's hissyfit, vulture wins, one-run no-decisions
add a comment
A close cousin of the Tough Loss discussed earlier is what Jayson Stark of ESPN calls the Criminally Unsupported Start. Stark defines a CUS as a start in which the pitcher pitches 6 or more innings but the offense scores one run or less in support. Johan Santana didn’t fit that definition last night, but he was close: he left the game with a 2-1 lead after 8 innings pitched and ended up with a no-decision. (A friend of mine liked to call that “the ol’ Roy Halladay” back when Doc was pitching in Toronto.) Just as he was the centerpiece of Jayson Stark’s CUS standings back in 2007, Santana currently leads the league in starts with 6.0 or more innings pitched, at most one run allowed, and no decision. He has six such games, and no other pitcher has more than four. (Yovani Gallardo, however, has a respectable 3.)
In all of 2009, no one hit the six-game mark in one-run no-decisions. Surprisingly, this year the Mets aren’t leading the league in these one-run no-decisions – the Cubs are, led by Randy Wells and his impressive 4, along with Ted Lilly with 3.
Francisco Rodriguez also picked up his third Vulture Win of the year last night. A vulture win is the combination of a blown save and a win in the same game. Usually, that happens when a hometown closer blows the save in the top of the 9th and his teammates score in the bottom for the win. Frankie blew the save in the bottom of the 9th last night, but they left him in to pitch the bottom of the 10th and he held on (despite Phil Cuzzi’s hissyfit and some questionable umpiring going in both directions). Tyler Clippard leads the league in vulture wins this year with four.
The Kate Smith Effect July 18, 2010
Posted by tomflesher in Baseball.Tags: binomial distribution, Flyers, hockey-reference.com, Kate Smith, Kate Smith Effect
add a comment
From the Mountains…
To the Prairies…
To the Oceans…
White with foam….
It’s “well-known” that when Kate Smith sings “God Bless America” – whether live starting in 1969 or on videotape now – the Philadelphia Flyers play better, or at least they’re more likely to win. As Wikipedia indicates, she’s considered a good luck charm for the Flyers. How much does she help?
Since 1969, the Flyers have played in 3268 games and won 1631 of them for an observed win percentage of .4991. That’s very close to the long-term win percentage of .50 that we’d expect for any team. Of those games, Kate Smith sang or was played at 114 of them with a total record of 87-23-4, and the record when Kate Smith did not sing was 1544 wins in 3154 games for a “non-Kate” win proportion of .4895. I’ll make the null hypothesis that the Flyers play exactly the same way in games where “God Bless America” is sung – “Kate games” – as they do when it isn’t. That means that
The simplest way to attack this is to note that the Flyers’ win percentage in Kate games is .7632. Qualitatively, that’s quite a jump – surely, it must be significant. Of course, we can’t leave it at that.
First, note that with an observed proportion of .4895, the binomial probability of winning 87 games in 114 trials is approximately .00000000145 – that’s about 145 in one hundred billion. That’s highly unlikely. However, other methods can help us quantify the Kate Smith Effect.
The standard error for proportions is
With 113 degrees of freedom and a 95% confidence interval, I used Texas A&M’s t Calculator to find that the appropriate critical value is 1.98. That means that we can be 95% confident that the win percentage in Kate games after controlling for other factors is somewhere in the range
or approximately
Since the true proportion in non-Kate games is .4895, that means the Kate Smith Effect is somewhere in the range
Though I can’t explain why, it’s apparent that there’s a Kate Smith Effect of at least 20% in terms of winning percentage. This isn’t to say that playing Kate Smith’s “God Bless America” causes good luck. Since the Kate video is considered a good luck charm, it’s probably more likely that the players play harder in games that are deemed important enough to play it.
Cheap Wins July 16, 2010
Posted by tomflesher in Baseball.Tags: baseball-reference.com, Bill James, Roy Halladay, Tim Lincecum, Yovani Gallardo, R.A. Dickey, Cheap Wins, Tough Losses, John Danks, Ricky Romero, Tim Wakefield, Joe Saunders, John Lackey, Brian Bannister
add a comment
The opposite of the Tough Loss discussed below (which R.A. Dickey unfortunately experienced tonight in a duel with Tim Lincecum) is a Cheap Win. Logically, since a Tough Loss is a loss in a quality start, a Cheap Win (invented by Bill James) is a win in a non-quality start – that is, a start with a game score of below 50 (or, officially, a start with fewer than 6.0 innings pitched or more than 3 runs allowed).
The Chicago White Sox’ starter, John Danks, picked up a Cheap Win in Thursday’s game against the Twins. Although he pitched six innings, he gave up six runs (all earned) in the second inning, leading to an abysmal game score of 33. Danks had two of last year’s 304 Cheap Wins. Ricky Romero led the pack with six, and Joe Saunders and Tim Wakefield were both among the six pitchers with five Cheap Wins. Even Roy Halladay had two.
Through the beginning of the All-Star Break, there have been 136 Cheap Wins in 2010. That includes one by my current favorite player, Yovani Gallardo. John Lackey is already up to 5, and Brian Bannister is knocking on the door with 4.
It’s hard to read too much into the tea leaves of Cheap Wins, since they’re not all created equal. In general, they represent a pitcher sliding a little bit off his game, but his team upping their run production to rescue him. To that end, Cheap Wins might be a better measure of a team’s ability than Tough Losses, since, while Tough Losses show a pitcher maintaining himself under fire, Cheap Wins represent an ability to hit in the clutch (assuming that run production in Cheap Wins is significantly different from run production in other games). That’s hard to validate without doing a bit more work, but it’s a project to consider.
Paul the Octopus: Credible? July 11, 2010
Posted by tomflesher in Economics.Tags: binomial distribution, Paul the Octopus, statistics, World Cup
add a comment
Paul the Octopus (hatched 2008) is an octopus who correctly predicted 12 of 14 World Cup matches, including
Spain’s victory over the Dutch. Is his string of victories statistically significant?
First, I’m going to posit the null hypothesis that Paul is choosing randomly. As such, Paul’s proportion of correct choices should be .5 (). His observed proportion of correct choices is 12/14 or .857.
The standard error for proportions is
The t-value of an observation is
According to Texas A&M’s t Distribution Calculator, the probability (or p-value) of this result by chance alone is less than .01.
Using the binomial distribution with , the probability of 12 or more successes in 14 trials is a vanishingly small .0065.
So, is Paul an oracle? Almost certainly not. However, not being a zoologist, I can’t explain what biases might be in play. I’d imagine it’s something like an attraction to contrast as well as a spurious correlation between octopus-attractive flags and success at soccer.
More on Home Runs Per Game July 9, 2010
Posted by tomflesher in Baseball, Economics.Tags: baseball-reference.com, Japan, R, Rays, regression, replication, Baseball, home runs, Japanese baseball, Chow test
add a comment
In the previous post, I looked at the trend in home runs per game in the Major Leagues and suggested that the recent deviation from the increasing trend might have been due to the development of strong farm systems like the Tampa Bay Rays’. That means that if the same data analysis process is used on data in an otherwise identical league, we should see similar trends but no dropoff around 1995. As usual, for replication purposes I’m going to use Japan’s Pro Baseball leagues, the Pacific and Central Leagues. They’re ideal because, just like the American Major Leagues, one league uses the designated hitter and one does not. There are some differences – the talent pool is a bit smaller because of the lower population base that the leagues draw from, and there are only 6 teams in each league as opposed to MLB’s 14 and 16.
As a reminder, the MLB regression gave us a regression equation of
where is the predicted number of home runs per game, t is a time variable starting at t=1 in 1954, and DH is a binary variable that takes value 1 if the league uses the designated hitter in the season in question.
Just examining the data on home runs per game from the Japanese leagues, the trend looks significantly differe
nt. Instead of the rough U-shape that the MLB data showed, the Japanese data looks almost M-shaped with a maximum around 1984. (Why, I’m not sure – I’m not knowledgeable enough about Japanese baseball to know what might have caused that spike.) It reaches a minimum again and then keeps rising.
After running the same regression with t=1 in 1950, I got these results:
| Estimate | Std. Error | t-value | p-value | Signif | |
| B0 | 0.2462 | 0.0992 | 2.481 | 0.0148 | 0.9852 |
| t | 0.0478 | 0.0062 | 7.64 | 1.63E-11 | 1 |
| tsq | -0.0006 | 0.00009 | -7.463 | 3.82E-11 | 1 |
| DH | 0.0052 | 0.0359 | 0.144 | 0.8855 | 0.1145 |
This equation shows two things, one that surprises me and one that doesn’t. The unsurprising factor is the switching of signs for the t variables – we expected that based on the shape of the data. The surprising factor is that the designated hitter rule is insignificant. We can only be about 11% sure it’s significant. In addition, this model explains less of the variation than the MLB version – while that explained about 56% of the variation, the Japanese model has an value of .4045, meaning it explains about 40% of the variation in home runs per game.
There’s a slightly interesting pattern to the residual home runs per game (. Although
it isn’t as pronounced, this data also shows a spike – but the spike is at t=55, so instead of showing up in 1995, the Japan leagues spiked around the early 2000s. Clearly the same effect is not in play, but why might the Japanese leagues see the same effect later than the MLB teams? It can’t be an expansion effect, since the Japanese leagues have stayed constant at 6 teams since their inception.
Incidentally, the Japanese league data is heteroskedastic (Breusch-Pagan test p-value .0796), so it might be better modeled using a generalized least squares formula, but doing so would have skewed the results of the replication.
In order to show that the parameters really are different, the appropriate test is Chow’s test for structural change. To clean it up, I’m using only the data from 1960 on. (It’s quick and dirty, but it’ll do the job.) Chow’s test takes
where is the combined sum of squared residuals,
and
are the individual (i.e. MLB and Japan) sum of squared residuals,
is the number of parameters, and
and
are the number of observations in each group.
The critical value for 90% significance at 4 and 192 degrees of freedom would be 1.974 according to Texas A&M’s F calculator. That means we don’t have enough evidence that the parameters are different to treat them differently. This is probably an artifact of the small amount of data we have.
In the previous post, I looked at the trend in home runs per game in the Major Leagues and suggested that the recent deviation from the increasing trend might have been due to the development of strong farm systems like the Tampa Bay Rays’. That means that if the same data analysis process is used on data in an otherwise identical league, we should see similar trends but no dropoff around 1995. As usual, for replication purposes I’m going to use Japan’s Pro Baseball leagues, the Pacific and Central Leagues. They’re ideal because, just like the American Major Leagues, one league uses the designated hitter and one does not. There are some differences – the talent pool is a bit smaller because of the lower population base that the leagues draw from, and there are only 6 teams in each league as opposed to MLB’s 14 and 16.
As a reminder, the MLB regression gave us a regression equation of
where is the predicted number of home runs per game, t is a time variable starting at t=1 in 1954, and DH is a binary variable that takes value 1 if the league uses the designated hitter in the season in question.
Just examining the data on home runs per game from the Japanese leagues, the trend looks significantly differe
nt. Instead of the rough U-shape that the MLB data showed, the Japanese data looks almost M-shaped with a maximum around 1984. (Why, I’m not sure – I’m not knowledgeable enough about Japanese baseball to know what might have caused that spike.) It reaches a minimum again and then keeps rising.
After running the same regression with t=1 in 1950, I got these results:
| Estimate | Std. Error | t-value | p-value | Signif | |
| B0 | 0.2462 | 0.0992 | 2.481 | 0.0148 | 0.9852 |
| t | 0.0478 | 0.0062 | 7.64 | 1.63E-11 | 1 |
| tsq | -0.0006 | 0.00009 | -7.463 | 3.82E-11 | 1 |
| DH | 0.0052 | 0.0359 | 0.144 | 0.8855 | 0.1145 |
This equation shows two things, one that surprises me and one that doesn’t. The unsurprising factor is the switching of signs for the t variables – we expected that based on the shape of the data. The surprising factor is that the designated hitter rule is insignificant. We can only be about 11% sure it’s significant. In addition, this model explains less of the variation than the MLB version – while that explained about 56% of the variation, the Japanese model has an value of .4045, meaning it explains about 40% of the variation in home runs per game.
There’s a slightly interesting pattern to the residual home runs per game (. Although
it isn’t as pronounced, this data also shows a spike – but the spike is at t=55, so instead of showing up in 1995, the Japan leagues spiked around the early 2000s. Clearly the same effect is not in play, but why might the Japanese leagues see the same effect later than the MLB teams? It can’t be an expansion effect, since the Japanese leagues have stayed constant at 6 teams since their inception.
Incidentally, the Japanese league data is heteroskedastic (Breusch-Pagan test p-value .0796), so it might be better modeled using a generalized least squares formula, but doing so would have skewed the results of the replication.
In order to show that the parameters really are different, the appropriate test is Chow’s test for structural change. To clean it up, I’m using only the data from 1960 on. (It’s quick and dirty, but it’ll do the job.) Chow’s test takes
Back when it was hard to hit 55… July 8, 2010
Posted by tomflesher in Baseball, Economics.Tags: baseball-reference.com, R, regression, sabermetrics, Stuff Keith Hernandez Says, Baseball, home runs, Year of the Pitcher, Willie Mays, talent pool dilution
add a comment
Last night was one of those classic Keith Hernandez moments where he started talking and then stopped abruptly, which I always like to assume is because the guys in the truck are telling him to shut the hell up. He was talking about Willie Mays for some reason, and said that Mays hit 55 home runs “back when it was hard to hit 55.” Keith coyly said that, while it was easy for a while, it was “getting hard again,” at which point he abruptly stopped talking.
Keith’s unusual candor about drug use and Mays’ career best of 52 home runs aside, this pinged my “Stuff Keith Hernandez Says” meter. After accounting for any time trend and other factors that might explain home run hitting, is there an upward trend? If so, is there a pattern to the remaining home runs?
The first step is to examine the data to see if there appears to be any trend. Just looking at it, there appears to be a messy U shape with a minimum around t=20, which indicates a quadratic trend. That means I want to include a term for time and a term for time squared.
Using the per-game averages for home runs from 1955 to 2009, I detrended the data using t=1 in 1955. I also had to correct for the effect of the designated hitter. That gives us an equation of the form
The results:
| Estimate | Std. Error | t-value | p-value | Signif | |
| B0 | 0.957 | 0.0328 | 29.189 | 0.0001 | 0.9999 |
| t | -0.0188 | 0.0028 | -6.738 | 0.0001 | 0.9999 |
| tsq | 0.0004 | 0.00005 | 8.599 | 0.0001 | 0.9999 |
| DH | 0.0911 | 0.0246 | 3.706 | 0.0003 | 0.9997 |
We can see that there’s an upward quadratic trend in predicted home runs that together with the DH rule account for about 56% of the variation in the number of home runs per game in a season (). The Breusch-Pagan test has a p-value of .1610, indicating a possibility of mild homoskedasticity but nothing we should get concerned about.
Then, I needed to look at the difference between the predicted number of home runs per game and the actual number of home runs per game, which is accessible by subtracting
This represents the “abnormal” number of home runs per year. The question then becomes, “Is there a patt
ern to the number of abnormal home runs?” There are two ways to answer this. The first way is to look at the abnormal home runs. Up until about t=40 (the mid-1990s), the abnormal home runs are pretty much scattershot above and below 0. However, at t=40, the residual jumps up for both leagues and then begins a downward trend. It’s not clear what the cause of this is, but the knee-jerk reaction is that there might be a drug use effect. On the other hand, there are a couple of other explanations.
The most obvious is a boring old expansion effect. In 1993, the National League added two teams (the Marlins and the Rockies), and in 1998 each league added a team (the AL’s Rays and the NL’s Diamondbacks). Talent pool dilution has shown up in our discussion of hit batsmen, and I believe that it can be a real effect. It would be mitigated over time, however, by the establishment and development of farm systems, in particular strong systems like the one that’s producing good, cheap talent for the Rays.

