Thursday, October 27, 2011

Changes in American eating habits from 1980 to 2009

I'm learning the statistical programming language R at the moment. My goal is develop a second career for myself as a statistician for medical studies. In any case one of the practice data sets I've been working with documents the changes in American eating habits since 1980. The data comes from the 2009 Statistical Abstract of the United States.

Sunday, October 16, 2011

What will the Timberwolves look like in 2012

The 2011 NBA Season is passed. Dirk Nowitzki, Tyson Chandler, Jason Kidd, and the Mavericks proved they were the Big 3 and the Dallas Mavericks took home the championship in 2011. The 2012 season is delayed and like all NBA fans I'm eagerly awaiting tipoffs and poster jams, although I also side with what the players are doing. I'd much rather see them getting the money than the Scrooge Mcduck owners. The delay is especially disappointing because the Timberwolves look to be a much different team this year adding Ricky Rubio, Derrick Williams and head coach Rick Adelman. As I don't have anything but speculation to add on when the lockout will end I wanted to look back and ahead and take a look at last year and consider; Was Rambis a bad head coach? How was he bad and how will Rick Adelman be different? Will the 2012 Timberwolves be much better?

Kurt Rambis inherited a very young team constructed by David Kahn. Here are histograms showing the break down of Minnestoa Timberwolves' players Defensive Rating(Left) Offensive Rating(Right) .

Offensive and Defensive Ratings are closely related to points per possession and track how well players generate offense and play defense.

Interestingly the Minnesota Timberwolves team average Defensive Rating was 111 and team Offensive rating was around 106(marked with a X on the chart). Defensively the Timberwolves team defense allowed the rating of the majority of their players. Offensively the wolves scored at a level that only could have been obtained being carried by a minority of the players. This makes sense because when you're on offense your team decides who to go to and shoot the ball, while on defense you don't have this luxury. The other team is going to go to where you are weak(if they are any good). So the question came to me could Kurt Rambis ever have fielded a team with 5 good defenders?

Looking at the answer is no. The Wolves had only 4 players at any given time that posted above average defensive ratings(Darko Milicic, Kevin Love, Corey Brewer, Kosta Koufos) early in the year and Brewer and Koufos were swapped for Anthony Randolph late in the year. So at point guard, small forward and often shooting guard no matter what Kurt Rambis did he'd always be putting a defense with holes on the floor. Often he'd play Corey Brewer at shooting guard to try and compensate but I believe this was a mistake. Why? While I have yet to crunch all the data I have a working idea(based on preliminary data) that it takes 5 to defend and if you can't put out 5 above average defenders on the floor its better to just go with the best offensive player, which brings me to my second point.

I analyzed data from to answer the question: What was most likely to get you the most playing time for the Timberwolves under the Rambis and David Kahn regime? I looked at 9 different stats

  • Offensive Rating(ORtg)
  • Defensive Rating(DRtg)
  • Salary(Sal)
  • Effective Field Goal Percentage(eFG)
  • Total Rebounds(TRB))
  • Assists(AST)
  • Steals(STL)
  • Blocks(BLK)
  • Turnovers(TOV)

I did some fancy stat stuff in R that you can mostly ignore while still understanding the conclusions of the analysis. Basically I found which of these stats mattered in a model where A+B = Minutes Played and A and B were these 9 factors. Ignore everything but the stats with '*'

What most influences minutes played and how(Table 1)

Estimate Std. Error t value Pr(>|t|)
(Intercept) -15894.01 48224.03 -0.330 0.7514
ORtg -18.94 42.75 -0.443 0.6712
DRtg 141.99 415.42 0.342 0.7425
Sal 353.80 140.70 2.515 0.0401 *
eFG. 3494.34 5139.56 0.680 0.5184
TRB. 94.35 169.76 0.556 0.5957
AST. 41.65 34.62 1.203 0.2680
STL. 348.58 890.94 0.391 0.7073
BLK. 67.10 264.96 0.253 0.8073
TOV. -95.24 72.43 -1.315 0.2299

ANOVA-Is the table 1 model reliable? (Table 2)

Response: MP
Df Sum Sq Mean Sq F value Pr(>F)
ORtg 1 3276048 3276048 9.5740 0.01746 *
DRtg 1 223150 223150 0.6521 0.44592
Sal 1 3144386 3144386 9.1892 0.01908 *
eFG. 1 482732 482732 1.4107 0.27367
TRB. 1 4168 4168 0.0122 0.91521
AST. 1 91002 91002 0.2659 0.62195
STL. 1 1033 1033 0.0030 0.95773
BLK. 1 24972 24972 0.0730 0.79484
TOV. 1 591711 591711 1.7292 0.22995
Residuals 7 2395275 342182

Ok, good did you ignore everything but the stats with '*' ? If you didn't let me summarize the tables. The first one says that only one of the 9 factors was likely to get you playing time : Salary. So what that means is that the amount minutes a player played on the Minnesota Timberwolves was mostly influenced by the salary he signed on his contract. This means that the problem with the lineup was either

  • A. Kurt Rambis was unable to bench highly paid players that performed badly
  • B. Kurt Rambis believed the highly paid players played well

