Skip to content
/ k-pred Public

R script to predict the probability of MLB starting pitcher strikeout totals based on past performance data.

Notifications You must be signed in to change notification settings

letta-9/k-pred

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 

Repository files navigation

kPred

This R script simulates the strikeout totals of MLB starting pitchers based on the K% of the starting pitcher and the K% of each batter in the starting lineup. Beacuse batters and pitchers have differnt strikeout numbers vs lefties and righties, 2021 L/R K% splits are used in calculations. The script simulates a game by interating through the lineup determining if each outcome resulted in a strikeout. K totals are summed and the process is simulated 1000x. A histogram is produced to show the distribution of the outcomes as well as the mean of the data. User can manually input data from any starting pitcher and any lineup in the .csv files for full customization. Rich Hill of the Boston Red Sox vs the Minnesota Twins is used as an example.

About

R script to predict the probability of MLB starting pitcher strikeout totals based on past performance data.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published