##
Evaluating Hockey Analytics (and bonus luck numbers through November 15, 2015)
*November 16, 2015*

*Posted by tomflesher in Economics, Hockey, Sports.*

Tags: Corsi, Fenwick, Hockey analytics, NHL, Pythagorean expectation, Pythagorean luck, Sabres

add a comment

Tags: Corsi, Fenwick, Hockey analytics, NHL, Pythagorean expectation, Pythagorean luck, Sabres

add a comment

The Buffalo Sabres have been having a weird season. They’ve been outshot and won, they’ve outshot their opponents and lost, and (aside

from starting goalie Chad Johnson) their ice time leader, defenseman Rasmus Ristolainen, is bringing up the rear in relative Corsi and Fenwick stats. Ristolainen has a nasty -9.5 Corsi Rel, while fellow defenders Jake McCabe, Mark Pysyk, and Mike Weber have 8.5, 9.1, and 13.5, respectively. Ristolainen is averaging over 24 minutes a game, with the other three down by six to eight minutes each. What’s more, Ristolainen appears to be pulling his weight – he’s made 45 shots, second only to center Jack Eichel, and has 4 goals with an 8.9 shooting percentage. Ristolainen has 11 points (second only to Ryan O’Reilly with 14) but is tied with Tyler Ennis for the team’s worst +/- at -6. See? Weird year so far.

A lot of that is small sample size, of course. The Sabres are only 17 games into the 82-game season. They are, however, looking awfully lucky so far. Just how lucky? Let’s find out using the same Pythagorean metric that shows up in baseball.

Since Corsi and Fenwick both measure attempts to shoot, they’re noisier than goals. I was curious how much noisier, so I fired up R using the 2014 data and decided to update my post from earlier this year about the optimal Pythagorean exponent for the NHL. In it, I set up three minimization problems, all of them estimating winning percentage (and counting overtime losses as losses – the exponent changes only slightly if you estimate points-percentage instead of wins). Those three problems each minimized the sum of squares, using the Pythagorean formulas. The first used the traditional method of estimating goals and goals against; the second used Corsi For and Corsi Against; the third used Fenwick For and Fenwick Against.

The Goals For/Goals Against form () returned an optimal x value of a bit over 2.11, with a residual sum of squares of .0289. That means that if you square each team’s win-loss percentage and compare it to , then square all of the differences (to keep them positive) and add them up, you get a total of .0289. The number itself doesn’t mean anything, but it’s a useful way to compare one model to another.

The Corsi For/Corsi Against form returns an optimal x of 1.445, but the residual sum of squares ballooned to .24. That means on average the squared error is almost ten times as great – you get a pretty good predictor, but with much more “noise.”

Right in the middle, the Fenwick form yields an optimal x of 1.877, with a residual squared error of .203. It’s a better predictor of wins and losses than the Corsi version, but it’s still not as good a predictor of wins as the simple Goals For/Goals Against form.

Above, I’ve graphed each team’s winning percentage against the Pythagorean (Goals For/Goals Against form), as well as all three trendlines: note that the black Goals line and the red Fenwick line are extremely close, while the blue Corsi line is a bit higher up. Two conclusions can be drawn:

- The Fenwick line is a better predictor than the Corsi line, but the Corsi line appears to bias expected percentage upward. That is, it overestimates the imact of each shot more than goals and Fenwick do.
- Since the Fenwick line is a better predictor, that indicates that Corsi’s inclusion of blocked shots probably does just add noise. Blocked shots are, at least according to this model, of limited predictive value.

Through November 15, Corsi For % had a correlation of .11 with points and .125 with winning percentage; Fenwick For % had correlations of .17 and .19, respectively. Blocked shots had negative correlations in both cases.

Pythagorean luck is defined as the number of wins above expectation. Behind the jump are the numbers, through November 15, demonstrating which teams are lucky and which aren’t.

