jump to navigation

Diagnosing the AL December 22, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , ,
add a comment

In the previous post, I crunched some numbers on a previous forecast I’d made and figured out that it was a pretty crappy forecast. (That’s the fun of forecasting, of course – sometimes you’re right and sometimes you’re wrong.) The funny part of it, though, is that the predicted home runs per game for the American League was so far off – 3.4 standard errors below the predicted value – that it’s highly unlikely that the regression model I used controls for all relevant variables. That’s not surprising, since it was only a time trend with a dummy variable for the designated hitter.

There are a couple of things to check for immediately. The first is the most common explanation thrown around when home runs drop – steroids. It seems to me that if the drop in home runs were due to better control of performance-enhancing drugs, then it should mostly be home runs that are affected. For example, intentional walks should probably be below expectation, since intentional walks are used to protect against a home run hitter. Unintentional walks should probably be about as expected, since walks are a function of plate discipline and pitcher control, not of strength. On-base percentage should probably drop at a lower magnitude than home runs, since some hits that would have been home runs will stay in the park as singles, doubles, or triples rather than all being fly-outs. There will be a drop but it won’t be as big. Finally, slugging average should drop because a loss in power without a corresponding increase in speed will lower total bases.

I’ll analyze these with pretty new R code behind the cut.

(more…)

What Happened to Home Runs This Year? December 22, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , , , ,
1 comment so far

I was talking to Jim, the writer behind Apparently, I’m An Angels Fan, who’s gamely trying to learn baseball because he wants to be just like me. Jim wondered aloud how much the vaunted “Year of the Pitcher” has affected home run production. Sure enough, on checking the AL Batting Encyclopedia at Baseball-Reference.com, production dropped by about .15 home runs per game (from 1.13 to .97). Is that normal statistical variation or does it show that this year was really different?

In two previous posts, I looked at the trend of home runs per game to examine Stuff Keith Hernandez Says and then examined Japanese baseball’s data for evidence of structural break. I used the Batting Encyclopedia to run a time-series regression for a quadratic trend and added a dummy variable for the Designated Hitter. I found that the time trend and DH control account for approximately 56% of the variation in home runs per year, and that the functional form is

\hat{HR} = .957 - .0188 \times t + .0004 \times t^2 + .0911  \times DH

with t=1 in 1955, t=2 in 1956, and so on. That means t=56 in 2010. Consequently, we’d expect home run production per game in 2010 in the American League to be approximately

\hat{HR} = .957 - .0188 \times 56 + .0004 \times 3136 + .0911 \approx 1.25

That means we expected production to increase this year and it dropped precipitously, for a residual of -.28. The residual standard error on the original regression was .1092, so on 106 degrees of freedom, so the t-value using Texas A&M’s table is 1.984 (approximating using 100 df). That means we can be 95% confident that the actual number of home runs should fall within .1092*1.984, or about .2041, of the expected value. The lower bound would be about 1.05, meaning we’re still significantly below what we’d expect. In fact, the observed number is about 3.4 standard errors below the expected number. In other words, we’d expect that to happen by chance less than .1% (that is, less than one tenth of one percent) of the time.

Clearly, something else is in play.

Quickie: Ryan Howard’s Choke Index October 25, 2010

Posted by tomflesher in Baseball.
Tags: , , , , ,
1 comment so far

The Choke Index is alive and well.

Previous to 2010, Ryan Howard of the Philadelphia Phillies hit home runs in three consecutive postseasons. He managed 7 in his 140 plate appearances, averaging out to .05 home runs per plate appearance. Not too shabby. It’s a bit below his regular season rate of about .067, but there are a bunch of things that could account for that.

This year, Ryan made 38 plate appearances and hit a grand total of 0 home runs in the postseason. What’s the likelihood of that happening? I use the Choke Index (one minus the probability of hitting 0 home runs in a given number of plate appearances) to measure that. As always, the closer a player gets to 1, the more unlikely his homer-free streak is.

The binomial probability can be calculated using the formula

f(k;n,p) = \Pr(K = k) = {n\choose k}p^k(1-p)^{n-k}

Or, since we’re looking for the probability of an event NOT occurring,

(1-p)^k

or .95^{38}= .142

using his career postseason numbers. That means that Ryan Howard’s 2010 postseason Choke Index is .858. Pretty impressive!

Teixeira and Cano: Picking up slack? August 5, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , , ,
1 comment so far

