Monte Carlo Baseball Simulator


The Authors have developed a baseball simulator designed to simulate Major League Baseball games based on players’ statistics. By tweaking the settings of the simulator, the user can test different strategies to determine which strategies will lead to the most run production and therefore the most long-term success. 

Problem Addressed

A predictive model of baseball games based on strategy simulations can be an interesting and useful tool for athletes, coaches and educators. There are a few Monte Carlo simulation packages that exist for the purpose of modeling baseball strategy; however, many of these simulations are exceedingly complex and do not provide source code. The Authors’ copyrighted software uses a comparatively very simple approach but faithfully reproduces observed outcomes in MLB games. 

Technical Description

This program runs using MATLAB™. The simulator generates probabilities of given outcomes of certain plays during the course of a baseball game based off true MLB statistics. It then generates random occurrences of each play, thereby simulating what would happen in a real game. The simulator first checks if there was a hit recorded on a play, then either moves the runners up or records an out. After the simulator logs three outs in a given inning, it resets the bases and continues to simulate. The simulator performs this nine times to represent nine innings, then resets the count to zero and begins to simulate a new game. After many games, the predictions will converge to their true expected value at a rate of the square root of the number of games simulated. 


  • Simple but accurate simulation is reliable to model and investigate outcome of various baseball strategies (stolen bases, bunts, etc.) to refine game strategy
  • Simulator can also be used as an educational resource for introductory programming courses