/r/Sabermetrics

Photograph via snooOG

Sabermetrics is the search for objective knowledge about baseball.

Sabermetrics - The search for objective knowledge about baseball through the analysis of empirical evidence.

Sabermetrics Analysis
Baseball Prospectus
Beyond the Box Score
Fangraphs
Hardball Times
High Heat Stats
Tom Tango
Tango Tiger Wiki
Balls and Strikes
Baseball Think Factory
Baseball Analysts
The Physics of Baseball, Alan Nathan
Baseball HQ Research and Analysis
Sabermetrics 101: Introduction to Baseball Analytics
Data Sources
Retro Sheet
Sean Lahman Database
DingerDB
Fangraphs
Baseball Reference
Stat Corner
Baseball Heat Maps
Pitch F/X
Brooks Baseball Pitch f/x
Baseball Savant
TexasLeaguers
Books
The Book: Playing the Percentages in Baseball
The Hidden Game of Baseball
Baseball Between the Numbers
Extra Innings: More Baseball Between the Numbers
The Bill James Historical Baseball Abstract
Curve Ball
The Baseball Economist
The Numbers Game
The Extra 2% - Jonah Keri
Big Data Baseball
Dollar Sign on the Muscle
Analyzing Baseball Data with R
Baseball Hacks: Tips & Tools for Analyzing and Winning with Statistics
The Sabermetric Revolution: Assessing the Growth of Analytics in Baseball
Trading Bases
AL East AL Central AL West
Yankees Tigers Oakland
Orioles WhiteSox Rangers
Rays Royals Angels
Blue Jays Indians Mariners
Red Sox Twins Astros
NL East NL Central NL West
Nationals Reds Giants
Braves Cardinals Dodgers
Phillies Brewers D-Backs
Mets Pirates Padres
Marlins Cubs Rockies
Related Subreddits
/r/baseball
/r/baseballstats
/r/fantasybaseball
/r/sultansofstats
/r/sportsanalytics
/r/footballstrategy
/r/nflstatheads
Misc.
/r/Sabermetrics Weekly Stat Discussions
Reddit Markdown Primer - how to make charts, other stuff in reddit

/r/Sabermetrics

13,640 Subscribers

0

Unpopular opinion: Andrew Friedman is a better Executive than Theo

Theo broke 2 curses so he always has that advance. The reasons I have Friedman over Theo? Friedman proved he could have success with a small market Im not quite as sure if Theo could do that. Theo has one more ring than Friedman with 3 compared to 2 but Friedman has been to 2 more World Series. When Theo wins World Series he has had trouble Keeping the same team success Years after. Friedman? Is a guaranteed 95 + win team every year with dodgers, alongside great farm systems, great drafting/ player development/ best data. Theo left the redsox and cubs with a bit of a mess. Friedman has never bottomed out and has kept sustainable winning to the max.

5 Comments
2024/11/09
17:54 UTC

3

How was the dWAR component of WAR determined for historical players?

As I understand, WAR is determined in part by defensive WAR or dWAR. That includes errors but also assists and range of fielding plays.
But how was dWAR determined for historical ballplayers when we don't have much film about them and there's no contemporaneous eyewitness account?

Perhaps fielder errors were scored back then. But what about assists? And how could the fielding range be determined without film?

2 Comments
2024/11/09
01:30 UTC

0

Retrosheet: only downloadable box files for regular season?

I read online that Retrosheet has box score event files for All-Star and Post-season, yet I only see downloadable files for regular season box score data. They must have them, since the individual historical game summaries all include a box score section.

6 Comments
2024/11/08
03:47 UTC

7

What is the next big thing for player development?

Like what do you think has a chance to be the next competitive advantage for teams in player development?

12 Comments
2024/11/07
22:20 UTC

0

Would someone be so kind to provide me with the R or Python backtest code for my model? I keep getting errors and can't seem to figure it out?

I have heard that wOBA is the best indicator for runs, so I have picked this stat.  I am using player stats from 2023+2024 until July 1^(st) where I will only use 2024 stats(To avoid the High/low of small sample size).  For the bets I took in 2024, Dogs were up 20 units, but Favs were down 10 units, so I am thinking to just focus on dogs next year.