Michael Kaye, the YES broadcaster for the Yankees, often pointed out between July 22 and August 4 that the Yankees were turning up their offense to make up for Alex Rodriguez‘s lack of home run production. That seems like it might be subject to significant confirmation bias – seeing a few guys hit home runs when you wouldn’t expect them to might lead you to believe that the team in general has increased its production. So, did the Yankees produce more home runs during A-Rod’s drought?

During the first 93 games of the season, the Yankees hit 109 home runs in 3660 plate appearances for rates of 1.17 home runs per game and .0298 home runs per plate appearance. From July 23 to August 3, they hit 17 home runs in 451 plate appearances over 12 games for rates of 1.42 home runs per game and .0377 home runs per plate appearances. Obviously those numbers are quite a bit higher than expected, but can it be due simply to chance?

Assume for the moment that the first 93 games represent the team’s true production capabilities. Then, using the binomial distribution, the likelihood of hitting at least 17 home runs in 451 plate appearances is

p(K = k) = {n\choose k}p^k(1-p)^{n-k} = {451\choose 17}.0298^{17}(.9702)^{434} \approx .0626

The cumulative probability is about .868, meaning the probability of hitting 17 or fewer home runs is .868 and the probability of hitting more than that is about .132. The probability of hitting 16 or fewer is .805, which means out of 100 strings of 451 plate appearances about 81 of them should end with 16 or fewer plate appearances. This is a perfectly reasonable number and not inherently indicative of a special performance by A-Rod’s teammates.

Kaye frequently cited Mark Teixeira and Robinson Cano as upping their games. Teixeira hit 18 home runs over the first 93 games and made 423 plate appearances for rates of .194 home runs per game and .0426 home runs per plate appearance. From July 23 to August 3, he had 5 home runs in 12 games and 54 plate appearances for rates of .417 per game and .0926. That rate of home runs per plate appearance is about 8% likely, meaning that either Teixeira did up his game considerably or he was exceptionally lucky.

Cano played 92 games up to July 21, hitting 18 home runs in 400 plate appearances for rates of .196 home runs per game and .045 per plate appearance. During A-Rod’s drought, he hit 3 home runs in 50 plate appearances over 12 games for rates of .25 and .06. That per-plate-appearance rate is about 39% likely, which means we don’t have enough evidence to reject the idea that Cano’s performance (though better than usual) is just a random fluctuation.

It will be interesting to see if Teixeira slows down as a home-run hitter now that Rodriguez’s drought is over.

Is A-Rod’s Performance Different? August 3, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , , , , ,
1 comment so far

In games between milestone home runs, is Alex Rodriguez’ hitting similar to other times? (This is all a very polite way of asking, “Does A-Rod choke?”) It’s difficult to answer, because there’s so little data about those milestone home runs. A-Rod, though, has some statistically improbable results and it would be interesting to look at it a bit more closely.

Over 2008-2009, Alex played in 262 games and had 1129 plate appearances with 281 hits, 65 home runs, a triple:double ratio of 1:50, an OBP of .397, and a SLG of .553. His OBP has a margin of error of .0146, so we can be 95% confident that over those years his baseline production would be somewhere between .368 and .426 and absent any time or age effect that is the range in which A-Rod should produce for any given period.

Two recent milestone home runs come to mind as examples of Rodriguez’s reputed choking. First, the stretch between home run #499 and #500 was 8 games and 36 plate appearances. (I’m intentionally ignoring extra plate appearances on the days he hit #499 and #500.) During that time, Alex had an OBP of only .306. That’s a difference of .091 over 36 plate appearances and that performance has a standard error of about .078 when compared with his regular performance, implying a t-value of about 1.16. With 35 degrees of freedom, Texas A&M’s t Calculator gives a p-value of about .127, so this difference is marginally within the realm of chance. (The usual cutoff for significance would be .05.)

A-Rod hit his last home run on July 22. Discounting the plate appearances after his last home run, he’s played in 11 games with a paltry .255 OBP and .238 SLG over 47 plate appearances. His .255 OBP has a difference of about .142 and a standard error of about .064. That implies a t-value of about 2.21, with a p-value of about .016. That is, the probability of this difference occurring by chance is less than 2%. That gives us one result as close to significant and one as probably significant.

As a side note, A-Rod’s Choke Index continues to rise. He’s gone 48 plate appearances without a home run, and at a rate of .055 home runs per plate appearance the probability of that occurring by chance is about .066. That leaves his Choke Index at .934.

