creating a vector to rank the teams as follows: Rank 1: the team that won the World Series Rank 2: the team that lost the World Series Rank 3: the two teams that lost to the teams in the World Series Rank 4: the four teams that made it past the wild card round, but lost to the above four teams Rank 5: the two teams that lost the wild card round

teamRank = c(1,2,3,3,4,4,4,4,5,5)
teamRank
##  [1] 1 2 3 3 4 4 4 4 5 5

Creating a vector called wins2012 that has the number of wins for the 10 teams in order of rank for 2012

wins2012 = c(94,88,95,88,93,94,98,97,93,94)
wins2012
##  [1] 94 88 95 88 93 94 98 97 93 94

Creating a vector called wins2012 that has the number of wins for the 10 teams in order of rank for 2013

wins2013 = c(97,97,92,93,92,96,94,96,92,90)
wins2013
##  [1] 97 97 92 93 92 96 94 96 92 90

Exercise 1 Finding the correlation between teamRank and wins2012

cor(teamRank, wins2012)
## [1] 0.3477129

Exercise 2 Finding the correlation teamRank and wins2013

cor(teamRank, wins2013)
## [1] -0.6556945

There seems not to have a correlation between regular season wins and winning the playoffs because the correlation for the year 2012 is positive while the one for the year 2013 is negative.