All this goes back to a point I'd like to make, setting players salaries(and relative status on the team) is probably more important than having the best coach. Who set the salaries for the Minnesota Timberwolves? Mostly David Kahn but it wasn't all his doing, as many of the contracts were inherited or are set by the rule of the league(like rookie contracts). Kurt Rambis it seems did not have the power to overcome the status of the players that was pre-set. But if you're reading this and think Kurt Rambis has been vindicated as a head coach, you're only partially right. Take a look at the second table. There's a little * next to ORTG which means that it's likely that Offensive Rating in the first table is likely to be an accurate result. Here's where Kurt Rambis vindication goes away: the model says that the higher the offensive rating the LESS likely you were to get minutes on the Timberwolves. Here's my thoughts on why this is.
Rambis came from the Lakers where he was in charge of defense. When he came to the Wolves he had the sense that 'defense' wins(and it can) although in the Wolves case it was impossible to put an above average defense on the floor with the Timberwolves players in 2011. So in the end Rambis appears to be bad at coaching an offense. This was disguised while he was assistant coach with the Lakers because I suspect he had little say on offensive matters. Is Rambis a good defensive coach? Quite possibly, but it's hard to tell with the Timberwolves players. Rambis was fired and the Timberwolves hired veteran coach Rick Adelman.

Rick Adelman comes to the Timberwolves from the Houston Rockets where he led them to a .500 or over records in all his seasons. I asked the same questions about Rick Adelman that I did of Kurt Rambis. What were significant factors in getting you minutes on the Houston Rockets in 2011? Below are the models.Again players are evaluated on

  • Offensive Rating(ORtg)
  • Defensive Rating(DRtg)
  • Salary(Sal)
  • Effective Field Goal Percentage(eFG)
  • Total Rebounds(TRB))
  • Assists(AST)
  • Steals(STL)
  • Blocks(BLK)
  • Turnovers(TOV)

Ignore everything but the stats with '*'

What most influences minutes played and how (Table 3)

Estimate Std. Error t value Pr(>|t|)
(Intercept) 28542.291 34190.417 0.835 0.423
eFG. 2681.085 7133.429 0.376 0.715
TRB. -102.565 120.497 -0.851 0.415
AST. 17.138 39.575 0.433 0.674
STL. -534.994 670.391 -0.798 0.443
BLK. -227.702 256.435 -0.888 0.395
TOV. -77.963 78.400 -0.994 0.343
ORtg 8.044 46.585 0.173 0.866
DRtg -249.472 294.233 -0.848 0.416
SAL 146.081 76.973 1.898 0.087 *
Multiple R-squared: 0.6227, Adjusted R-squared: 0.2832

ANOVA(Table 4)

Response: MP
Df Sum Sq Mean Sq F value Pr(>F)
eFG. 1 3754126 3754126 5.8502 0.03614 *
TRB. 1 1079287 1079287 1.6819 0.22380
AST. 1 75663 75663 0.1179 0.73842
STL. 1 52118 52118 0.0812 0.78147
BLK. 1 2528 2528 0.0039 0.95119
TOV. 1 2188235 2188235 3.4100 0.09457 *
ORtg 1 247285 247285 0.3854 0.54864
DRtg 1 881875 881875 1.3743 0.26825
SAL 1 2311247 2311247 3.6017 0.08693 *
Residuals 10 6417089 641709

Remember, Ignore everything but the stats with a '*' . Ok, so again in table 1 we find that Salary was a significant factor for getting mintues. Although on the Houston Rockets in 2011 Rick Adelman appears a little less likely than Rambis to be bound by salary(.08 vs .04). Moving on to the second table we find some differences of coaching style. Both Effective field goal percentage(eFG) and turnovers were significant factors along with salary in determining playing time. Basically Rick Adelman is more likely to play players with a high shooting percentage and bench players who turn the ball over. So who is likely to benefit from this change of coaching style and whose minutes are most likely to change under Rick Adelman?

The table below ranks the Wolves players according to Adelmans style(based on eFG and low turnovers) and Rambis based on who gets paid the most or is most trumped up by his General Manager(Wes Johnson)

My prediction is the hiring of Rick Adelman bodes well for Martell Webster and Derrick Williams and creates a problem about playing time between Michael Beasley and Derrick Williams. In fact I suspect that a BIG part of the reason Adelman signed with the Minnesota Timberwolves for 2012-2016 seasons was that Houston was really high on Derrick Williams. If you do a search for college players that posted the best NCAA effective field goal percentage with win shares over 8 in the last 10 years here are the top 12 names on the list :

Why did Adelman come to the Timberwolves? The 2012 Timberwovles have 3 of the top 12 players for Adelmans favorite player attribute. I wouldn't be surprised at all if Rick Adelman starts a lineup of Ricky Rubio at point guard, Martell Webster at shooting guard, Michael Beasley at small forward, Derrick Williams at Power Forward, and Kevin Love at Center. What do you think the 2012 Minnesota Timberwolves lineup will be?