Showing posts with label production. Show all posts
Showing posts with label production. Show all posts

Monday, 25 May 2015

Updated NHL Expected Goals Model


Here is the latest rendition of my Expected Goals model. If you haven't read the original post you probably should read it here before continuing.The only substantial change from the previous version is that this one now includes rush shots. As it has been previously shown that rush shots just by the very fact that they are rush shots result in a higher shooting percentage. My model currently only accounts for 5-on-5 situations and includes a total of five factors:
  • Adjusted Distance
    • The farther a shot the lower likelihood it results in a goal 
  • Type of Shot
    • Snap/Slap/Backhand/Wraparound/etc...
  • Rebound - Yes/No?
    • A rebound is defined as a shot taking place less than 4
  • Score Situation
    • Up a goal/down a goal/tied/etc…
  • Rush Shot - Yes/No?
    • Rush shots have a higher shooting percentage

Results

Same sort of graphs below as in the previous post, along with the correlations for each. The ExpGF correlation jumped slightly from 0.58 to 0.61 yet the ExpGA correlation stayed consistent at 0.60. That isn't to say adding rush shots didn't effect the model. There is definitely some difference both positive and negative on certain teams, typically within the 10 goal range.



Upcoming


I still plan on adding some aspect of regressed shooter and goaltender talent somehow into the model. I am close to releasing ExpG at the player level, hopefully within the next week. Around the time I am able to incorporate goaltender talent into the model I should also be able to update my xSV% with the shot quality aspects of this model.

Expected Goals


Here are the updated results below. Note that, dGF/dGA/dGF%, are calculated as actual minus expected. Therefore, a positive dGF means that a team scored more goals than the model predicted they would. A positive dGA means that a allowed more goals against than the model would have predicted. I will update this spreadsheet in its own tab at the top of this site too. Please let me know any questions or feedback you might have. Enjoy!



Thursday, 21 May 2015

NHL Expected Goals Model


Did anyone ever consider shot quality? 

UPDATE: This model has since been improved upon and shown here. This post still provides good background on the basics of the model.

Shot quality and possession metrics have always been somewhat a point of contention. Expected Goals (ExpG) helps to combine these two facets in hopes of providing better information about the game. Expected Goals are not a novel concept, ones have been presented previously by Brian Macdonald for hockey and the original motivation for my study by Michael Caley's soccer version. I hope to lay out my ExpG model in a way that makes hockey sense, where everyone can understand why each factor was added into the model. The model works by assigning a value to each shot taken over the course of a season based on the model's predicted probability of that shot resulting in a goal. To calculate a team's final ExpG all you have to do is sum up all of these probabilities and there you have it. First I will breakdown the methodology that goes into this model. If you don't care and just want to see the results skip down to the Expected Goals section or check out the Expected Goals tab above.

Methodology


My model uses a logistic regression to arrive at each goal probability. Basically, it uses a bunch of independent variables to produce the odds of binary outcome occurring, in our case, yes a goal was scored or no a goal wasn't scored. I reran the logistic regression for each season instead of using one big logistic regression. So far my model only accounts for 5-on-5 situations. This helps to account for minor changes in style of league play yet the regression coefficients didn't actually change much year-to-year. Here are the factors taken into account by the model:
  • Adjusted Distance
    • The farther a shot the lower likelihood it results in a goal 
  • Type of Shot
    • Snap/Slap/Backhand/Wraparound/etc...
  • Rebound - Yes/No?
    • A rebound is defined as a shot taking place less than 4
  • Score Situation
    • Up a goal/down a goal/tied/etc…


Results


In the two graphs below you can see how well ExpG, both offensively and defensively, correlates with actual results. Each point represents one team from one season, except 2012-2013 was removed due to the lockout. 



There will always be some outliers in a given season but I think the model goes a relatively good job. The chart below shows that ExpG comes out on top when compared to Corsi and Scoring Chances in terms of correlation to real goals for and against in a given season.


Goals For Goals Against
ExpG 0.58 0.6
Corsi 0.493 0.57
Scoring Chances 0.53 0.562

Future Work


In the next coming weeks I will be focusing my efforts on two different aspects of this model. Firstly, I will investigate how well it predicts future goals, from one season to the next as well as something similar to Micah Blake McCurdy did with score-adjusted Corsi. Secondly, I will be looking at other factors to add into the model. I plan on adding rush shots as a factor, though the current state of my data will require some tweaking before I can do that. I also plan on exploring the effects of incorporating shooter talent and goaltender talent. I also plan on releasing ExpG at the player level and use aspects of this model to better xSV%. 

Expected Goals


I just wanted to thank War-On-Ice and Sam Ventura for the data used in this project. Finally, here are the results below. Note that, dGF/dGA/dGF%, are calculated as actual minus expected. I will give this spreadsheet its own tab at the top of this site too. Please let me know any questions or feedback you might have. Enjoy!



Wednesday, 21 January 2015

Why Some Older Players Decline and Some Don't


"Father time is undefeated" 

