Showing posts with label Lineup. Show all posts
Showing posts with label Lineup. Show all posts

08 March 2017

Mark Trumbo is Not the Ideal Orioles Leadoff Hitter - Chris Davis Is

This post runs as a follow-up to Jon Shepherd's lineup optimization proof of concept.

Buck Showalter tinkers with lineups, but he'll never be able to try out every combination. Lineups can be considered permutations of the roster - combinations in which order is relevant, such that the same nine players can be ordered differently for a new lineup. The total number of distinct permutations of nine players on a 25-man roster is given by the following equation:
9! / (25-9)! = 741,354,768,000
Given the possibility of trades and acquisitions, not to mention the Orioles' penchant for shuttling players between the Majors and the Minors, the true number of possible lineups over the course of a season is even higher. Given only 9 batters, as Jon Shepherd worked with in his proof of concept research, the number of lineup permutations drops to a much more manageable 362,880 distinct possibilities. No amount of lineup tinkering will allow Showalter to test each of these lineups; he would need 2,240 seasons of 162 games to see them all take the field, and I doubt Manny Machado will even be an Oriole after all that time.

As a fan enabled with myriad tools for lineup optimization (and Jon's algorithm that explains the variance run production quite nicely), I sought to find the best Orioles lineup given those same nine batters that we can reasonably expect to feature as starters at least very frequently in 2017. I sifted through all 362,880 possibilities thanks to the built-in permutation generator in Python, ran each through Jon's algorithm, and recorded the results.

Because I considered all possible lineups, I had no need to establish a set of assumptions that would guide me. I don't need to start with Chris Davis batting fourth because of his skillset. I expected to see a sort of cycle in the most productive lineups, resembling something like 3-batter groups that end with a power hitter. This follows Jon's suggestion that a batter's ability to produce runs is predicated largely on whether the batters before him can reach base. I did not expect to see a prototypical leadoff hitter batting first, because innings rarely end so tidily as to allow the following inning to start over at the top of the lineup. More often the man leading off an inning will not be the leadoff hitter, and in my eyes, this indicates that the importance of a "true leadoff hitter" is vastly overstated (the importance of a player with true on base skills is not).

The most productive lineup suggested by this exercise is the following:
1B Chris Davis
LF Hyun-soo Kim
2B Jonathan Schoop
DH Mark Trumbo
3B Manny Machado
RF Seth Smith
CF Adam Jones
C Welington Castillo
SS J.J. Hardy

This lineup is worth an estimated 885 runs over the course of 162 games, not accounting for handedness splits. That would be 141 runs more than the Orioles scored in 2016, and 50 runs more than the Mark Trumbo-led lineup that Jon suggested last week. In fact, Davis was the leadoff hitter in four of the 10 most productive lineup permutations. Perhaps Trumbo is not the ideal leadoff hitter after all, but Davis, his left-handed counterpart with a similar batter profile, is!

This lineup is worth 287 runs more than the worst lineup combination possible from these nine players, a Machado-led abomination that slotted Trumbo, Adam Jones, and Davis as the 6, 8, and 9 hitters, respectively. Such a batting order would fly in the face of traditional lineup construction as well as this new machine-led practice.

More importantly, if we assume that last year's run prevention is indicative of this year's run prevention, we can estimate how well the best and worst lineups would perform according to pythagorean win-loss. Again, assuming that the 715 runs scored against the Orioles in 2016 carries over and would be identical in 2017 (unlikely, and a tenuous assumption at best), the pythagorean win-loss record would estimate the following results for the best and worst lineup permutations:

Projected Runs Scored, 2017
Runs Against, 2016
Pythagorean Win %
Pythagorean W-L
885
715
59.6%
96-66
598
715
41.2%
68-94

By this estimate, the best possible lineup is worth 28 wins. This matches up with the rule of thumb that 10 runs is equivalent to one win. The best possible lineup, with a projected 885 runs, is expected to score 100 runs more, or 10 wins better, than the traditional lineup put forth in Jon's article.

If this exercise is to be considered accurate, then lineup optimization is critical to a team's success. It boggles the mind that the more analytical front office and managerial combinations haven't considered context-dependent lineup optimization if they are believed to be the difference between a team fighting for a playoff spot and one of the best teams in the league with minimal tinkering.

I end with the same question Jon posited: have teams neglected the importance of lineup optimization because of some normalized tools and broad rules of thumb?

I choose to believe that there are human factors pushing teams away from this sort of radical overhaul, specifically that players wouldn't like it. As antiquated as they are, RBIs and lineup position seem to be points of pride for many players, and it's not a stretch to think that a prototypical leadoff hitter can market himself as such and earn a higher payday than he would if the skillset asked of the first lineup spot was fungible. Making players uncomfortable likely has real effects, even if there's no technical reason why batting seventh should be any different than batting second. It may also drive free agents to consider other teams that won't torpedo their ability to market themselves, or toss their routine into a blender every time someone new joined the team.

Further, many fans and owners would likely be too quick to call an experimental lineup a failure. One bad game out of batters would be enough to lampoon the manager who organized it, and persistence in the face of a handful of failures would probably lead to the manger's and/or GM's ousting. In terms of self-preservation for a manager or GM, it makes far more sense to leave those wins on the table and use the standard, sub-optimal batting order formula that every other team uses. It's similar logic to why NFL coaches kick field goals and PATs more often than they should, when going for a first down or two-point conversion improves win expectancy: it's safer to lose doing what's accepted than to lose doing something radical, even if the radical idea made the loss less likely.

There may also be a technical limitations to this process that has prevented teams from truly optimizing lineups. It took nearly three days to run all 362,880 batting order permutations through Jon's algorithm, and that was only with 9 batters. All possible lineup permutations given the full 25-man roster caused a memory error on my computer. I can't imagine trying to expand this algorithm to consider the 40-man roster, which would hold over 99 trillion permutations. Doing this on a regular basis for each team would take more than just modeling and coding knowledge; it would require a deep understanding of how to efficiently manage physical storage, and likely a huge amount of it at that.

However, the benefits that can come from analyzing the order of just the nine batters the team expects to play most often seems to have some benefit that doesn't require a supercomputer or a superanalyst. I then return to the thought that maybe shaking up the lineup may be akin to shaking a hornet's nest, both in terms of upsetting players and risking careers.

21 March 2016

No, Manny Machado Shouldn't Bat Third


Spring training is long, and it's hard to be patient for the season to start. That's especially difficult to do because nothing outside of injury concerns and fringe roster battles really matters all that much. So it can be easy to get carried away during spring training, and that sometimes leads to articles with headlines such as this: "Orioles' Manny Machado batting third, driving in four runs opens discussion on lineup spot."

The debate about where Machado should bat is hardly new; it was a popular topic last season and has been discussed throughout the offseason. And really, there are two competing viewpoints: 1) Machado should stay at the top of the lineup (preferably batting second) because he's one of the Orioles' top two hitters; or 2) Machado should be placed in a slot that's better suited to driving in runs.

