9758

Baseball without Swings

Consider a game modeled after American baseball that involves a "state" that will be altered in a complex way by a sequence of "pitches" that are randomly either a "strike" or a "ball" according to a user-specified ratio. The "state" of the game is an inning integer, an out integer, a run integer, a "line score" substate, a count substate, or a three-element base occupation substate. At the start of the game, the state is {1,0,0,{},{0,0},{False,False,False}}.
After each pitch, one examines and modifies the state of the game. In Stage 1 of this examination, when a strike is encountered, the second element of the count substate is incremented. When a ball is encountered, the first element of the count substate is incremented. The state is then examined. If the second element of the count is equal to a user-specified value (traditionally 3), the out component of the state is incremented and the count substate is reset to {0,0}. If the first element of the count is equal to a user-specified value (traditionally 4), the count substate is reset to {0,0} and the base occupation substate is examined and potentially modified. If the base occupation substate is {True,True,True}, then the run component of the state is incremented; otherwise, the base occupation substate is rotated to the right and the first element replaced by True.
In Stage 2 of this examination, one examines the out component of the state. If it is equal to a user-specified value, one increments the inning, appends the current run state to the line score substate, resets the runs component to 0, and resets the out component to 0.
One continues this process until the inning component of the state is greater than a user-specified value.
This Demonstration outputs numerous statistics relating to the game created by this process. It outputs a "line score", a grid showing 11 elements of the simulated game, including the estimated "winning percentages" for each team, and an estimated game time. Exploring the controls shows that small changes in the percentage of strikes thrown or in the rules governing the progress of the game can have a dramatic effect on the outcome.

THINGS TO TRY

SNAPSHOTS

  • [Snapshot]
  • [Snapshot]
  • [Snapshot]

DETAILS

This Demonstration is inspired by watching numerous Little League games and wondering how the team at bat would do if the batters were instructed never to swing at the ball.
There are a number of simplifications made in this simulation, including (1) the absence of batters gaining first base through being hit by a pitch and (2) the absence of stolen bases.
In the major leagues in the United States, approximately 62% of pitches would be strikes if not swung at.
The estimated winning percentage is computed through a bootstrap method in which two arrays (of user-determined dimensions) of random choices are drawn from the line score of the game. One array is for the visiting team and one array is for the home team. Each row of the array is then tallied to determine a final score for each team. The results are then compared game by game to calculate a winning percentage. Ties are discarded. To increase the accuracy of this method, increase the number of innings per game.
The estimated game time is computed as the sum for each team of the number of pitches multiplied by the time between pitches plus the inning change time multiplied by one minus the number of (half) innings.
This Demonstration could be used to optimize rules for baseball that varied depending on the expected skill levels of pitchers in throwing strikes. One could, for example, alter the number of balls per walk, strikes per game, or outs per inning that, for a given expected level of success of pitchers in throwing strikes, would result in traditional scores while permitting the game to move along swiftly.
    • Share:

Embed Interactive Demonstration New!

Just copy and paste this snippet of JavaScript code into your website or blog to put the live Demonstration on your site. More details »

Files require Wolfram CDF Player or Mathematica.









 
RELATED RESOURCES
Mathematica »
The #1 tool for creating Demonstrations
and anything technical.
Wolfram|Alpha »
Explore anything with the first
computational knowledge engine.
MathWorld »
The web's most extensive
mathematics resource.
Course Assistant Apps »
An app for every course—
right in the palm of your hand.
Wolfram Blog »
Read our views on math,
science, and technology.
Computable Document Format »
The format that makes Demonstrations
(and any information) easy to share and
interact with.
STEM Initiative »
Programs & resources for
educators, schools & students.
Computerbasedmath.org »
Join the initiative for modernizing
math education.
Step-by-step Solutions »
Walk through homework problems one step at a time, with hints to help along the way.
Wolfram Problem Generator »
Unlimited random practice problems and answers with built-in Step-by-step solutions. Practice online or make a printable study sheet.
Wolfram Language »
Knowledge-based programming for everyone.
Powered by Wolfram Mathematica © 2014 Wolfram Demonstrations Project & Contributors  |  Terms of Use  |  Privacy Policy  |  RSS Give us your feedback
Note: To run this Demonstration you need Mathematica 7+ or the free Mathematica Player 7EX
Download or upgrade to Mathematica Player 7EX
I already have Mathematica Player or Mathematica 7+