##
Quickie – The distance-elasticity of extra point successes
*September 14, 2015*

*Posted by tomflesher in Economics, Football, Sports.*

Tags: elasticity, extra point, point after touchdown

add a comment

Tags: elasticity, extra point, point after touchdown

add a comment

*Baseball content will resume with the next update.*

The NFL moved the lineup for the point-after-touchdown from the 2 to the 15; since the ball is snapped back eight yards, and the end zone is ten yards deep, the kick moved from a twenty-yard kick to a 33-yard kick.

There were a couple of oddities this week so far, including a 48-yard extra point kicked by the Browns yesterday. Also, an unusual number of PATs were missed. In 68 extra-point attempts, 64 were successful, for a completion rate of 94.11%. Last year, in week 1’s Sunday games, 60 attempts were made, and 59 were successful (98.33%). If you include all Week 1 games, that percentage rises to 98.61% (71 out of 72). We can roughly estimate the PAT’s sensitivity to distance using an elasticity formula, percentage change in completions over percentage change in distance.

Percentage change in completion rate = 100*(98.61 – 94.11)/94.11 = 4.78

Percentage change in distance = 100*(33-20)/20 = 65

4.78/65 = .07, meaning that a 1% change in the distance would yield about a .07% change in completion rate. Since teams pretty rarely kick field goals from the 15, it’s tough to calibrate that to other data, but it’s likely that this isn’t a constant-elasticity function. A small change close to the goal line probably has a very small effect (as demonstrated), but a small change further away would likely be a much bigger deal.

##
The World’s Worst Mets Preview
*September 9, 2015*

*Posted by tomflesher in Baseball, Economics.*

Tags: Mets, Nationals, preview

add a comment

Tags: Mets, Nationals, preview

add a comment

Tonight, the Mets start **Jacob deGrom** against the Nationals’ **Stephen Strasburg**. Seven current Mets have OBPs above .400 against Strasburg, and that list looks a little bit like a lineup:

Name | PA | AB | H | HR | BB | SO | |||
---|---|---|---|---|---|---|---|---|---|

Lucas Duda | 6 | 3 | 1 | 0 | 2 | 0 | .333 | .667 | .333 |

Travis d’Arnaud | 3 | 3 | 2 | 0 | 0 | 0 | .667 | .667 | .667 |

Curtis Granderson | 7 | 5 | 2 | 0 | 2 | 1 | .400 | .571 | .400 |

Michael Cuddyer | 6 | 6 | 3 | 0 | 0 | 2 | .500 | .500 | .500 |

David Wright | 4 | 4 | 2 | 0 | 0 | 0 | .500 | .500 | .500 |

Kevin Plawecki | 2 | 2 | 1 | 0 | 0 | 1 | .500 | .500 | 1.000 |

Wilmer Flores | 5 | 5 | 2 | 0 | 0 | 2 | .400 | .400 | .600 |

Total | 54 | 49 | 15 | 0 | 4 | 13 | .306 | .370 | .347 |

(Full list here– current Mets are .306/.370/.347 vs Strasburg).

Seems reasonable – Granderson in right, **Michael Conforto** in left, **Yoenis Cespedes** in center, d’Arnaud catching, Duda at first, Flores at short, **Daniel Murphy** at second, and Wright at third. (Murphy is 1 for 6 lifetime against Strasburg.) That leaves Cuddyer to come off the bench as an early pinch hitter; Plawecki, despite his .500 OBP against Strasburg, is probably not our best option off the bench. [NOTE: Cuddyer is unavailable. Mea culpa.]

Meanwhile, with **Ryan Zimmerman** day to day, the Nats are missing his .375/.333/.350 against deGrom; that leaves their best options as **Yunel Escobar** (.500/.545/.600 in 10 plate appearances) and **Bryce Harper** (.385/.429/.462 in 14). **Jose Lobaton** (.500/.500/.500 in 2) and **Ian Desmond** (.308/.308/.538 in 13) also appear to be threats, but of course Desmond’s defense makes him a double-edged sword. In 109 plate appearances, current Nationals hit .223/.250/.350 against deGrom.