If you're at all familiar with The Book, then you're aware of the most efficient way to order a batting lineup. If you're not, Sky Kalkman provided a nice primer on lineup optimization several years ago that's still relevant today. It won't take long; give it a read if you haven't.

A bunch of these ideas have already been adopted. Contact hitters who generally aren't very good overall don't bat second nearly as often now. Teams sacrifice bunt less often, especially at the top of the order. Blazing speed is no longer a requirement for leadoff hitters. That's just a few.

So back to what this all means for the Orioles, and let's just paint with a broad brush. We're just talking about the basics here. Chris Davis and Machado are the two best O's hitters. They should be batting in either the first, second, or fourth spots in the lineup. Machado makes the most sense in the second spot, but there shouldn't be much of an issue with him batting leadoff. Davis is the team's most feared power bat, and he's going to bat cleanup.

If you're solely focused on the driving-in-runs angle, then your argument should be more for putting Machado fourth or fifth than third. But Davis isn't going to bat second (it's not the worst idea at all, but it's not going to happen). If Machado were to bat third and Davis fourth, then you'd have some combination of two worse hitters (Adam Jones, Nolan Reimold, Pedro Alvarez, Hyun Soo Kim, Joey Rickard (mentioned in that first article above as "a dark horse [leadoff] candidate") batting in front of them. I like Jones just fine, but he's not better than Machado or Davis.

