In 2012 and 2013, there were 10 teams in the MLB playoffs: the six
teams that had the most wins in each baseball division, and four “wild
card” teams. The playoffs start between the four wild card teams - the
two teams that win proceed in the playoffs (8 teams remaining). Then,
these teams are paired off and play a series of games. The four teams
that win are then paired and play to determine who will play in the
World Series. We can assign rankings to 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)
Wins2012 = c(94,88,95,88,93,94,98,97,93,94)
Wins2013 = c(97,97,92,93,92,96,94,96,92,90)
#Exercise 1 What is the correlation between teamRank and
wins2012?
cor(TeamRank, Wins2012)
round(cor(TeamRank, Wins2012),3)
#Exercise 2 What is the correlation between teamRank and
wins2013?
cor(TeamRank, Wins2013)
round(cor(TeamRank,Wins2013), 3)
LS0tCnRpdGxlOiAiSW4gQ2xhc3MgQWN0aXZpdHkgMTAiCm91dHB1dDogaHRtbF9ub3RlYm9vawotLS0KCgpJbiAyMDEyIGFuZCAyMDEzLCB0aGVyZSB3ZXJlIDEwIHRlYW1zIGluIHRoZSBNTEIgcGxheW9mZnM6IHRoZSBzaXggdGVhbXMgdGhhdCBoYWQgdGhlIG1vc3Qgd2lucyBpbiBlYWNoIGJhc2ViYWxsIGRpdmlzaW9uLCBhbmQgZm91ciDigJx3aWxkIGNhcmTigJ0gdGVhbXMuIFRoZSBwbGF5b2ZmcyBzdGFydCBiZXR3ZWVuIHRoZSBmb3VyIHdpbGQgY2FyZCB0ZWFtcyAtIHRoZSB0d28gdGVhbXMgdGhhdCB3aW4gcHJvY2VlZCBpbiB0aGUgcGxheW9mZnMgKDggdGVhbXMgcmVtYWluaW5nKS4gVGhlbiwgdGhlc2UgdGVhbXMgYXJlIHBhaXJlZCBvZmYgYW5kIHBsYXkgYSBzZXJpZXMgb2YgZ2FtZXMuIFRoZSBmb3VyIHRlYW1zIHRoY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