‘Adjusted wOBA’.   It multiplies a Teams wOBA-Split * Starting Pitchers wOBA (5.26 innings [current league average]) + Bullpen wOBA (3.74 innings) * Ball Park Factor.  Then I convert to projected runs.  **For my calculation I believe 5.26 Innings/Game converts to 58.44% for starters and 41.56% for relievers.  Since I don’t know which relievers will be brought into the game, I just use the average bullpen wOBA for each team.  Also, My starters have to have at least 5 Starts.

 wOBA_adj = (team's wOBA-Split) * (SP wOBAA * .5844+RP wOBAA * .4156) / LeagueAveragewOBA x BPF

 (both throwing a Right Handed Starter)

 Red Sox(+150): Team wOBA-RHP = 0.320

Twins(-178): Team wOBA-RHP = 0.322

Target Field BPF = 0.97

Pitcher Leage Average wOBA = 0.313

 

Red Sox - SP wOBA = 0.263

Twins – SP wOBA = 0.304

 

Red Sox Bullpen wOBA = 0.311

Twins Bullpen wOBA = 0.286

 

Red Sox wOBA_Adj = (.320) * ((.304 * .5844 + .286 * .4156) / .313) * .97 = 0.280

Twins wOBA_Adj = (.322) * ((.263 * .5844 + .311 * .4156) / .313) * .97 = 0.263

 

Now I convert these wOBA_adj to runs.  I lost contact with a saberist who gave me this calculation, and if anyone can tell me how he got these numbers(5211.999 and 917.5457), it would help me as I learn Python.   I do know he used 4-5 years and removed 2020 for his backtest.

 

Red Sox Runs Expected = 5211.999 * 0.280 – 917.5457 = 540.24 Runs… Divided by 162 = 3.33 runs

Twins Runs Expected = 5211.999 * 0.263 – 917.5457 = 455.10 Runs… Divided by 162 = 2.81 runs

 

This tells me the Red Sox have an advantage offensively, since they are +150 underdogs.

2 Comments
2024/11/03
16:12 UTC

5

For Classifying Pitch Types in Live Games what Classification Model does the MLB Use and how is it done instantly?

I have been playing around with some pitch data from Baseball Savant and Have tested a couple different methods including am rpart DTree, Multinomial Logistic Regression, and ensemble methods like Random Forests classifier, and also MLP NN and they all had great accuracies. I know this comes with the downside of having to generate one of these models each for every pitcher, and for live broadcasts the classification has to be done pretty much instantly. So I was wondering if for the MLB do they stick to one MLP model for each, or do they have a genralized single model, then adjusts it somehow for each pitcher? Thank you

2 Comments
2024/11/02
21:58 UTC

2

Hard Cutter and Gyro Slider classifications

Was curious if anyone had information or an article on differentiating cutters and/or sliders. Know prospectus does HC and FC but can't find how the determine the difference.

1 Comment
2024/11/02
16:12 UTC

2

Issues trying to calculate something similar to wRC+

hello. For a part of my engineer's thesis, I need to calculate and implement a version of wRC+. along the way I wasn't able to completely match my results with the ones I saw on fangraphs/baseball-reference, I'm hoping some of them can be answered under this post. I mainly used this post as help to calculate some slightly innacurate wOBA weights.

RE24 matrix and linear weights - what's an occurence?

Let’s use one out, man on first as our example. In order to calculate the run expectancy for that base-out state, we need to find all instances of that base-out state from the entire season (or set of seasons) and find the total number of runs scored from the time that base-out state occurred until the end of the innings in which they occurred. Then we divide by the total number of instances to get the average. If you do the math using 2010-2015, you get 0.509 runs. In other words, if all you knew about the situation was that there was one out and a man on first, you would expect there to be .509 runs scored between that moment and the end of the inning on average.

Now that you have a run expectancy matrix, you need to learn how to use it. Each plate appearance moves you from one base-out state to another. So if you walk with a man on first base and one out, you move to the “men on first and second and one out” box. That box has an RE value of 0.884. Because your plate appearance moved you from .509 to 0.884, that PA was worth +0.375 in terms of run expectancy.

Let's consider this following example: Runner on 1st, 0 out. Runner steals 2nd. The batter singles, scoring the runner from 2nd.

  • Does the single receive credit for the stolen base in terms of RE?
  • When calculating the RE24 matrix, do I count the occurence of runner on second, 0 out in the denominator for that situation?

I tested all combinations of the yes/no answers to the questions above, but still when calculating the linear weights, my triples weight is consistently around 0.02 or more higher than on websites with data, so if anyone had any similar issues and found a way to solve them, please let me know. Here are my current results for the 2015 season, counting the situation from the second question and the single not receiving credit in the first question.

eventfangraphs articlemy weights
out-0.26-0.259
BB0.290.308
HBP0.310.329
1B0.440.442
2B0.740.742
3B1.011.029
HR1.391.386

Park factors formula

After I hopefully manage to troubleshoot the weights, I wanted to apply some park factors, to make the stat a bit more complicated for the paper. To do so I used the equations from this article. Unfortunately, the result of the batting park factor in the article (1.07) doesn't match with the single season batting factor for those same 1982 braves used in the example (1.08).

Does anyone know of a new formula which is actually used? The formula from the article is from a book from the 90s, and it calculates an IPC, used to adjust the amount of outs in the 9th inning. Using retrosheet data and modern computing power, I could easily calculate the exact amount of outs made at every stadium. Does my formula for PF make sense?

RPO_x = [points scored by both teams in games at park X]/[amount of outs recorded in games at park X]

RPO_Lx = [points scored by both teams in games outside of park X]/[amount of outs recorded in games outside of park X]

PF = 100*RPO_X/RPO_Lx

Where PF is the ratio of how much more runs score at park X as opposed to league average. I am stumped as to how to arrive at two different numbers for batters and pitchers.

2 Comments
2024/11/02
15:02 UTC

30

3D MLB Visualizer

I created an app to visualize hits and pitches from MLB games. I posted about it earlier but I've made it a lot better now. I am now using 3D models of the actual fields for the teams to plot the data and create the arcs to get accurate locations for the hits.

Here's an example:

https://preview.redd.it/p23xxlfu7dyd1.png?width=1864&format=png&auto=webp&s=2900ab8c514af994c361a1aaedc47c18fbcdbcf5

Lmk what you think.

https://mlbvisualizer.streamlit.app/

13 Comments
2024/11/01
22:21 UTC

3

Fangraphs fielding value?

Hello all, I have a feeling I’m being stupid, but I am at a loss figuring out how fangraphs calculates the “fielding” component of fWAR.

The original write up states that it’s UZR, which was replaced with OAA in 2022. If I look at lindor though for instance, his OAA is 16 and his FRV is 12 (this matches the statcast leaderboard). Somehow though this gets to 10.8 runs in the actual fielding component of his WAR. What’s that -1.2 runs?

2 Comments
2024/10/30
23:57 UTC

3

Is there a site or database that has biographical data like height and weight by season? I'm trying to use this for a statistics project

So my current plan is to analyze BMI as an indicator of performance and also weight and height individually, but it seems like I can only get either the current or last updated biographical data. Is there anywhere that has records by the season? Baseball reference mentions only maintaining data since 2012, but I can't seem to find historical biographical data.

3 Comments
2024/10/30
00:45 UTC

8

wOBA calculation question

hey, managed to calculate the RE24 table and about to implement calculating wOBA for my project, but one thing doesn't really check out in my head.

Let's say that the bases are loaded with 0 out, and that the RE24 entry for that state is 2.2

the batter hits a grand slam. this counts as 4 runs

bases are now clear with 0 out, the RE24 entry is 0.5

thus, to capture the run value of that particular grand slam, does it add up to 4+(0.5-2.2)=2.3?

8 Comments
2024/10/28
19:06 UTC

3

Calculating players with gaps between appearances of at least five years.

I am working on a SABR BioProject for a player who had a six-year gap between appearances. I would like to know how rare it is to have a gap of at least five years between appearances, post-1980. Does anyone know if this report could be run on Retrosheet or Stathead?

2 Comments
2024/10/26
17:00 UTC

9

Mass downloading data from baseball savant for ML project

Hi everyone, I’m currently a statistics masters student and for my final project this quarter I’m planning on doing an ML project using pose estimation and other contextual data to predict risk of TJ surgery/ UCL injury. I know that baseball savant has video data of every pitch thrown on their website and I’ve been manually downloading videos so far. Recently however I met with my project mentor and he’s worried I won’t be able to create a large enough dataset given the time and so I wanted to ask if there’s anyway to mass download videos of pitches for certain players in certain time frames. Ive done some digging and can’t find a good way so wanted to reach out to this community and see if there were any ideas. I also want to make sure I don’t run afoul of MLBs policies when doing this so please let me know if there’s considerations there as well. Appreciate any help or advice, thanks!

17 Comments
2024/10/25
19:52 UTC

5

What is the IP equivalent to 650 PA?

I don’t know if this is much of a sabermetrics question but I can’t seem to find the answer anywhere

15 Comments
2024/10/24
12:59 UTC

8

A quick look at the payrolls and revenues of past World Series winners

https://preview.redd.it/i76kqw80hfwd1.png?width=1452&format=png&auto=webp&s=1f3bd13ff361cf420149bd81f7d992a513eb935d

With team finance talks surfacing in light of the upcoming Yankees-Dodgers Fall Classic, I figured I would look at past World Series winners' spending habits.

Explanation

The two dimensions of this graph are Payroll+ (x-axis) and Revenue+ (y-axis). Opening day payroll data are widely available (I gathered them from here). Revenue data were estimated based on information from here, which is why I've only gone back to 2003. I've used the "plus" version of each to indicate how they relate to league average. If you're familiar with how stats like wRC+ and ERA+ work, this is the same concept: League average is fixed to 100. So if a team's Payroll+ is 120 for example, that means their payroll was 20% higher than the average team's that season.

Key Takeaways

The clearest conclusion to draw from this graph is how positively correlated payroll and revenue are. This is no surprise, as teams that make more money will have more money to spend on players and win more games. But let's look at the interesting data points:

  • 2003 Florida Marlins: The biggest financial underdog to win the World Series in this time frame, the Marlins were the only team to rank substantially below average in both revenue and payroll (they were bottom third that year). Interestingly, their revenue was pretty much commensurate with their payroll, so it's not like they relatively overspent to contend. Had they fallen short, the Yankees would've snagged yet another title. Speaking of...
  • 2009 New York Yankees: The only World Series winner in this time frame to sport an opening day payroll over twice as large as league average. And hey, they only moderately overspent relative to their revenue, so why not? Just as interesting is the fact that they only won it once despite being top 2 in payroll for all but four of these years.
  • Despite most World Series winners being above average in both payroll and revenue, a little over half of them were within 25% of the average in both. The remaining teams tended to be the big market heavy hitters (Yankees, Dodgers, Red Sox x4). The way World Series champions are determined simply won't allow those large markets to win all the time.
  • The average World Series winner throughout this time period spent 29% more than average on payroll and earned 22% more than average in revenue. The payroll difference being a little larger than the revenue difference tells us that World Series winners have overspent relative to their revenue more often than not. This is also usually what fans want (especially fans of non-big markets that know not to expect extravagant revenues).
    • The most obvious example of this is the Mets, with Cohen spending on payroll with reckless abandon recently--something I'd imagine not many of their fans are unhappy about. If the Mets win a World Series soon, I would anticipate their data point being far closer to the bottom right of this graph than everyone else's. The teams on the opposite end of this spectrum are usually those with owners often derided for being cheap.
  • The World Series winner that overspent the most relative to their revenue was the 2019 Washington Nationals (though that trend has since reversed to how it was for them ~15 years ago). They were the only winner with a Payroll+ above 125 that brought in below-average revenue. Those who also overspent relative to revenue were last year's Rangers and most of those Red Sox teams.
  • The World Series winner that underspent the most relative to their revenue was the 2021 Atlanta Braves. They were the only winner with a Revenue+ above 125 and a Payroll+ below 125, so perhaps they deserve credit for having been such a well-oiled machine. They still had an above-average payroll though, unlike the 2016 Cubs and 2017 Astros, who were also relative underspenders (I wonder why it worked out so well for Houston that year). The Giants of 2010 and 2014 were the other significant relative underspenders, though not their 2012 run oddly enough.

Conclusion

Whoever wins the World Series this year will find their data point on this graph closer to the top right than most. However, that doesn't mean such a guarantee can or should be expected most of the time.

I hope folks find this interesting!

0 Comments
2024/10/23
16:05 UTC

2

Minor League Statcast Pitch Type Classification

Does anyone know if there is a program to more accurately classify AAA and low A pitch type data than the one that currently exists.

1 Comment
2024/10/18
18:29 UTC

1

Minor League Batting+Pitching Data

I'm working on comparing performance at Rookie, A, and A+ ball for players drafted out of various NCAA leagues, but am having a hard time finding minor league batting and pitching data all in the same place. I really don't want to have to spend countless hours gathering data piece-by-piece, and if there's a place I can find it for free, that would be much better.

Any suggestions?

4 Comments
2024/10/17
19:39 UTC

2

Why is BsR not correct (?) on Fangraphs?

By FG's library, BsR = wSB + wGDP + UBR.

But if I look at the leaderboard on FanGraphs and do the sum, BsR is never equal to it. What am I doing wrong?

Example below

https://preview.redd.it/utol2ggmsxud1.jpg?width=728&format=pjpg&auto=webp&s=bd6b04c367ae8096e6b1fea0601c154501d67712

3 Comments
2024/10/15
15:14 UTC

19

The Baseball Cube Data Store

I suppose I'm the dummy from purchasing data from here, but I have to say that this site does a REALLY poor job.

First, I'll give him his props for putting college baseball data all in the same place. Thanks!

Aside from that, nothing else deserves any commendation. I'll list my grievances here:

  1. The item descriptions are misleading - I purchased an item called "College Stats - All", which claimed to have all available college data from all divisions and leagues on site. This turned out to be a complete lie - I was only given the data from 2017 to the present, even though he had more data available. I was able to get this data, but only by purchasing one of the other NCAA data items. I'll assume, charitably, that I was supposed to assume that the "College Stats - All" data was incomplete, but I don't think I should have to.

  2. Communication was painfully slow - When I purchased the data, I got it the next day, as I was expecting. But I could only get about one message per day with him when I was trying to coordinate getting the rest of the data. This cost me a couple of days of work. Not ideal.

  3. The data I received is a COMPLETE MESS - There are so many problems with the data I got:

a) The column names are inconsistent across sheets, and even when they are consistent, the names are not conventional. Some were formatted word1word2, some Word1Word2, others Word1word2, and some word1Word2. Like seriously. Pick a style.

