# The Simulation Part 5

This post will continue to explain how this simulation works.  There are no magic bullets in handicapping and this model only looks at a subset of information.  It doesn’t take into account weather, traveling schedules, righty/lefty matchups, etc. etc.

The premise of these simulations is by looking at similar historical matchups we can better understand similar matchups for future events.

The generated probabilities are based upon player value assigned by this data model which is solely based upon run production.  Defensive stats are very subjective and are not part of this model. This model counts runs scored, runs scored against, assigns them to players, and converts that into a W-L number.  Every run is accounted for and in the end, all numbers must match.  The sum of players on a team must equal the team numbers.

Defense is very important but it involves imaginary runs; runs that should have scored but didn’t due to above average defense, and runs scored but shouldn’t have due to sub par defense.  None of these runs are counted in box scores.  This model counts errors on a team level which are measured by an official score keeper.  We know with 100% certainty how many unearned runs a team let’s up.  Making errors is bad defense so we know teams who suffer.

There are stats that attempt to measure defensive ability but hat is a completely separate measure that cannot be integrated into this WAA measure.  WAR integrates defensive stats  which is why WAR has flaws.  It is how Darwin Barney got ranked part of the top 50 players with WAR in 2012 where this model had him in the bottom 200 based upon his hitting.  There is no way whatsoever fielding can make up for that — especially on a team that lost 101 games with a team WAA = -40.  Losing is a team effort.

Results from this simulation should be used as a lens into the past to clearly see strength and weakness between two teams.  Lineups and Relief are groups of players, a starter is a single player.  These get matched up as follows:

• AWAY Lineup –> HOME Starter
• AWAY Lineup –> HOME Relief
• HOME Lineup –> AWAY Starter
• Home Lineup –> AWAY Relief

Lineups don’t face other lineups, they face pitching just like starters don’t face other starters either.  Games are usually framed by the two starters listed prominently in game promos.   Strength of lineups and relief are not.   This model breaks down all three aspects of each team.

Each of the above 4 bullet items ( Tier Combos ) generates an integer from +6 to -6 with reference to a lineup.  The best lineup facing the worst pitcher would be +6.  Worst lineup facing best pitcher would be -6.

There are around 100K games since 1970.   A snapshot of every player, every team, every relief squad, and every lineup is measured at the beginning of each day.  Tier Combos get assigned and we count how many runs each lineup scored that day.  That gets pushed into a distribution based upon its Tier Combo integer.

Let’s look at today’s CHN game with SEA.
``` processing CHN_SEA_05_01_6:40_PM -1 2 1 1 processing CHN_SEA_05_01_6:40_PM 25622 177168 24769 208265 ```
The above processing records show -1 2 1 1 representing the 4 Tier Combos described in the above bullet list.  First number, -1 , means AWAY Lineup (Cubs) one tier worse than HOME Starter.  but two tiers better than HOME Relief, second number, +2.

Seattle has an exceptional top top tier lineup but Jon Lester is pitching today and he’s having another decent season so SEA lineup is only 1 tier above Lester and one tier above CHN Relief.

Lineups score runs.  How many depends upon the value of pitching they face.  The next 4 numbers shows how many games are in the distribution for lineup –> starter combos, how many innings are in the distribution for lineup –> relief combos.  The -1 lineup –> starter was seen in 25622 instances since 1970.  There are 100K games and two lineup –> starter combos per game.  Thus 25K represents around 1/8 or 12% of total instances.

The number of instances drop off as the difference in talent increases.  For example, a +6 Tier Combo pitting the best lineup against the worst pitcher only has around 2K instances to draw from in its distribution.

The simulator runs 1 million iterations randomly grabbing runs scored from whatever distribution for lineups against starter, lineups against relief, home and away, counts who wins and loses, and in the end calculates a Win%.  This uses  historical games that actually happened in real life.

A lineup –> starter combo lookup returns a number of runs and how many innings pitched for a starter.  Better starters will pitch longer and use less relief, vice versa for worse starters.  Lineup –> relief returns number of runs/inning.   That number will be low for bad lineups against good relief, high for the opposite.

The foundation for everything above is the WAA value generated for players by this data model.  In Part 6 we’ll go over more examples using current game data.  Right now a rudimentary prototype page showing all current games is up here.  Still learning HTML5 and javascript.   We’ll step through in more detail with examples what those numbers mean.  Even though you may not agree with the EV value calculated on the differences between Vegas and TC SIm, probabilities the underlying L, S, R info is a valid representation of that team at that moment in time.

There are some issues however and those will be discussed in subsequent parts to this series.  That is all for now.  Until then ….