In a crucial late-season game, this one looks promising for the Mets.

##
Visualizing 2-Out RBIs
*September 8, 2015*

*Posted by tomflesher in Baseball, Economics, Sports.*

Tags: 2-out RBIs, data visualization

add a comment

Tags: 2-out RBIs, data visualization

add a comment

In yesterday’s win against the Nationals, **Yoenis Cespedes** hit a crucial RBI double to score **David Wright**. What’s more, this came with two outs. In every game against the Nationals, the Mets’ postseason is at stake, so even though Cespedes’ hit wasn’t a go-ahead run, the insurance was key.

The Mets haven’t had a great season with two outs; they have 182, 24th in the Majors. Of those 182, 25 were hit by **Lucas Duda**, who isn’t even active (he’s on the disabled list). That’s quite distinct from Kansas City, which has 51 of its 2-out RBIs credit to **Kendrys Morales**; Duda, the Mets’ leader in 2-out RBIs, isn’t even in the top 40. I thought it would be interesting to mine whether teams with a lot of 2-out RBIs won a lot of games, and whether there was any information gained if most of those runs being batted in by one player.

In the graph above, the number of 2-out RBIs this season is on the horizontal axis, and the number of wins this season is on the vertical axis. The size of each dot represents the number of RBIs owed to the team’s top scorer.

There’s a weak correlation between wins and 2-out RBIs – about .25. That makes sense, given that more runs lead to more wins (correlation .39 this year). There’s a weaker correlation (.16) between the number of RBIs with 2 outs from the leading scorer and wins; that’s probably due to the runs effect, to be honest.

Take a look at Kansas City in the upper right, with lots of 2-out RBIs and Kendrys Morales’ enormous dot. Then, take a look at St Louis in the upper left – **Kolten Wong** is there with a tiny 25-RBI dot. Similarly, **Nolan Arenado** and his 47 RBIs with 2 outs haven’t done much to pull Colorado up out of the southeast corner of the graph. Also interesting is the overlay of Pittsburgh (**Starling Marte**, 38) on Kansas City – it doesn’t get much clearer that the correlation here is small.

##
What does Clippard add?
*July 28, 2015*

*Posted by tomflesher in Baseball, Economics.*

Tags: trades, Tyler Clippard

add a comment

Tags: trades, Tyler Clippard

add a comment

The Mets acquired setup man/closer **Tyler Clippard** from Oakland for starting pitcher **Casey Meisner**. Oakland is going to eat $1 million of Clippard’s $8.3 million deal, making Clippard the Mets’ highest-paid reliever; **Bartolo Colon** is the only pitcher who earns more.

Though Ty is arbitration-eligible this year, his yearly salary is about double **Bobby Parnell**‘s $3.7 million deal; for the record, **Heath Bell** was earning $9 million yearly in his last contract. Clippard’s contract is big, but not out of the question – his 2014 stats included a .995 WHIP and a 3.57 KBB ratio. Closing for Oakland, Tyler has a 1.19 WHIP and a 1.81 KBB. Somewhat alarming is his drop in BAbip this year – it was .255 in Washington, and only .217 this year in Oakland. That means that some of those hits are due to defense, but his walk percentage also ballooned from 8.3% to 12.6%. Of course, some of that is due to the fact that Clippard is facing American League batters, including specialized designated hitters.