b) Thousands of observations in the sheet had values shifted from one column into the wrong column. I had to delete these from the data altogether. Bad for the stability of my models.

c) Some of the observations were not ASCII encoded, which was a real hassle to deal with.

d) Some of the observations had spaces in the front, which is easy to fix, but still really annoying.

e) Some of the conferences had the same name with different capitalizations (i.e "ColoJr" vs "ColoJR", which took nearly an hour to identify and fix.

f) Some of the NCJAA teams shifted back and forth between being identified in their conference (i.e Mon-Dak conference) and their region (NJCAA Region 13/9). This will take me hours to fix when I finally get to it.

I purchased this data because I wanted to save myself some time. I didn't end up saving that much time, thanks to poor encoding and data reporting practices. I understand that not everyone can be as based as Sean Lahman, but there are basic standards of conduct that should be upheld, especially when you're selling the data to other people for money. I was really disappointed in the service and products I received from The Baseball Cube. I extend a warning to others who may be interested in their products or services.

2 Comments
2024/10/14
19:04 UTC

4

Ideas for creating a postgame pitch report dashboard to track starting pitcher performance?

I’m learning to use the MLB Stats API to track the Padres performance.

I’m curious to see if any insight can be made on why Cease struggled in his two starts against LA.

I made a couple posts about pitch breakdowns- could definitely look at a lot more data!