The Choke Index August 1, 2010

Posted by tomflesher in Baseball.
Tags: , , , , , , , ,
3 comments

It’s been quite a while since Alex Rodriguez hit Home Run #599 – nine days since July 22, but more quantifiably, 42 plate appearances. Just how much of a slump is he in? I’d like to propose a quantifiable answer: the Choke Index.

From 2000 to 2009, A-Rod was hitting approximately .064 home runs per plate appearance. In 2008 he hit .059 and in 2009 he hit .056, so it’s probably much fairer to use a slightly lower rate. I’m going to make the assumption that Rodriguez’s true production is about .055 home runs per plate appearance, since he exhibited a downward trend and his 2010 production has been very low. (It also cuts him some additional slack in the Choke Index.)

Simply, we should assume that A-Rod’s failure to produce is merely the result of chance, and not due to choking or media distraction or even Rodriguez’s discomfort with the special chipped baseballs. (A better man than I would call this the Numbered Ball Effect.) Then, we should see how likely that is.

At .055 home runs per plate appearance, the likelihood of going 42 plate appearances without a home run is (1-.055)^{42} or approximately .093. The Choke Index is simply 1-(likelihood) or, in this case, .907. As it becomes progressively less likely that Rodriguez will go another plate appearance without hitting a home run, the Choke Index number rises. A theoretical Choke Index of 1 would indicate that the player’s lack of home run hitting is nearly impossible to describe by chance alone.

A-Rod’s Choke Index between #499 and #500 was about .877. This is a man who doesn’t handle milestones well.

Another example was Gary Sheffield in 2009, when he was attempting to hit his 500th home run. In the previous two years, he hit approximately .041 home runs per plate appearance. Much was made of Sheffield’s trouble hitting #500, but since he was hitting almost exclusively as a pinch hitter, he simply didn’t have many opportunities. Between his final plate appearance on September 26 of 2008 and his only plate appearance on April 17 of 2009, Sheffield went 21 plate appearances without hitting a homer. That gives him a choke index of .556.

Barry Bonds, meanwhile, was hitting .065 home runs per plate appearance in the seasons prior to his record-breaking home run #756. #755 was hit in Bonds’ first plate appearance on August 4, 2007. Bonds made 3 more plate appearances, all walks, in that game. He hit #756 in his third plate appearance only three days later on August 7.  He had August 5 off and made 4 plate appearances on August 6, meaning that Bonds went 9 plate appearances between home runs, giving him a choke index of .454.

Rodriguez will hit his 600th home run eventually, but it’s getting painful to watch.

The Best Game Ever July 30, 2010

Posted by tomflesher in Baseball.
Tags: , , , , , , , , , , , , , , , , , , , , ,
2 comments

Two of my favorite things about baseball happened during tonight’s game between the Yankees and the Indians.

First of all, in the top of the ninth inning, corner infielder Andy Marte pitched for the Indians. Marte pitched a perfect ninth and coincidentally struck out Nick Swisher, who was brought in to pitch for the Yankees in a similar situation last year and struck out Gabe Kapler of the Tampa Bay Rays. I can’t promise it’s true, but I think that puts Swisher at the top of the list for involvement in position player pitcher strikeouts.

Marte’s presence was necessary because the Indians used seven other pitchers. Starter Mitch Talbot went only two innings, and the Indians got another two out of Rafael Perez. Frank Hermann took the loss for the Indians during his 1 1/3 innings. Tony Sipp pitched another 1 1/3, and Joe Smith managed to give up four earned runs in 1/3 of an inning before being removed for Jess Todd for an inning. In the bottom of the 9th, Marte was all the Indians had left.

Not to be outdone, Joe Girardi gave up his designated hitter by moving his DH – funnily enough, it was Swisher – into right field as part of a triple switch. Swisher moved to right field; Colin Curtis moved from right field to left field; Marcus Thames moved from left field to third base;  finally, pitcher Chan Ho Park was put into the batting order in place of Alex Rodriguez, who came out of the game.

Finally, A-Rod is up to 33 plate appearances without a home run. Assuming his standard rate of .064 home runs per plate appearance, the likelihood of this happening by chance is .936^{33} = .113 \approx 11.3 \% . I stand by my belief that there’s something other than chance (i.e. distraction or other mental factors) causing Rodriguez’s hitting to suffer.

The 600 Home Run Almanac July 28, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , , , , , , , , , ,
2 comments