At the very least, the idea of a team's best hitters batting as many times as possible should make sense. Buck Showalter isn't an enormous violator of this policy, but he also is a fan of ordering his lineup with a heavy influence on alternating right- and left-handed batters, if possible. Sometimes that means David Lough, Chris Parmelee, Delmon Young, or, uh, Everth Cabrera bat at the top of the order. Showalter isn't perfect, but seasons are long and baseball is weird. Remember how good Jimmy Paredes was for a stretch last year? You figure it out.

Honestly, it would be interesting to see Showalter order his lineup with Machado first and Davis second. Would a Machado-Davis-Jones-Alvarez-Trumbo-Wieters-Schoop-Kim-Hardy lineup against right-handed pitchers interest anyone?

Anyway, it's always worth noting that batting order isn't nearly as important as many fans think. It's just easy to argue about, and I'm guilty of that at times. Still, I'd prefer not to see Reimold or Rickard at the top of the order just to bump Machado down into what used to be the assumed best place for a team's best hitter. This isn't really about Machado at all; he's talented enough to thrive anywhere.

Photo via Keith Allison

07 March 2016

wRC+ By Batting Order Slot: MLB vs. The Orioles

Spring training has begun and after an off-season filled with signings, rumored signings, re-signings rumored trades and agreements that may or may not have existed and fallen through, the Orioles lineup has begun to come into focus.  Barring a last minute signing of someone like Austin Jackson or Pedro Alvarez or a trade for the likes of Jay Bruce (one of which will inevitably happen the minute I submit this article) we can make a decent guess at the Orioles starters and how they’ll line up.  With that in mind it seems like as good a time as any to inspect that lineup and try to project how it ranks against the rest of Major League Baseball.

A couple of notes before I dive in: First, I tried to be as objective as possible in doing this evaluation.  This time of year in particular I tend to see everything through rose-colored glasses, but any ideas I have about Jonathan Schoop hitting 35 home runs or Manny Machado winning an MVP award aren’t particularly useful from an analytical point of view as I’m neither a professional scout nor an expert in statistical analysis.  So for this piece I’ll be dealing with only commonly available projections, specifically ZiPS and Steamer.  And to keep everything as simple as possible, I’ll just be looking at wRC+, an explanation of which can be found here. If you are unfamiliar, wRC+ is a stat that measures a player’s total offensive value, with 100 being league average.

Finally, this is my best guess at what the Orioles most frequent lineup will look like (and not necessarily what I think it should be).  Obviously, the Orioles will like use many lineup variations over the course of the year, but this seems like the best place to start. With that in mind, let’s dig in.

Batting First:
75th percentile: 115              50% 101                25%: 92
Orioles 2015: 122 (5th of 30)
Manny Machado (Projected wRC+: 129)

Machado held down this lineup slot for almost all of 2015, registering 496 PA from the top of the lineup, supplemented by a scattering of appearances from Nolan Reimold (86 PA), Alejandro De Aza (68) and a scattering of others.  Though is future might well be as a middle-of-the-order hitter, Machado will likely return to the lead-off spot this year and it’s actually a hat he wears pretty well; in 2016 he was 2nd on the team in OBP,  1st in steals and 2nd in extra base hits.  His 2016 projection of 129 wRC+ is more than solid for a lead-off hitter and (before accounting for at-bats accrued by others) would give the Orioles the best wRC+ for the lead-off spot. 

Batting Second:
75%: 120              50%: 105              25%: 94
Orioles 2015: 93 (24th of 30)
Hyun Soo Kim (Projected wRC+: 106)