https://www.reddit.com/r/Padres/comments/1g02r5h/dylan_ceases_pitch_breakdown_from_nlds_game_1_im/

https://www.reddit.com/r/Padres/comments/1g1e1dj/darvish_pitch_breakdown_from_nlds_game_2/

0 Comments
2024/10/11
16:27 UTC

3

About pitch counts for starters in the playoffs -- anyone know of any specific research or analysis? EDIT: any *good* research or analysis?

Anyone have any thoughts on how long of a leash Cobb is likely to have today? Either in terms of number of pitches or if he starts to look shaky? So far this playoffs Cleveland has limited their starters to mid-70 pitch counts, but that is a sample size of just two games; is it fair to expect the same from Cobb?

In fact, more generally, does anyone know of anywhere or anyone who has done any kind of analysis on the length of outings or pitch count limits on starting pitchers in playoff situations vs in the regular season? I get the general feeling that pitchers tend to have shorter leashes (maybe on avg like 10 pitches less than what is typical for them, but that is just a random non-scientific observation), but i would love to know if anyone has done any specific work on this?

3 Comments
2024/10/09
18:22 UTC

34

Baseball Mini-Game using MLBAPI Play by Play Data using Python

https://reddit.com/link/1fzgxpd/video/y3xz97qjzktd1/player

Check out this mini-game I made using play-by-play data from the MLB API.

https://www.moonshotbaseball.io/dugout

You start with a randomly generated lineup of 9 batters, and then you hit through that lineup trying to score as many runs as you can score before all 9 batters get out.

Each play outcome is a randomly selected real life play from that batterover the last 3 years where the base runner situation matches the state of your game, so whatever happens to the batter and runners in the video shown, is what happens to your batter and the runners on base in your game!

1 Comment
2024/10/09
02:09 UTC

3

Thought of an interesting metric

New here. So this thought came to me earlier this morning. I was reading a few articles about the postseason games this past weekend, and one word kept coming up: clutch. Apparently there's no definitive way to measure a player's clutch ability (or so I read). But I may have thought of one, if it's not already in existence. Basically, any time a player gets an RBI whenever their team is either tied or trailing, they earn "1" clutch factor (CF). Crude I know, but I can't think of any other way to describe or name it. Does something like this exist? What is everyone's thoughts on this metric?

13 Comments
2024/10/07
17:39 UTC

Back To Top