Showing posts with label Math. Show all posts
Showing posts with label Math. Show all posts

Friday, 16 November 2012

Blue Jays 2013 Lineup

With TSN reporting that Melky Cabrera has signed a two year contract with the Blue Jays the 2013 lineup is starting to take shape. Using player statistics from fangraphs over the last three seasons, I'm going to predict the run totals above average for the next season. I used the generated AB for 2013 by Rotochamp's simulation version 2013.03.

Pos Player AB Fielding Batting Rep AB RAR/AB RAR WAR
C JP Arencibia 425
3.1
-13.9
29.8
825
0.0230
9.79
0.98
1B Adam Lind 425
-36.4
-15.6
50.3
1389
-0.0012
-0.52
-0.05
2B Emilio Bonifacio 490
-2.9
14
37.2
989
0.0488
23.93
2.39
3B Brett Lawrie 535
14.6
15.6
23.6
644
0.0835
44.69
4.47
SS Jose Reyes 555
8
57.3
63.5
1742
0.0739
41.04
4.10
RF Jose Bautista 475
-26.4
142.3
57.9
1414
0.1229
58.38
5.84
CF Colby Rasmus 500
-10.1
15.3
56.2
1500
0.0409
20.47
2.05
LF Melky Cabrera 545
-27.4
43.5
57.2
1575
0.0465
25.36
2.54
DH Edwin Encarnacion 515
-38.7
57.6
51.4
1355
0.0804
41.43
4.14
C John Buck 250
21.3
-10.1
45.5
1218
0.0466
11.64
1.16
1B David Cooper 160
-8.3
-0.4
7.5
211
-0.0057
-0.91
-0.09
IF Maicer Izturis 295
4.6
-1.4
35
950
0.0402
11.86
1.19
OF Rajai Davis 270
-27.6
-4
46.2
1292
0.0113
3.05
0.31
IF Mike McCoy 120
10.6
-17.1
12.5
331
0.0181
2.18
0.22

The columns Fielding, Batting, Rep, AB, and RAR/AB are using statistics from 2010 to 2012 provided by Fangraphs. 
The column AB is an exrapolation of 2013 numbers provided by Rotochamp. 
The RAR and WAR columns are calculated using the other columns to predict player output. 
It should also be noted that Encranacion does not have his fielding applied to his total as he is the DH. 

What instantly pops out from the extrapolation are the poor numbers by Adam Lind. Encarnacion would be a big upgrade at first base but his fielding isn't any better than Linds. 






Tuesday, 13 November 2012

Blue Jays Trade

From initial TSN reports this trade looks to be a gigantic get for the Blue Jays. They picked up talented players, some in positions they are already stocked in but they had to pay for it with young players and prospects.

To the Jays
SP - Mark Buehele
SP - Josh Johnson
SS - Jose Reyes
C  - John Buck
CF - Emilio Bonifacio

To the Marlins
SP - Henderson Alvarez
SS - Yunel Escobar
SS - Adeiny Hechavarria
SP - Justin Nicolino
CF - Jake Marisnick
C  - Jeff Mathis

Could the acquisition of John Buck spell the end for JP Arencibia? There is a bit of a logjam at the catcher position with Buck, Arencibia, and hotshot rookie Travis D'arnaud all capable of playing in the major leagues.

The blue jays have a deep prospect pool especially in starting pitchers. The loss of Nicolino hurts but Syndergaard, Sanchez, Osuna and Stroman still combine for one of the most promising stable of starting pitchers in the majors.

Marisnick is a great prospect, ranked the 2nd best prospect in the blue jays system by baseball america, but the jays have two players ahead of him on the depth chart. 25 year old start Colby Rasmus and recent graduate Anthony Gose. With Emilio Bonifacio coming to Toronto in the trade that adds another player who prefers to play CF. Sad to see him go, he is going to be a good if not all star CF but AA is dealing from another position with depth.

Now to the fun part, the math of it all. The easiest comparison is the addition of Jose Reyes and the loss of Yunel Escobar. Escobar over the last 3 years has put up a WAR of 9 and Reyes over the same time period put up a WAR of 9.7. You could say slight advantage Toronto but that doesn't show the whole story. Escobars oWAR is 5.8 while Reyes' is 13.2. Toronto in search of a lead off bat has sacrificed defensive ability at SS in order to add just that.

A blue jays starting 4 of Romero, Morrow, Alvarez, and Hutchinson has been transformed into a starting 4 of Romero, Morrow, Buehrle and Johnson. It's a bit of an upgrade.