What the Mets know they’ll get out of Clippard is a solid reliever who can shore up what’s been a fairly lights-out bullpen, but help bridge the gap from the early innings. Yeah, yeah, Familia has blown some saves recently, but over the course of the season the Mets have 10 blown saves, which is below the National League median of 12. The Mets are also near the bottom of the league in losses by relievers – they have 9 losses in relief this year, behind only Milwaukee with 8. This will allow the Mets to go to a strong, reliable arm early, both relieving (ha!) some of the pressure on starting pitchers like **Jon Niese** (who’s been left in while struggling because, hey, what’s the alternative?) and preventing the Mets from needing to rely on **Carlos Torres** and **Alex Torres**. Though this leads to a higher number of pitchers per game, having a reliable endgame pipeline with **Jenrry Mejia**, Clippard, Bobby Parnell and **Jeurys Familia** makes it easier to go lights out. It will also allow the Mets to develop **Hansel Robles** by judiciously building him into high-pressure situations while maintaining some options behind him.

##
Why isn’t Robles the left-handed specialist?
*July 5, 2015*

*Posted by tomflesher in Baseball, Economics.*

Tags: Alex Torres, Hansel Robles, Loogy, Mets, Platoon splits

add a comment

Tags: Alex Torres, Hansel Robles, Loogy, Mets, Platoon splits

add a comment

In yesterday’s post, I made reference to **Terry Collins**‘ maddening habit of treating **Alex Torres** as a left-handed specialist against all better evidence. In 17 of Torres’ 33 appearances, he’s faced three batters or fewer; those numbers are similar to bridge man **Hansel Robles**‘ 26 appearances, in which 15 appearances have faced three batters or fewer (each has faced a maximum of eight batters). Robles’ median appearance is a full inning pitched, whereas Torres’ median was 2/3 of an inning. 19 of Torres’ appearances have come in a clean inning, whereas Robles has come in 16 times to start an inning and twice more with one batter on but 0 outs. Overall, the two pitchers are being used in very similar ways, except for one major factor: Almost 48% of the batters Alex Torres has faced are left-handed, as opposed to a hair over 38% for Hansel Robles.

Against righties, Torres has a .297 OBP-against, compared to Robles’ .328, neither being much to write home about. (Closer **Jeurys Familia** allows a .225 OBP against right-handers and .254 against left-handers, and reliable eighth-inning dude **Bobby Parnell** carries .294 against righties and .222 against lefties, in a very limited sample this year.) But against lefties, Robles strictly dominates Torres. Robles has a .222 OBP allowed against right-handers, which is as good as Parnell and a smidge better than our closer. But Torres, who’s faced 59 lefties, more than anyone except Familia? Torres allows a monstrous .407 OBP when facing left-handers!

.407.

Four oh seven.

That’s the worst platoon split of any active Mets pitcher. Not only is Alex Torres not even better facing lefties than righties, he’s so bad that Alex Torres Against Left-Handers should be sent down to keep Alex Torres Against Right-Handers on the roster! If Left-Handers Against Alex Torres were a single player, they would rank #3 in OBP in the National League, ahead of **Anthony Rizzo** with .405.

Both Parnell and Robles are better against lefties than righties, but Parnell should be comfortable in his eighth-inning role. Why not bust out Robles against lefty-heavy lineups and see if he can keep up his difference? But for heaven’s sake, quit using Alex Torres against left-handers.

##
One pitcher and two guys on the disabled list
*July 4, 2015*

*Posted by tomflesher in Baseball, Economics.*

Tags: Curtis Granderson, Lucas Duda, Mets

add a comment

Tags: Curtis Granderson, Lucas Duda, Mets

add a comment

This season, the Mets have been fighting against a pernicious series of injuries, mainly focused on the offense. Although we lost **Jenrry Mejia**, **Zack Wheeler**, and **Jerry Blevins**, we’ve also lost **David Wright** for much of the season and missed **Daniel Murphy**, **Michael Cuddyer**, and **Juan Lagares** for smaller pieces. Let’s take a look at some interesting statistics:

**Steven Matz** leads the team in OBP (1.000) and total bases per game (4). Second to Matz in OBP is David Wright (.371); **Travis d’Arnaud** is second in total bases per game (2) and fifth in OBP (.338). Wright follows up with 1.75 total bases per game. In order to get to active position players, we have to go 3 deep to **Lucas Duda** (OBP of .358 and 1.56 TB/G) and **Curtis Granderson** (OBP of .348, 1.54 TB/G). In other words, of the Mets’ top 5 hitters, one is a pitcher who’s played one game, and two have spent more time on the disabled list than on the field. Argue with the choice of metric, but our best active hitter can’t touch **Andrew McCutchen**‘s 10th-best OBP (.370) or the total bases mark (Duda has 122, Granderson 125, and the bottom of the top 10 is a three way tie with 162 total bases involving **Prince Fielder**, **J.D. Martinez**, and **Manny Machado**).

Of course, it could be worse: we could have **Ike Davis** (.322 OBP, 1.3 TB/G). (But I still like Ike.)

So here’s the problem: When the Mets started off the season, they were hitting incredibly – during the first 25 games, they averaged 4.04 runs per game and allowed only 3.28. The league average this season is 4.01 runs scored to 4.11 allowed, so that was a pretty nice set of stats. But during games 26-50, those stats slid to 3.84 runs scored and 4.04 runs allowed, and in games 51-75, the Mets averaged only 3.16 runs scored to still 4.04 runs allowed. Our pitching, despite being at times inconsistent, is still better than the league, by average.

Although the Mets have made some interesting moves in the bullpen, and **Terry Collins**‘ insistence on using **Alex Torres** as a left-handed specialist is maddening at times, the pitching side of the equation is okay. All the team needs is a break on the offensive side – Duda could break out. Cuddyer could stay healthy. Murphy can keep up his hitting and **Wilmer Flores** can continue developing. This season has been a comedy of errors offensively, but SOMETHING has to go right soon.

##
Kirk’s Big Spring
*March 20, 2015*

*Posted by tomflesher in Baseball, Economics.*

Tags: BABIP, KBB, Kirk Nieuwenhuis, Spring training

add a comment

Tags: BABIP, KBB, Kirk Nieuwenhuis, Spring training

add a comment

Kirk Nieuwenhuis is having an incredible spring. All the usual caveats are in play – it’s spring training, so the stats are useless – but Kirk’s production has been exceptional. His slash line is .469/.553/.625 on 38 plate appearances. Let’s hit some sanity checks on Kirk’s production.

First of all, his BAbip is off the charts. This spring, Kirk’s batting average on balls in play is .536, which is ridiculously high. Kirk won’t be able to maintain that into the season. If he’s still got a .536 OBP by the trade deadline, I’ll eat my hat and post the video. Kirk’s BAbip has been pretty streaky, though. During his rough April, Kirk had a .300 BAbip, about the league average over the season; after coming back up in late June, he had a .377 BAbip over the remainder of the season, broken up as .625 over five June games with 11 at-bats, .267 over 28 at-bats in July, .400 over 23 August at-bats, and .348 over 32 at-bats in September.

From 2012 to 2013, Kirk’s BAbip dropped from about .379 to .246, and then shot back up to .370 in 2014. Using those numbers and taking first differences, then using the ratio of differences, that means we’d expect Kirk’s BAbip to drop to about .254 this season. Nonetheless, Kirk’s platoon splits are huge – against right-handed pitchers, from 2014, he’s got a .040/.050/.283 split (although he only made 9 at-bats and 10 plate appearances against left-handed pitchers). Though Kirk’s splits aren’t readily available, it’s possible that his big spring is residual of facing mostly right-handers.

In the spring, Kirk’s BAbip denominator (AB – HR – K – SF) is 28 and the numerator (H – HR) is 15. If we take Kirk’s previous-year .377 BAbip, over 28 trials we’d expect 15 or more successes to occur about 2.86% of the time. That’s just barely within the bounds of statistical significance (which would indicate we’d expect Kirk to hit between 6 and 15 times about 95% of the time), and well outside if we assume Kirk has a true mean of .254 (which would put our confidence interval at around 3-11 successes in 28 trials).