Sports are a continuous cycle of torch passing from the old to the young, veterans to rookies. The living embodiment of turning back the clock in the NHL is none other than Jarmoir Jagr. The 42 year old Czech seems to defy all odds and assumptions of how a hockey player is supposed to age. The average player typically peaks around their age 24 season and than can expect to either be out of the league or a major hinderance on their team's performance by about 35. Jagr however has altered his own game to still be an effective player in these later years even when his body won't allow him to play the same style he did in his prime.

Typically in a player's later years they seem to fall into two categories, those who simply aren't good enough to stick in the league and the stars who seem to never age (see. Jagr, Chelios, etc...) This brings me back to considering why some players, and even previous superstars, age more gracefully than others.

I have developed a few test case to in hopes of discovering some noticeable trends. Now let's look at the four subjects I settled on for this test case. All of these are currently older players but I chose two that many would say have aged well (Jaromir Jagr and Joe Thornton) versus two players that have not aged so gracefully (Vincent Lecavalier and Dany Heatley).

Possession


I decided to use dCorsi in this analysis to look at a player's contributions to possession. For those unfamiliar with the stat, they can read up on it more here. It is probably the most accessible and peer reviewed context neutral possession metric available. I prefer to use it in circumstances like this when we are comparing multiple players across various teams and seasons.

Below is a dCorsi aging curve. As you can see there is no clear pattern here that would dictate to us that a player's age has an effect on their dCorsi rating. This actually makes intuitive sense when you consider that dCorsi itself is designed to account for a player's age in the calculation. Also, the age coefficients aren't substantially big when compared to the other regression coefficients so I wouldn't read too much into the dCorsi taking age into account.

Now for the test case subjects, from the graph below you can see that a player's possession skills do not tend to vary with age. Thornton and Jagr have always been above average to great possession players where as Heatley and Lecavalier have more or less never been able to hold their heads above water. (***Remember that Jagr didn't play in the NHL between his age 35 and 39 seasons, so try to ignore that line there).

Production


Next I am going to dive into player production. Each of these player's at one point in their career were excellent goal scorers (save Thornton whose has always identified as more of an elite playmaker). So instead of simply just looking at goals scored I broke it down into two lesser components, how many shots a player takes and what percentage of those end up in the back of the net. 

Below is an aging curve for a player's shooting percentage (try to ignore the tails as I think thats simply just a mistake on my part rather than any relevant information). This aging curve looks very similar to that of dCorsi in the sense that we see little to no evidence of age having a significant effect on shooting percentage. 


Once again lets see if anything can be gleaned from the aging curve and applied to our test subjects. There seems to be a lot of minor variance from season to season but still no real identifiable trend. Thornton and Heatley seem to have shown minor signs of aging but when you consider that they both still convert shots at a higher than rate than NHL average it is hard to argue that age has severely hindered their ability to efficiently convert shots into goals at an effective rate. 
"You miss 100% of the shots you don't take" - Wayne Gretzky

When it comes to goal production the other half of the equation is shot quantity. Typically the more shots a player takes the more goals they score. The aging curve for shots per game really starts to show us the extent that age can have on a player. You can see that a player's shot rate peaks around their age 24 season and then only proceeds to get worse after that.

Some of you might be wondering why shots per game produces such a nice curve when a player could theoretically buck the system by just firing shots to the net at will. That simply isn't practical in a real world sense. While it possible that a player might just fire shots at random, no player simply takes a shot just to take it. Every shot is taken with a specific purpose in mind whether that is to try and score, create a rebound or simply get an offensive zone face-off. Therefore as a player's individual shots decreases we tend to see their specific role and ability to positively contribute to their team's offensive begin to decline.

The controlled study below shows essentially exactly what we would expect to see based on the aging curve above. Each player's individual shooting shows a significant drop off with age. Previous snipers Heatley and Lecavalier see their shot rates plummet. Jagr's rates are not what they were when he was younger and have actually gotten better in recent years which explains his continued ability to contribute positively. Thornton is an interesting case since he has never truly been a shooter at any point in his career, therefore contributions come from his elite playmaking which helps explains his always low shooting rate.

Finally we will look at assists to see how much we can attribute each player's drop off to that of losing a playmaking edge. There seems to be a steady declining pattern here which would make sense considering the rule that player's tend to get worse as they get older. The drop however doesn't appear as drastic as that shown in the Shots/G graph with the aging process having less drastic effect with regards to assists. We also get to see where Joe Thornton retains much of his production value, compared to the rest of the group. 

Conclusion

Projecting player performance is never easy but from this exercise some helpful insights might be gleaned.
  1. Player's possession abilities don't tend to vary much with age. It is the skill that seems to age the best.
  2. Goal scoring will suffer fairly drastically with age.
  3. Assists will age better than goals but still not great. 
Therefore, when signing older forwards it is imperative that their ability to control the ice regardless of their production rates must be taken into account. Possession seems to age the most gracefully and will provide a team with most value once their production seems to run dry. This ideology looks favourably on a player like Marian Hossa who has continuously put up dynamite possession numbers. I would however, preach wariness on an aging player like Martin St. Louis who has never truly been a possession star and sees most of his value come from high production numbers that we should expect to decline sooner rather than later.