The 3 through 6 pitchers on the jays were all average, posting a WAR between 0 and 0.2. Replace two of those with Buehrle who averages 3.5 and Johnson's 3 and you are 6 wins closer to the playoffs. This doesn't include the additional rest that the bullpen will have not having to bailout sub-par starters. Both of these new jay starters have the potential to be all-star calibre and post seasons of 5 or 6 WAR. If Romero returns to form, as he will have a lot less pressure to lead the staff, you could see 4 starting pitchers that could be considered all-stars, and blue jay baseball in October.





Saturday, 10 November 2012

US Supreme Court Openings



With President Obama winning another term there is already talk about his legacy. Now one of the largest parts of a President's legacy is their appointments to the Supreme Court. This got me thinking about the possibility of a retirement; an investigation was required.

There are 103 former Supreme Court justices along with the current 9 justices. I decided to shorten the list by looking only at justices appointed since WW2. There are 20 former justices appointed over this period to analyze.

First there are two ways for a Supreme Court justice seat to open up. A current justice resigning or a current justice dying. Justices dying in office is an unlikely event. Only two justices have died in office both chief justices: Fred M. Vinson and William Rehnquist. Because only 2 of the 20 openings have resulted because of death I feel it appropriate to use age of retirement to calculate openings.

Now the mean age of retirement for justices, that were appointed by Truman onward, is 73.25 with a standard deviation of 9.48. The age at time of death of these former justices, only 17 of died as of the time of writing, is 79.71 with a standard deviation of 8.35.

Looking at the retirement there seemed to be a correlation between age at retirement and year of retirement. After further review there was a modestly strong correlation between the two variables using a 2nd order polynomial.



Using the line of best fit, and its standard deviation, I was able to calculate the probability that each justice will retire in a year. Their age in the table below is on Dec 31, 2012. The percentage under each of the following four years is the probability they will retire based solely on age.

Justice Age2013201420152016
Ruth Bader Ginsburg
79
66.58%70.67%74.54% 78.16%
Anthony Kennedy
76
52.73% 57.28% 61.79% 66.19%
Antonin Scalia
76
52.73% 57.28% 61.79% 66.19%
Stephen Breyer
74
43.19% 47.75% 52.39% 57.05%
Clarence Thomas
64
8.51%
10.45%
12.71%
15.33%
Samuel Alito
62
5.35%
6.73%
8.38%
10.34%
Sonia Sotomayor
58
1.82%
2.40%
3.14%
4.07%
John G. Roberts
57
1.35%
1.80%
2.38%
3.13%
Elena Kagan
52
0.25%
0.35%
0.49%
0.69%

There are four elder justices on the court, two liberal, one staunch conservative and one moderate conservative.

Now obviously this is a rather simplistic way to look at openings. There really isn't a chance that Scalia retires under President Obama. He and Obama are on different sides of the political spectrum. Scalia will only be 80 at the end of Obama's term.

Would Ginsburg risk being replaced by a conservative justice? If so, she might only have 3 years left on the court. There has only been one occurrence of a party holding the presidency for three terms in a row. If she does not retire under Obama she could be 88 or even 92 before she got another chance to retire under a Democratic president.

The next oldest liberal is Breyer at 74 years old. It would be very average to see him retire, fellow liberal Souter retired a few years ago at the age of 70. Breyer would be 78 at the start of the next presidency. If he feels that he has accomplished a lot he could retire and be guaranteed a liberal successor. Otherwise he could continue on and could possibly outlast a two term republican president being 86 years old, 12 years from now.

Kennedy is the trickiest and most important retirement. Kennedy, a moderate conservative, finds himself the swing vote more often than not, and is one of the elder statesmen of the court. If he retires in the next 4 years the court will swing liberal. After that a republican could inhabit the white house and the court would swing even more conservative.


Saturday, 14 April 2012

Toronto Blue Jays & Adjusted Divisions

Toronto plays in a difficult division. Some have referred to the AL East as the toughest division in professional sports. It's lofty praise, but a little hard to deny. Being a fan of Toronto I get what feels like the unique experience of cheering for a good team that has a hard time making the playoffs. Toronto plays 72 games against Boston, Baltimore, Tampa Bay and the Yankees. The table below illustrates the difficult time Toronto has against the AL East versus the rest of the American League.

Against Wins Losses Win %
AL East
33
39
0.4583
Non-Division
40
32
0.5556

I've put in a little bit of time to create a program that would switch Toronto for another team in the American League. A little bit of fun to see how Toronto would do outside of the East. As of this moment I've used the winning percentage between teams while switching schedules between Toronto and each team in the AL (one at time). I might do an update using runs per a game and the Pythagorean Theorem of Baseball to determine wins; it would be more accurate but I felt that increased accuracy in fantasy land wasn't a priority.

