Monday, June 20, 2016

Who Would Win If The Team Names Were Taken Literally?

What would happen if there were battles between the teams in the MLB if their names were taken literally? Which team would come out on top? Lets find out.

To set up the match ups, we're going to set up the American League and National League where the team with the best record plays the team with the worst record, the team with the second best record plays the team with the second worst record, and so on. The team right in the middle gets a by, because no one noticed them.

American League

Rangers vs Twins
Orioles vs Athletics
Red Sox vs Angels
Blue Jays vs Rays
Indians vs White Sox
Royals vs Astros
Mariners vs Yankees
Tigers get a by

National League

Cubs vs Braves
Giants vs Reds
Nationals vs Padres
Dodgers vs Phillies
Marlins vs Brewers
Mets vs DBacks
Cardinals vs Rockies
Pirates get a by



Round 1:

AL:

The Rangers easily handle the Twins as they are outnumbered and clearly out skilled in combat.

The Orioles stand no match for the country's top athletes the Athletics. The birds had no way of completing a strong attack.

A pair of Red Sox couldn't stop the Angels as they just sat in the clouds and watched the sox tumble in the drier.

The Blue Jays were flying around for days trying to find the Rays but were drastically unsuccessful. Maybe if they were still the Devil Rays it would have been a different story.

Much like the Red Sox the White Sox stood no chance to the Indians. Who have are some of the best in combat in the MLB.

No matter how royal they may be, the Royals could not compete with the technology that the Astros had on their side.

The Mariners made quick work of the Yankees would continued to attempt to swim to their boats, but their wallets kept dragging them down.

NL:

A group of baby bears were not able to fend off the Braves things may have been different if they had help from their football companions, the Bears.

The Giants had an easy time seeing the Reds in the fields and easily stomped them out.

Although the Nationals took a lot of pride in their country, but it wasn't enough, the Padres had the lord on their side. The Nationals were all struck by lightning.

Although people from Philadelphia can get very violent, the Dodgers just jumped out of the way, the Phillies eventually got frustrated and began fighting each other.

The Marlins were ready to fight, but the Brewers never showed up. When investing what happened, an associate of the MLB found them all passed out drunk in the brewery.

The Metropolitans (Mets) were really confusing the Diamondbacks early by taking the subway, but eventually the Dbacks found them injected their venom into the Mets.

It was taking millions of years for the Rockies to move so this round is going to the Cardinals.

Round 2:


AL: 

Rangers vs Athletics
Angels vs Rays
Indians vs Astros
Mariners vs Tigers

They were able to beat the Orioles with their amazing athleticism but the Rangers use their weapons to take out the Athletics in round 2.

The Rays are unable to use their ultraviolet radiation to cause long term damage to the Angels. The Angels move on to the next round.

Once again the Indians put up a great fight, but the Astros technology is too complex and blew away the tribe.

The Tigers were swimming to the Mariners boats not giving up and leaping aboard. It looked like something out of the Life of Pi. The Tigers beat the Mariners and ate all their fish.

NL:

Braves vs Giants
Padres vs Dodgers
Marlins vs DBacks
Cardinals vs Pirates

With dozens of arrows in their legs the Giants stopped playing games and grow frustrated with the Braves and just stomped them out like they did the Reds.

The Padres had the lord on their side in the first round but the Dodgers could not be hit. The lord eventually had better things to do and the Padres went down.

Did you know that Diamondbacks could swim? That must be why they have a pool in their park. Well they jumped in the water and injected venom into all the Marlins.

The pirate's life was not for the Cardinals as they went out to sea and the Pirates swiped them down with their swords one by one.

Round 3:

AL:

Rangers vs Angels
Astros vs Tigers

The Angels got this far without ever having to fight, but the Rangers were not the most religious people and didn't believe they were real. The Angels never showed up.

The Astros have made it this far with their technology, but the Tigers have found their way into the control area. They take out the engineers behind the controls.

NL:

Giants vs Dodgers
Diamondbacks vs Pirates

The Giants were too big for the Dodgers to dodge this time around. The Giants take the NL West rivalry once again.

The Pirates already having scurvy and drunk from all the rum they have been drinking after the victory over the Cardinals get injected with the Diamondback's venom and go quickly.

Round 4:

AL:

Rangers vs Tigers

The Rangers on their horses cannot outrun the Tigers. Their guns nearly out of ammo, and the Tigers to agile to hit. The Tigers take down the Rangers.

NL:

Giants vs Diamondbacks

Even with all the venom in the Diamondbacks combined the Giants are just too big to be affected by the venom. The Dbacks are very agile and avoid being stomped out for a very long time. This series went all the way to game seven, but the Giants find themselves victorious.