The second spot was a big problem area for the Orioles last year. Jimmy Paredes (202 PA batting second) got off to a hot start but regressed in a huge way as the season progressed and stumbled across the finish line.  Gerardo Parra inherited the lion’s share of the at-bats after the trading deadline but he disappointed, failing to match the level of production he achieved in Milwaukee.  Overall, the Orioles #2 hitters ranked near the bottom of the league; their cumulative 93 wRC+ put them 24th of 30.  This year, I’m projecting Korean free agent acquisition Hyun-Soo Kim to get the bulk of the at-bats in the 2 hole.  Translating Korean stats to the Major Leagues is an inexact science, but projection models are fairly bullish on Kim.  He projects for 106 wRC+, which would put the Orioles right in the middle of the pack at 15th of 30. 

Batting Third
75%: 134              50%: 120              25%: 107
Orioles 2015: 120 (Tied 14th)
Adam Jones (Projected wRC+: 110)

Jones has occupied the third spot for most of his career as an Oriole and there’s every reason to assume that continues into 2016. Jones registered 111 wRC+, which is significantly below the 50th percentile among major league 3rd hitters, but the team got strong contributions from occasional #3 hitters Chris Davis and Manny Machado to finish right in the middle of the pack.  Steamer and ZIPs both think Jones holds right around his 2015 number again in 2016.  Jones isn’t an ideal #3 hitter- he’d be very strong in the 5th or 6th spot- but short of moving Machado or Chris Davis (and weakening the 1st or 4th spots) he is the Orioles best option here. 

Batting Fourth
75%: 132              50%: 111              25%: 106
Orioles 2015: 134 (6th)
Chris Davis (Projected wRC+: 134)

After a protracted contract negotiation and one-team bidding war, Chris Davis returns as the Orioles clean-up hitter and he’s a good one.  Davis was a monster last year slugging 47 home runs and scoring a wRC+ of 147 as the Orioles primary clean-up hitter.  Orioles clean-up hitters as a group scored a healthy 134, good for 6th place out of 30 major league teams.  Davis projects right at that same 134 again, a healthy but slightly regressed number for him that would again put the Orioles in the 80th percentile of the entire league.

Batting Fifth
75%: 115              50%: 100              25%: 89
Orioles 2015: 107 (11th)
Mark Trumbo (Projected wRC+:  108)

Trumbo, Matt Wieters and a sampling of others will likely occupy this spot, depending on who is hot and who is pitching, but in the name of simplicity, I’m slotting Trumbo here in the 5th spot.  Wieters was the most common #5 hitter for the team last year, but with only 191 PA and the 5-hole’s production got a healthy assist from early season Chris Davis appearances to end up at 107 wRC+, 11th best in the majors.  Trumbo projects right at that same level (108). 

Batting Sixth
75%: 102              50%: 91                 25%: 80
Orioles 2015: 76 (26th)
Matt Wieters (Projected wRC+:  94)

This is where things started to get hairy for the Orioles in 2015. The first five spots were relatively strong but the bottom half of the lineup was a catastrophe, largely due to the major holes offensive holes at DH, right field, left field, short stop and 2nd base prior to Schoop’ s return.  The 6th spot, occupied most frequently by JJ Hardy but really by no-one on a consistent basis compiled a wRC+ of 76, ranking a dismal 26th of 30 teams.   Things are looking up slightly heading in to 2016.  Matt Wieters accepted the qualifying offer to return and looks to be healthy heading into spring training. His projection of wRC+ of 94 isn’t world-beating by any stretch, but would be good enough to move the Orioles into the top half of the league and represent a significant improvement. 

Batting Seventh
75%: 101              50%: 86                 25%: 78
Orioles 2015: 66 (30th)
Jonathan Schoop (Projected wRC+:  94)

Orioles 7th hitters were there worst in the majors last year (see what I mean about the bottom of the lineup being a catastrophe?).  Like the 6th spot, this was another revolving door with JJ Hardy getting the most at-bats (his bat really was a big problem last year, more on that later).  For 2016, I’m projecting Jonathan Schoop into this lineup spot, though he could foreseeably end up hitting anywhere from 6th to 9th depending on how Buck wants to stack it up.  It’s an article of faith among many Orioles fans that Schoop is a potential all-star on the verge of a break-out campaign after he posted a very solid 112 wRC+ in 321 trips to the plate in 2015.  That very well might be the case, but so far the projection models aren’t seeing it, deterred by his K-to-BB% (an ugly 24.6-2.8) and high BABIP. Still, his average projection of 94 puts is positively Ruthian relative to last year’s #7 hitters and would put the Orioles a much improved 10th in the majors. 