Without going to the trouble of Pythagorean Theorems the adjusted wins for switching divisions are in the below tables. The first table is what would happen if Toronto switched with a team in the West. Toronto was quite close to being AL West champions in three of the scenarios. Switching with Oakland produced a three way race for the division. Switching schedules with Seattle produced the worst result, 3rd place 7.5 games back, which is still a huge improvement over 4th place and 14 games back. 

Switched Team Adjusted Wins Place in Div Games Back
LA Angels 86.1222 2nd 3.2111
Oakland 85.5270 3rd 1.2825
Seattle 82.9476 3rd 7.5190
Texas 83.9221 2nd 3.1921

Now we can look at the Central Division. The change you will notice, if you turn your gaze to the table below, is the added column. The Jays come in second place save for the time they win the division. Detroit had a heck of a ball club and it is not a surprise that they win the division each time they are in it. What is a surprise is the complete lack of parity in the Central. The Jays have a sizable lead on 3rd place in four of the scenarios, and the other the Jays have less then 81 wins.

Switched Team Adjusted Wins Place in Div Games Back Games Ahead of 3rd
Chicago WSox 84.5778 2nd 9.7556 4.1413
Cleveland 84.8333 2nd 10.1667 7.8413
Detroit 88.2143 1st (7.1937) 7.5825
Kansas City 86.4270 2nd 9.2397 6.9905
Minnesota 80.8079 2nd 12.8567 2.5937

If the Jays played in the west in 2011 it would have been a dogfight, a battle to the last week to see who could come away with the division. The hypothetical Central would have been a cakewalk for Detroit or the Jays. The 4th place team in the East, would have been a solid 2nd in the Central or in a fight for the division in the West. Oh fantasy land, where dreams come true. 

Friday, 17 February 2012

Rocking Rackets

I recently became interested in watching tennis do to the exploits of Milos Raonic, the phenom out of Canada. Naturally though I wanted to emulate his rise and what better way than through a game. However I found playing tennis to be quite boring as far as video games go. I was about to give up but I stumbled upon Rocking Rackets. This is a simulation of being a tennis agent; you train a few players and register them into tournaments. Following their progress and help shaping it.

As someone you enjoys organisation I took to the game immediately. I developed a strategy I thought could be effective for non-playing members and am now implementing it.

The game has different worlds, servers, that operate on varying speeds. The fastest is 24 game hours being equivalent to 40 minutes in real life. An entire year in the game is then about 10 days in real life. I'm a little impatient and decided this speed suited me best. I signed up on the maximum of two different worlds at this speed.

I have a combined four players, two of which are turning 17 and two turning 16 this year. There are two types of attributes for these players. Ones that are trainable and ones that grow, and fade, naturally as a result of aging. The endowed attributes are strength, speed, mental, endurance, talent and advantage playing in home country. The trainable attributes are skill, serve and doubles.

I went for high strength, speed, mental and talent. Quickly training skill to a reasonable level before I work on serving. I also am playing only on clay courts trying to gain proficiency on the second most numerous court.

I'm trying to build players that will compete for a top 30 spot in their prime, age 25, after which I can retire them to train the second generation of my players.

Also the best part about the game is that playing can take as little as 5 minutes twice a day.


Saturday, 11 February 2012

Lost Socks

I enjoy doing laundry. I find the exercise rather calming. I started doing my own laundry back when I went off to University at the age of 17 years and 9 months. We had washers and dryers, in the basement of our building, that required payment. To minimize the cost of doing laundry I would wait till all my clothing was dirty. This system I devised was simple enough that I've never needed a revision. Something else that has stuck with me from the start is my ability to lose a sock every other time I do laundry. I was wondering the other day how many socks I had indeed lost since I began doing laundry.

As previously mentioned I started doing laundry at the age of 17 years and 9 months and I am currently 23 years and 3 months old. The elapsed time I've been doing laundry is 5 years and 6 months, in weeks this would be 286.

How often have I been doing laundry? This is season dependent, I have a collection of sweaters that are not worn during the summer months. I would guess that the maximum amount of time between doing laundry is 2 weeks during the summer and 4 weeks during the winter. For the ease of argument let us say that I do laundry every 3 weeks.

With the elapsed time of 286 weeks and the averaged time between laundry at 3 weeks I've done laundry roughly 95 times.

I do lose socks at what I feel is an extraordinary rate of once every two times doing laundry. Since socks are usually found in pairs it makes sense to count them as such. Rephrasing my statement to include pairs of socks; I lose a pair of socks every four times doing laundry.

Having done laundry 95 times over the course of my life I've lost roughly 24 pairs of socks. Or about 4 pairs of socks a year.