Second, take a look at Kirk’s K/BB ratio. Kirk has typically had a strikeout-to-walk ratio above 1; in 2013, he struck out about 2.67 times for every time he walked, and in 2014 it was about 2.44 strikeouts per walk. Over this small spring sample size, Kirk’s K/BB has actually dipped below 1, at 4/6 (or .667). Assuming Kirk walked 6 times anyway, using a conservative 2:1 K/BB ratio would turn 8 of Kirk’s hits into strikeouts. That would make Kirk’s BAbip tighten up to .350. Still strong, but not the obscene .536 we’ve seen. Even if we convert one walk to a strikeout and maintain a 2 K/BB, that would leave Kirk at .409, a very respectable spring.

Kirk’s numbers have been shocking, and of course he’s out of options, so he’s extremely likely to make the team. As a left-handed bat, he’d be a strong everyday player if the outfield weren’t so crowded, but with Michael Cuddyer and Juan Lagares in the mix already along with lefties Curtis Granderson and Matt den Dekker, it’s going to be tough to find Kirk a clean platoon spot.

##
BABIP as a Defensive Metric
*October 11, 2014*

*Posted by tomflesher in Baseball, Economics.*

Tags: BABIP, BJ Upton, models, statistics

add a comment

Tags: BABIP, BJ Upton, models, statistics

add a comment

I follow OOTP on Facebook, and this Reddit thread about editing the Braves to go 0-162 popped up the other day.

I went into commissioner mode and basically ranked everyone’s stats to go 0-550 with 550 Ks (although when I went back, OOTP changed it to give them all a few hits and a couple of walks, etc.) I did not have to edit

BJ Upton, as he was already programmed to do so.

One reply asked whether 1-BABIP is a valid defensive metric, and that got the wheels turning. (Note that for statistical purposes, summary statistics for 1-BABIP will be the same magnitude and the opposite sign as statistics for BABIP, so I went ahead and just used BABIP.)

For a quick check, I checked in at Baseball Reference to get the National League’s team-level statistics for the last 5 years, then correlated BABIP to runs allowed by the team. That correlation is .741 – that’s a pretty strong correlation. Similarly, the correlation between BABIP and team wins was about -.549. It’s a weaker and negative correlation, which is expected – negative because an added point of opposing team BABIP would mean more balls in play were falling in as hits, and weaker because it ignores the team’s offensive production entirely.

If BABIP accurately describes a team’s defensive power, then a statistical model that models team runs allowed as a function of fielding-independent pitching and pitching-independent fielding should explain a large proportion, but not all, of the runs allowed by a team, and thereby explain a significant but smaller proportion of the team’s wins.

I crunched two models to test this, each with the same functional form: Dependent Variable = a + b*FIP + c*BABIP. With Runs as the dependent variable, the R^{2} of the model was .8625; with Wins as the dependent variable, the R^{2} was .5246. Since R^{2} roughly describes the percent of variation explained by the model, this makes a lot of sense. In the Runs model, about 14% of runs come due to something other than home runs, walks, or hits, such as baserunning and errors; in the Wins model, about 47% of team wins are explained by something other than defense and pitching. (Say…. offense? That’s crazy.) In both models, the coefficients are statistically significant at the 99% level.

BABIP’s coefficient in the Runs model is 3444.44, which means that a batting average on balls in play of 1.000 would lead to about 3444 runs scored over a season; more realistically, if BABIP increases by .01, that would translate to about 34 runs per season. Its coefficient in the Wins model is -328.757, meaning that an increase of .01 in BABIP corresponds to about 3.29 extra losses. That’s surprisingly close to the 10 runs-1 win ratio that Bill James uses as a rule of thumb.

Since the correlations were strong, this bears a closer look at game-level rather than simply team-level data.