R Session

-- read in turnover margin data and compute correlations for 4 years...

> cor(nfl12\$WINS, nfl12\$MARGIN)

[1] 0.6862379

> cor(nfl11\$WINS, nfl11\$MARGIN)

[1] 0.5587683

> cor(nfl10\$WINS, nfl10\$MARGIN)

[1] 0.7114515

> cor(nfl09\$WINS, nfl09\$MARGIN)

[1] 0.6863576

-- calculate mean and deviation for 4 yearly correlation values...

> sd(c(0.6862379, 0.5587683, 0.7114515, 0.6863576))

[1] 0.06898377

> mean(c(0.6862379, 0.5587683, 0.7114515, 0.6863576))

[1] 0.6607038

>

--R code for 2012 win/to-diff correlation...

par(mar = c(5,5,2,5), bg="wheat")

plot(nfl12\$WINS,main="2012 Wins/TO-Diffs",las=1,pch=19,xlab="TEAMS",ylab="WINS",ylim=c(1,15))

lines(nfl12\$WINS, col="black", lty=2, lwd=1)

par(new = TRUE)

plot(nfl12\$MARGIN,col="red",lty=1,axes=FALSE,xlab=NA,ylab=NA,ylim=c(-30,30))

lines(nfl12\$MARGIN, col="red", lwd=2)

axis(side=4, at=c(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30), las=1)

mtext(side=4, line=3, "TURNOVER MARGIN")

abline(h=0, col="blue")

legend("topright",col=c("black","red"),lty=c(2,1),lwd=2,legend=c("win","TO-diff"))

>

--R code for 2011 win/to-diff correlation...

par(mar = c(5,5,2,5), bg="wheat2")

plot(nfl11\$WINS,main="2011 Wins/TO-Diffs",las=1,pch=19,xlab="TEAMS",ylab="WINS",ylim=c(1,15))

lines(nfl11\$WINS, col="black", lty=2, lwd=1)

par(new = TRUE)

plot(nfl11\$MARGIN,col="red",lty=1,axes=FALSE,xlab=NA,ylab=NA,ylim=c(-30,30))

lines(nfl11\$MARGIN, col="red", lwd=2)

axis(side=4, at=c(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30), las=1)

mtext(side=4, line=3, "TURNOVER MARGIN")

abline(h=0, col="blue")

legend("topright",col=c("black","red"),lty=c(2,1),lwd=2,legend=c("win","TO-diff"))

>

--R code for 2010 win/to-diff correlation...

par(mar = c(5,5,2,5), bg="wheat3")

plot(nfl10\$WINS,main="2010 Wins/TO-Diffs",las=1,pch=19,xlab="TEAMS",ylab="WINS",ylim=c(1,15))

lines(nfl10\$WINS, col="black", lty=2, lwd=1)

par(new = TRUE)

plot(nfl10\$MARGIN,col="red",lty=1,axes=FALSE,xlab=NA,ylab=NA,ylim=c(-30,30))

lines(nfl10\$MARGIN, col="red", lwd=2)

axis(side=4, at=c(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30), las=1)

mtext(side=4, line=3, "TURNOVER MARGIN")

abline(h=0, col="blue")

legend("topright",col=c("black","red"),lty=c(2,1),lwd=2,legend=c("win","TO-diff"))

>

--R code for 2009 win/to-diff correlation...

par(mar = c(5,5,2,5), bg="tan")

plot(nfl09\$WINS,main="2009 Wins/TO-Diffs",las=1,pch=19,xlab="TEAMS",ylab="WINS",ylim=c(1,15))

lines(nfl09\$WINS, col="black", lty=2, lwd=1)

par(new = TRUE)

plot(nfl09\$MARGIN,col="red",lty=1,axes=FALSE,xlab=NA,ylab=NA,ylim=c(-30,30))

lines(nfl09\$MARGIN, col="red", lwd=2)

axis(side=4, at=c(-30,-25,-20,-15,-10,-5,0,5,10,15,20,25,30), las=1)

mtext(side=4, line=3, "TURNOVER MARGIN")

abline(h=0, col="blue")

legend("topright",col=c("black","red"),lty=c(2,1),lwd=2,legend=c("win","TO-diff"))