Final Round: 

Giants vs Tigers


The Tigers are hungry for blood and the Giants have a lot of it. Quickly avoiding attacks by the Giants, the Tigers are getting tired. Much like the 2012 World Series the Giants easily stomp out the Tigers and are victorious with their pure size and strength.






Thursday, May 19, 2016

The Statistical Theory Behind the Shift

The Cardinals Executing the Shift
For years now Major League teams have been implementing "The Shift". The shift is a strategic re-positioning of fielders according to where a batter hits the ball most often. A shift for a left handed hitter will traditionally have the short stop play right up the middle, the second baseman play about two-thirds of the way between first and second base, the first baseman close to the line, and the third baseman play in shallow right field, with all the outfielders shading toward right field.



Why do teams shift?

Through years of compiling detailed data about players' batted balls teams were able to come to the conclusion that the traditional positioning of fielders may be inefficient for certain players. These teams observed that some players hit to one particular field more than others. The mistake that teams were making for decades was assuming a uniform distribution of hits. This means that team was assuming that when a player hit a ball, that ball had an equal probability of landing anywhere on the field. When teams discovered that the hitting distribution was not uniform, and in fact skewed, they adjusted their fielders accordingly.

The Mathematics Behind The Shift

Through any analytical process there are always numbers backing up the claim. In fact not many people will accept you claim with out any mathematical or statistical backing. The mathematics that support the shift is something called the sum of squares residuals. A residual is the difference between an observed value and the expected value. For example Derek Jeter's career batting average before his last season was .312. So the expected value for his batting average in his last season was .312. He ended up hitting for a batting average of .256 in his final season, so the residual would be (.256 - .312) which equals -0.056. For predictive models you want to minimize the sum of squares residuals, if your sum of squares residuals is equal to zero, the predictive model would be the most efficient.  By predicting where the ball may land, the shift will minimize the distance a player will have to run to get the ball. In this case the observed value is the distance a player will have to run, and the expected value is zero. The claim is that by shifting the sum of the distance needed to be covered by a fielder is minimized.

Example of the Effectiveness of The Shift

Lets compare two players, Jacoby Ellsbury and Chris Davis in 2015. Jacoby Ellsbury had a hit distribution that was close to uniform. He hit to right field at a rate of 37.8%, to center field at a rate of 35.1%, and to left field at a rate of 27.0%. Teams typically play Ellbsury straight up, the traditional positioning of the fielders. A uniform hit distribution would have about 33.3% to all fields, so you can see that Ellsbury's hit distribution is a bit skewed. So in theory a defense should shift slightly toward right field for Ellsbury. Chris Davis on the other hand hit to right field at a rate of 55.9%, center field at a rate of 26.5%, and to left field at a rate of 17.6%. Davis' hit distribution is very skewed to right field. So theoretically you would want to position your players closer to right field than the traditional way.

The Shift: Visual Example

For this example imagine a left handed pull hitter, such as Chris Davis. The first diagram is a traditional positioning for a defense and on the second diagram is the shifted positioning for a defense. The red dots are where a ball landed and the black lines are the distance the fielder had to run to get the ball.

Notice that the distances the fielders had to run are 10 ft, 5 ft, and 15 ft. The expected value that the fielders had to run was 0 ft. So the residuals would be:
10 - 0 = 10
5 - 0 = 5
15 -0 = 15
And the sum of these values squared is:
10^2 + 5^2 + 15^2 = 350.




In this diagram the red dot are in the exact same location, but the defense is shifted toward right field. Notice that the distance the fielders had to run is much smaller. The residuals would be:
10 - 0 = 10
2 - 0 = 2
1- 0 = 1
And the sum of these values squared is:
10^2 + 2^2 + 1^2 = 105

The sum of squared residuals is much smaller for the shifted defense than it is for the traditional defense.


Conclusions 

The shift is here to stay. Physically players hit the ball the furthest when they pull the ball, so a big guy like Chris Davis will try to pull the ball to try to hit a home run. This trade off is something that Davis can live with a player. Since 2012 Chris Davis has averaged 40 home runs per season, but has only a .256 batting average. He has made a decision as a player that he would rather produce power numbers rather than hitting safely more often. There are situations that it would make logical sense to hit a ground ball toward the left side of the field for a hit; such as in a close game in the 9th inning, but Davis has the potential to hit the ball out of the ballpark.

Every player in the MLB is different and that calls for a different shift for each player. It is up to the analytic department to keep up on that and determine the best shift for a player and they do that by determining the minimal sum of square residuals.