Batting Eighth
75%: 91                 50%: 81                 25%: 68
Orioles 2015: 60 (26th)
JJ Hardy (Projected wRC+:  72)

Notice the trend?  The bottom of the Orioles lineup really was a sinkhole for most of last season. Hardy, Ryan Flaherty and Caleb Joseph hit from this spot a roughly equal number of times in 2015, but with their results ranging from bad to abominable.  I’m plugging Hardy in here for the purpose of this analysis.  He really should probably be the 9th hitter, regardless of who plays right field, but I think the Orioles keep him out of the 9th spot to start, out of respect for his reputation.  Hardy projects for 72 wRC+, somewhat of a dead cat bounce from the career low 49 he posted in 2015).  The Orioles are hoping for a bigger bounce back from a hopefully-healthy Hardy, but it’s very possible he’s in a similar spot to Brian Roberts a few years ago, where a series of injuries have obscured or excused a drop in performance that has just as much to do with natural aging.  Hardy’s lineup spot is safe though, as his solid glove work makes him a respectable option at SS for at least a bit longer.  His projection of 72 wRC+ would put the Orioles 20th of 30 for the 8 spot. 

Batting Ninth
75%: 74                 50%: 72                 25%: 65
Orioles 2015: 74 (Tied 4th of 14 AL Teams)
Nolan Reimold (Projected wRC+: 81) among others

The ninth spot falls to the right fielder, whoever that ends up being.  I suspect it will be a revolving door this year, at least until someone emerges as the leader of the pack at that position.  Orioles 9th place hitters actually performed reasonably well relative to the rest of the AL in 2015, led by a strong performance by Caleb Joseph from that spot.  Candidates this year include Reimold, Joey Rickard (78 Projected wRC+) and Dariel Alvarez (a surprising 93!) among a score of other internal and external candidates. 


Summary:
wRC+ by Lineup Spot
#
75%
50%
25%
2015 Orioles
2016 Player
2016 Proj.
1
115
101
92
122 – 5th
Machado – 3B
129 (1st)
2
120
105
94
93 – 24th
Kim – LF
106 (15th)
3
134
120
107
120 – Tied `14th
Jones – CF
110 (22nd)
4
132
111
106
134 – 6th
Davis – 1B
134 (6th)
5
115
110
89
107 – 11th
Trumbo – DH
108 (11th)
6
102
91
80
76 – 26th
Wieters – C
94 (15th)
7
101
86
78
66 – 30th
Schoop – 2B
94 (T-9th)
8
91
81
68
60 – 26th
Hardy – SS
72 (T-20th)
9*
94
72
65
74 – 4th (of 15)
Reimold - RF
81 (4th)
*The stats for the 9th slot are relative only to American League teams

The projected Orioles lineup is very solid.  They are above the league median at 7 of 9 positions and 25th percentile or better for 3.  The current lineup compares favorably to last year’s edition, which accumulated a wRC+ of 94 (21st in the league) but over-performed that number to score 713 runs (9th best in baseball). With a decent run of health, this year’s squad should be better on the basis of more depth.  Healthier seasons from Schoop and Hardy mean less plate appearances for Ryan Flaherty (wRC+ of 71) and the additions of Trumbo and Kim hopefully add stability and competency to positions that were revolving doors of disaster in 2015. 

This is not, however, an “elite” lineup, at least as it presents according to projections.  Only Machado and Davis are particular standouts relative to their counterparts across the league.   Some of previous years problems- high strikeout rates, low on-base percentage- will likely continue to 2016 but on the bright side, so will the strengths (home runs, and lots of them).  Taken as a whole, it appears we’re looking at a better version of last year’s offense, but likely not enough improved (on its own) to take the Orioles from 81 wins to where they would like to be in competing for a division title.