People are interested in players who hit 600 home runs, at least judging by the Google searches that point people here. With that in mind, let’s take a look at some quick facts about the 600th home run and the people who have hit it.

Age: There are six players to have hit #600. Sammy Sosa was the oldest at 39 years old in 2007. Ken Griffey, Jr. was 38 in 2007, as were Willie Mays in 1969 and Barry Bonds in 2002. Hank Aaron was 37. Babe Ruth was the youngest at 36 in 1931. Alex Rodriguez, who is 35 as of July 27, will almost certainly be the youngest player to reach 600 home runs. If both Manny Ramirez and Jim Thome hang on to hit #600 over the next two to three seasons, Thome (who was born in August of 1970) will probably be 42 in 2012; Ramirez (born in May of 1972) will be 41 in 2013. (In an earlier post that’s when I estimated each player would hit #600.) If Thome holds on, then, he’ll be the oldest player to hit his 600th home run.

Productivity: Since 2000 (which encompasses Rodriguez, Ramirez, and Thome in their primes), the average league rate of home runs per plate appearances has been about .028. That is, a home run was hit in about 2.8% of plate appearances. Over the same time period, Rodriguez’ rate was .064 – more than double the league average. Ramirez hit .059 – again, over double the league rate. Thome, for his part, hit at a rate of .065 home runs per plate appearance. From 2000 to 2009, Thome was more productive than Rodriguez.

Standing Out: Obviously it’s unusual for them to be that far above the curve. There were 1,877,363 plate appearances (trials) from 2000 to 2009. The margin of error for a proportion like the rate of home runs per plate appearance is

\sqrt{\frac{p(1-p)}{n-1}} = \sqrt{\frac{.028(.972)}{1,877,362}} = \sqrt{\frac{.027}{1,877,362}} \approx \sqrt{\frac{14}{1,000,000,000}} = .00012

Ordinarily, we expect a random individual chosen from the population to land within the space of p \pm 1.96 \times MoE 95% of the time. That means our interval is

.027 \pm .00024

That means that all three of the players are well without that confidence interval. (However, it’s likely that home run hitting is highly correlated with other factors that make this test less useful than it is in other situations.)

Alex’s Drought: Finally, just how likely is it that Alex Rodriguez will go this long without a home run? He hit his last home run in his fourth plate appearance on July 22. He had a fifth plate appearance in which he doubled. Since then, he’s played in five games totalling 22 plate appearances, so he’s gone 23 plate appearances without a home run. Assuming his rate of .064 home runs per plate appearance, how likely is that? We’d expect (.064*23) = about 1.5 home runs in that time, but how unlikely is this drought?

The binomial distribution is used to model strings of successes and failures in tests where we can say clearly whether each trial ended in a “yes” or “no.” We don’t need to break out that tool here, though – if the probability of a home run is .064, the probability of anything else is .936. The likelihood of a string of 23 non-home runs is

.936^{23} = .218

It’s only about 22% likely that this drought happened only by chance. The better guess is that, as Rodriguez has said, he’s distracted by the switching to marked baseballs and media pressure to finally hit #600.

Paul the Octopus: Credible? July 11, 2010

Posted by tomflesher in Economics.
Tags: , , ,
add a comment

Paul the Octopus (hatched 2008) is an octopus who correctly predicted 12 of 14 World Cup matches, including

Paul the Octopus with a Shoe

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 (H_o : \bar{p} = .5). His observed proportion of correct choices is 12/14 or .857.

The standard error for proportions is

\sqrt{\frac{p(1-p)}{n-1}} = \sqrt{\frac{.857(.143)}{13}} = \sqrt{\frac{.123}{13}} = \sqrt{.009} = .097

The t-value of an observation is

\frac{p}{se} \sim\ t_{df} = \frac{.857}{.097} \sim\ t_{13} = 8.84 \sim\ t_{13}

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 \lambda = .5, 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.

Manny’s First 27 Games (or, the Marginal Product of Drug Use) June 4, 2010

Posted by tomflesher in Baseball, Economics.
Tags: , , , , , , , , ,
add a comment

Last year, Manny Ramirez was suspended for 50 games on May 6. The suspension came after his 27th game of the season. On May 25th of this year, Manny played his 27th game of 2010. That means we can take a look at the first 27 games of each season, when he was using performance-enhancing drugs (in 2009) and when he wasn’t (presumably, this year). The differential line is behind the cut.

(more…)