NHL

How Important is Thanksgiving in Relation to Making the Playoffs? by Alex Craig

By: Ryan Reid

How early is too early when it comes to getting excited about a player or teams’ success early on in the season? While looking at Mikko Rantanen’s pace through 20 games and assuming he will score 130 points seems a bit ridiculous now (he is currently on pace for just over 100), the fact is that a 20 game sample size for teams as a whole is often very predictive of whether or not they will ultimately make the playoffs. In fact, over the past 5 seasons, 77.5% of teams that found themselves in a playoff position at American Thanksgiving went on to make the playoffs.

Screen Shot 2019-03-05 at 4.27.36 PM.png

Given the high predictability of holding a playoff spot at Thanksgiving, I believed that when other statistics are analyzed, they are likely to provide an even greater ability to predict which teams are playoff teams given various statistics collected at American Thanksgiving each year. 

With the help of machine learning, I hoped to be able to create a model to out predict the strategy of picking current playoff teams.

Process Used

In creating a machine learning model, I wanted to be able to classify whether a team could be best classified as a playoff team or not, given a variety of statistics collected on Thanksgiving. To do so, I used Logistic Regression within machine learning in order to classify and group variables as binary, 1 being a playoff team, and 0 being a non-playoff team. Through examining the past 11 years of team data from Thanksgiving (minus the lockout shortened season for obvious reasons) and classifying each team, I hoped to train my model to be able to accurately classify playoff teams.

Screen Shot 2019-03-05 at 4.33.56 PM.png

Within python I used the numpy, pandas, pickle, and various features within sklearn including RFE (Recursive Feature Elimination) and Logistic Regression packages to create the model. Pandas was used to import and read spreadsheets from within excel. Pickle was used to save my finalized model. Numpy was used in certain fit calculations. RFE was used to eliminate features and assign coefficients to the impact criteria was having on the decision of whether a team made the playoffs. Finally, Logistic Regression was used to assign a predicted shape to the model.

Criteria Valuation             

Starting off with all statistics I could collect for teams at Thanksgiving, I began to weed out less predictive variables until I landed on a group of 8. Using Recursive Feature Elimination (RFE), I was able to continually run the model and see which variables were deemed most predictive and should be included in the model. The factors as listed below were deemed most predictive, in order of importance 
to the model. 

While point percentage is the most predictive, other statistics like shooting percentage, save percentage, or goals for percentage provide a bigger picture perspective that allows for a better predictive capability for the machine learning model.

It has been determined that having higher shots for, shooting percentage, and save percentage all have a negative effect on whether or not you end up making the playoffs. For shooting percentage and save percentage, this is likely due to the fact that the model has identified a PDO like correlation in which teams with a lower save percentage and shooting percentage can be classified as “unlucky” and will eventually regress towards the norm. Additionally, the number of shots a team takes relative to the other team has a negative correlation with making the playoffs. This could be due to score effects that cause losing teams to typically generate more shots that are of lower quality. As the model shows, it is primarily high danger chances that are predictive of making the playoffs, not just any shot.

The Results

Screen Shot 2019-03-05 at 4.39.46 PM.png

Running the model, 81.25% or 13 out of 16 playoff teams in a playoff spot as of March 1stwere correctly classified as playoff teams. Furthermore, an additional 2 teams (Columbus and Colorado) sat only 1 point back of a playoff spot. In contrast, picking the playoff teams at Thanksgiving would only result in a 68.75% success rate or 11 out of 16 teams. Furthermore, 3 teams that were in a playoff position at Thanksgiving are no longer in the playoff race in comparison to only 1 team (Buffalo) predicted by the model. 

Outliers

Particularly interesting decisions made by the machine learning model include the decision to not pick the Rangers to make the playoffs, despite leading the Metro at Thanksgiving, and the choice to select Vegas to make the playoffs despite a slow start.

One reason behind this choice could have been New York’s low number of ROW. With a mere 8 ROW in 22 games, the New York Rangers sat atop the Metropolitan Division mainly in part to their 4-0 record in shootouts. Seeing that the New York Rangers were playing so many close games, the model likely discounted the strength of the Rangers. Additionally, the New York Rangers had the 4thlowest corsi for %, 6thlowest shots for %, 9thlowest scoring chance for %. As for points for %, the Rangers were ranked at an underwhelming 13th in the league, but led the Metro since the Metro was a weak division and the Rangers had more games played. Given the Rangers low valuation across all these supporting criteria, the machine predicted that they would not make the playoffs despite their stronger points for % at Thanksgiving. 

As for the Golden Knights, despite holding the 29thbest point % in the league, Vegas was among the top 4 in the league in shots for %, corsi for % and scoring chances for %. Additionally, Vegas had the league’s lowest PDO (SH% + SV%) at 95.66. Given all these things considered, the model likely believed it was only a matter of time before the Vegas Golden Knights began winning.

Flaws in the Model

While my machine learning model appears to have the ability to out predict the strategy of picking all playoff teams at Thanksgiving, two main limitations of the model as highlighted above is the inability of the machine to pick teams based on the given playoff format, and the lack of data at various game states. 

Unaware of the NHL’s current playoff format, the model picked 9 Eastern Conference teams, and only 7 Western Conference teams. Without a grasp on the alignment of divisions within the league, the model is at a disadvantage when picking teams, particularly when specific divisions or conferences are more “stacked” than others. Therefore, there is the potential of the model picking an otherwise impossible selection of teams to make the playoffs.

Furthermore, data collected to be fed into the model was only even-strength data. While this provides a decent picture of a team’s capability, certain teams that rely on their power play, as the Penguins traditionally have, may be disadvantaged and discounted. Finding a way to incorporate this data into the model would likely provide a fuller picture and a more accurate prediction.

Final Thoughts

While the model I have created is by no means perfect, it provides a unique perspective into not only the importance of the first 20 or so games of the season, but also what statistics beyond wins are important in attempting to classify a playoff team. While the model appears to out predict the strategy of selecting all playoff teams at Thanksgiving, it will be interesting to see in years to come if there is a continued ability to classify playoff teams given Thanksgiving stats.

***All statistics gathered from Natural Stat Trick


Keep up to date with the Queen's Sports Analytics Organization. Like us on Facebook. Follow us on Twitter. For any questions or if you want to get in contact with us, email qsao@clubs.queensu.ca, or send us a message on Facebook.

How Important is Winning a Period in the NHL? by Alex Craig

By: Adam Sigesmund (@Ziggy_14)

Sometimes when I watch hockey on television, the broadcast will display a stat that makes me cringe. One of my (least) favourites is a stat like the one displayed just under the score in the screenshot below:

Picture1.png

Most of us have noticed these stats on broadcasts before. I imagine they are common because they match the game state (i.e. the Leafs are leading after the first period), so broadcasters probably believe we find them insightful. However, we are all smart enough to understand that teams should theoretically have a better record in games that saw them outscore their opponents in the first period. In this case, whatever amount of insight the broadcasters believe they are providing us with is merely an illusion. Perhaps they also saw value in the fact that the Leafs were undefeated in those 13 games, but that is not what I want to focus on today. 

More generally, my primary objective for this post is to shed light on the context behind this type of stat, mostly because broadcasts rarely provide it for us. Ultimately, I will examine 11 seasons worth of data to understand how the outcome of a specific period effects the number of standings points a team should expect to earn in that game. Yes, this means there will be binning*. And yes, I acknowledge that binning is almost always an inappropriate approach in any meaningful statistical analysis. The catch here is that broadcasters continue to display these binned stats without any context, and I believe it is important to understand the context of a stat we see on television many times each season.

* Binning is essentially dividing a continuous variable into subgroups of arbitrary size called “bins.”In this case, we are dividing a 60-minute hockey game into three 20-minute periods. 

A particular team wins a period by scoring more goals than their opponent. I looked at which teams won, lost, or tied each period by running some Python code through a data set provided by moneypuck.com. The data includes 13057 regular season games between the 2007-2008 and 2017-2018 seasons, inclusive. (Full disclosure: I’m pretty sure four games are missing here. My attempts to figure out why were unsuccessful, but I went ahead with this article because the rest of my code is correct, and 4 games out of over 13K is virtually insignificant anyways).  The table below displays our sample sizes over those eleven seasons:

Picture2.png

Remember that when the home team loses, the away team wins, so the table with our results will be twice as large at the table above. I split the data into home and away teams because of home-ice advantage; Home teams win more games than the visitors, which suggests that home teams win specific periods more often too. We can see this is true in the table shown above. In period 1, for example, the home team won 4585 times and lost only 3822 times. The remaining 4650 games saw first periods that ended in ties. 

We want to know the average number of standings points the home team earned in games after winning, tying, or losing period 1. This will give us three values: One average for each outcome of the first period. We also want to find the same information for the away team, giving us atotal of six different values for period 1. (This step is not redundant because of the “Pity Point”system, which awards one point to the losing team if they lost in overtime or the shootout. The implication is that some games result in two standings points but others end in three, so knowing which team won the game still does not tell us exactly how many points the losing team earned). Repeating this process for periods 2 and 3 brings our total to 18 different values. The results are shown below:

Picture3.png

The first entry in the table (i.e. the top left cell) tells us that when home teams win period 1, they end up earning an average of 1.65 points in the standings. We saw earlier that the home team has won the first period 4585 times, and now we know that they typically earn 1.65 points in the standings from those specific games. But if we ignore the outcome of each period, and focus instead on the outcomes of all 13057 games in our sample, we find that the average team earns 1.21 points in the standings when playing at home. (This number is from the sentence below the table —the two values there suggest the average NHL team finishes an 82-game season with around 91.43 points, which makes sense). So, we know that home teams win an average of 1.21 points in general, but if they win the first period they typically earn 1.65 points. In other words, they jumped from an expected points percentage of 60.5% to 82.5%. That is a significant increase.

However, in those 4585 games, the away team lost the first period because they were outscored by the home team. It is safe to say that the away team experienced a similar change, but in the opposite direction. Indeed, their expected gain decreased from 1.02 points (a general away game) to 0.54 points (the condition of losing period 1 on the road). Every time your favourite team is playing a road game and loses period 1, they are on track to earn 0.48 less standings points than when the game started; That is equivalent to dropping from a points percentage of 51% to 27%. Losing period 1 on the road is quite damaging, indeed. 

Another point of interest in these results, albeit an unsurprising one, is the presence of home-ice advantage in all scenarios. Regardless of how a specific period unfolds, the home team is always better off than the away team would be in the same situation.

I also illustrated these results in Tableau for those of you who are visual learners. The data is exactly the same as in the results table, but now it’s illustrated relative to the appropriate benchmark (1.21 points for home teams and 1.02 points for away teams).  

Picture4.png

Now, let’s reconsider the original stat for a moment. We know that when the Leafs won the first period, they won all 13 of those games. Clearly, they earned 26 points in the standings from those games alone. How many points would the average team have earned under the same conditions? While the broadcast did not specify which games were home or away, let’s assume just for fun that 7 of them were at home, and 6 were on the road. So, if the average team won 7 home games and 6 away games, and also happened to win the first period every time, they would have: 7(1.65) + 6(1.53) = 20.73 standings points. Considering that the Leafs earned 26, we can see they are about 5 points ahead of the average team in this regard. Alternatively, we can be nice and allow our theoretical “average team”to have home-ice advantage in all 13 games. This would bump them up to 13(1.65) = 21.45 points, which is still a fair amount below the Leafs’ 26 points. 

One issue with this approach is that weighted averages like the ones I found do not effectively illustrate the distributionof possible outcomes. All of us know it is impossible to earn precisely 1.65 points in the standings —the outcome is either 0, 1, or 2. An alternative approach involves measuring the likelihood of a team coming away with 2 points, 13 times in a row, given that all 13 games were played at home and that they won the first period every time. We know the average is 13(1.65) = 21.45 standings points, but how likely is that? It took a little extra work, but I calculated that the average team would have only a 3.86% chance to earn all 26 points available in those games. (I did this by finding the conditional probability of winning a specific game after winning the first period at home, and then multiplying that number by itself 13 times). Although the probability for the Leafs is a touch lower than this, since there is a good chance a bunch of those 13 games were not played at home, you should not allow such a low probability to shock you; 13 games is a small sample, especially for measuring goals. There is definitely lots of luck mixed in there. 

This brings us back to my original anecdote about cringing whenever I encounter this type of stat. Even if we acknowledge its fundamental flaw —scoring goals leads to wins, no matter when those goals occur in a game —the stat is virtually meaningless in a small sample. Goals are simply too rare to provide us with much insight in a sample of 13 games. Nevertheless, broadcasters will continue displaying these numbers without context. This article will not change that. So, the next time it happens, you can now compare that team to league average over the past eleven seasons. Even if the stat is not shown on television, all you need to know is the outcome of a specific period to find out how the average team has historically performed under the same condition. At the very least, we have a piece of context that we did not have before.

Do Tired Defensemen Surrender More Rebounds? by Owen Kewell

By: Owen Kewell

Two thoughts popped into my mind, one after the other.

First, I wondered whether an NHL player’s performance fluctuated depending on how long they had been on the ice. Does short-term fatigue play a significant role over a single shift?

Second, I wondered how to quantify (and hopefully answer) this question.

The Data

Enter the wonderfully detailed shot dataset recently published by moneypuck.com. In it, we have over 100 features that describe the location and context of every shot attempt since the 2010-11 NHL season. You can find the dataset here: http://moneypuck.com/about.htm#data.

Within this data I found two variables to test my idea. First, the average number of seconds that the defending team’s defensemen had been on the ice when the attacking team’s shot was taken. The average across all 471,898 shots was 34.2 seconds, if you’re curious. With this metric I had a way to quantify the lifespan of a shift, but what variable could be used as a proxy for performance?

Fortunately, the dataset also says whether each shot was a rebound shot. To assess defensive performance, I decided to use the rate at which shots against were rebounds. Recovering loose pucks in your own end is a fundamental part of the job description for NHL defensemen, especially in response to your goalie making a save. Should the defending team fail to recover the puck, the attacking team could generate a rebound shot, which would often result in a goal against. We can see evidence of this in the 5v5 data:

Rebound shooting % is 3.6x larger than non-rebound shooting %

Rebound shooting % is 3.6x larger than non-rebound shooting %

The takeaway here is that 24.1% of rebound shots go into the net, compared to just 6.7% of non-rebound shots. Rebounds are much closer to the net on average, which can explain much of this difference.

I believe that a player’s ability to recover loose pucks is a function of their ability to anticipate where the puck is going to be and their quickness to get to there first. While anticipation is a mental talent, quickness is physical, meaning that a defender’s quickness could deteriorate over the course of their shift as short-term fatigue sets in. Could their ability to prevent rebound shots be consequently affected? Let’s plot that relationship:

No trendline graph.jpg

There’s a lot going on here, so let’s break it down.

The horizontal axis shows the average shift length of the defending defense pairing at the time of the shot against. I cut the range off at 90 seconds because data became scarce after that; pairings normally don’t get stuck on the ice for more than a minute and a half at 5v5. The vertical axis shows what percentage of all shots against were rebounds.

Each blue dot represents the rebound rate for all shots that share a shift length, meaning that there are 90 data points, or one for each second. The number of total shots ranges from 382 (90 seconds) to 8,124 (27 seconds). Here’s the full distribution:

Shot Rates.jpg

We can see that sample size is an inherent limitation for long shifts. The number of shots against drops under 1,000 for all shift lengths above 74 seconds, which means that the conclusions drawn from this portion of the data need to be taken with a grain of salt. This sample size issue also explains the plot’s seemingly erratic behaviour towards the upper end of the shift length range, as percentage rates of relatively rare events (rebounds) tend to fluctuate heavily in smaller sample sizes.

The Model

Next, I wanted to create a model to represent the trend of the observed data. The earlier scatter plot tells us that the relationship between shift length and rebound rate is probably non-linear, so I decided to use a polynomial function to model the data. But what should be this function’s degree? I capped the range of possibilities at degree = 5 to avoid over-fitting the data, and then set out to systematically identify the best model.

It’s common practice to split data into a training set and a testing set. I subjectively chose a split of 70-30% for training and testing, respectively. This means that the model was trained using 70% of all data points, and then its ability to predict previously unseen data was measured using the remaining 30%. Model accuracy can be measured by any number of metrics, but I decided to use the root mean squared error (RMSE) between the true data points and the model’s predictions. RMSE, which penalizes large model errors, is among the most popular and commonly-used error functions. I conducted the 70-30 splitting process 10,000 times, each time training and testing five different models (one each of degree 1, 2, 3, 4, and 5). Of the five model types, the 5th degree function produced the lowest root mean squared error (and therefore the highest accuracy) more often than the degree 1, 2, 3 or 4 functions. This tells us that the data is best modelled by a 5th degree polynomial. Fitting a normalized 5th degree function produced the following equation:

x  = shift length in seconds

x = shift length in seconds

This equation is less interesting than the curve that it represents, so let’s look at that:

Regression.jpg

What Does It Mean?

The regression appears to generally do a good job of fitting the data. Our r-squared value of 0.826 tells us that ~83% of the variance in ‘Rebound %’ is explained by defensemen shift length, which is encouraging. Let’s talk more about the function’s shape.

Rebound rate first differences decrease at first as the rate stabilizes, and then increase further

Rebound rate first differences decrease at first as the rate stabilizes, and then increase further

As defense pairings spend more time on the ice, they tend to surrender more rebound shots, meaning that they recover fewer defensive zone loose pucks. Pairings who are early in their shift (< 20 seconds) surrendered relatively few rebound shots, but there's likely a separate explanation for this. It's common for defensemen to change when the puck is in other team’s end, meaning that their replacements often get to start shifts with the puck over 100 feet away from the net they're defending. For a rebound shot to be surrendered, the opposing team would need to recover possession, transition to offense, enter the zone and generate a shot. These events take time, which likely explains why rebound rates are so low in the first 15-20 seconds of a shift.

We can see that rebound rates begin to stabilize after this threshold. The rate is most flat at the 34 second mark (5.9%), after which the marginal rate increase begins to grow for each additional second of ice time. This pattern of increasing steepness can be seen in the ‘Rebound Rate Increase’ column of the above chart and likely reflects the compounding effects of short-term fatigue felt by defensemen late in their shifts, especially when these shifts are longer than average. The sample size concerns for long shifts should again be noted, as should the accompanying skepticism that our long-shift data accurately represent their underlying phenomenon.

The main strategic implications of these findings relate to optimal shift length. The results confirm the age-old coaching mantra of ‘keep the shifts short’, showing a positive correlation between shift length and rebound rates. Defensemen shift lengths should be kept to 34 seconds or less, ideally, since the data suggests that performance declines at an increasingly steep rate beyond this point. Further investigation is needed, however, before one can conclusively state that this is the optimal shift length.

Considering that allowing 4 rebound shots generally translates to a goal against, it’s strategically imperative to reduce rebound shot rates by recovering loose pucks in the defensive zone. Better-rested defensemen are better able to recover these pucks, as suggested by the strong, positive correlation between defensemen shift length and rebound rates. While further study is needed to establish causation, proactively managing defensive shift lengths appears to be a viable strategy to reduce rebound shot rates. 

Any hockey fan could tell you that shifts should be kept short, but with the depth of available data we're increasingly able to figure out exactly how short they should be.

In Search of Similarity: Finding Comparable NHL Players by Owen Kewell

By: Owen Kewell

The following is a detailed explanation of the work done to produce my public player comparison data visualization tool. If you wish to see the visualization in action it can be found at the following link, but I wholeheartedly encourage you to continue reading to understand exactly what you’re looking at:

https://public.tableau.com/profile/owen.kewell#!/vizhome/PlayerSimilarityTool/PlayerSimilarityTool

NHL players are in direct competition with hundreds of their peers. The game-after-game grind of professional hockey tests these individuals on their ability to both generate and suppress offense. As a player, it’s almost guaranteed that some of your competitors will be better than you on one or both sides of the puck. Similarly, you’re likely to be better than plenty of others. It’s also likely that there are a handful of players league-wide whose talent levels are right around your own.

The NHL is a big league. In the 2017-18 season, 759 different skaters suited up for at least 10 games, including 492 forwards and 267 defensemen. In such a deep league, each player should be statistically similar to at least a handful of their peers. But how to find these league-wide comparables?

Enter a bit of helpful data science. Thanks to something called Euclidean distance, we can systemically identify a player’s closest comparables around the league. Let’s start with a look at Anze Kopitar.

Anze Kopitar's closest offensive and defensive comparables around the league

Anze Kopitar's closest offensive and defensive comparables around the league

The above graphic is a screenshot of my visualization tool.

With the single input of a player’s name, the tool displays the NHL players who represent the five closest offensive and defensive comparables. It also shows an estimate of the strength of this relationship in the form of a similarity percentage.

The visualization is intuitive to read. Kopitar’s closest offensive comparable is Voracek, followed by Backstrom, Kane, Granlund and Bailey. His closest defensive comparables are Couturier, Frolik, Backlund, Wheeler, and Jordan Staal. All relevant similarity percentages are included as well.

The skeptics among you might be asking where these results come from. Great question.

 

A Brief Word on Distance

The idea of distance, specifically Euclidean distance, is crucial to the analysis that I’ve done. Euclidean distance is a fancy name for the length of the straight line that connects two different points of data. You may not have known it, but it’s possible that you used Euclidean distance during high school math to find the distance between two points in (X,Y) cartesian space.

Now think of any two points existing in three-dimensional space. If we know the details of these points then we’re able to calculate the length of the theoretical line that would connect them, or their Euclidean distance. Essentially, we can measure how close the data points are to each other.

Thanks to the power of mathematics, we’re not constrained to using data points with three or fewer dimensions. Despite being unable to picture the higher dimensions, we've developed techniques for measuring distance even as we increase the complexity of the input data.

 

Applying Distance to Hockey

Hockey is excellent at producing complex data points. Each NHL game produces an abundance of data for all players involved. This data can, in turn, be used to construct a robust statistical profile for each player.

As you might have guessed, we can calculate the distance between any two of these players. A relatively short distance between a pair would tell us that the players are similar, while a relatively long distance would indicate that they are not similar at all. We can use these distance measures to identify meaningful player comparables, thereby answering our original question.

I set out to do this for the NHL in its current state.

 

Data

First, I had to determine which player statistics to include in my analysis. Fortunately, the excellent Rob Vollman publishes a data set on his website that features hundreds of statistics combed from multiple sources, including Corsica Hockey (http://corsica.hockey/), Natural Stat Trick (https://naturalstattrick.com) and NHL.com. The downloadable data set can be found here: http://www.hockeyabstract.com/testimonials. From this set, I identified the statistics that I considered to be most important in measuring a player’s offensive and defensive impacts. Let’s talk about offense first.

List of offensive similarity input statistics

List of offensive similarity input statistics

I decided to base offensive similarity on the above 27 statistics. I’ve grouped them into five categories for illustrative purposes. The profile includes 15 even-strength stats, 7 power-play stats, and 3 short-handed stats, plus 2 qualifiers. This 15-7-3 distribution across game states reflects my view of the relative importance of each state in assessing offensive competence. Thanks to the scope of these statistical measures, we can construct a sophisticated profile for each player detailing exactly how they produce offense. I consider this offensive sophistication to be a strength of the model.

While most of the above statistics should be self-explanatory, some clarification is needed for others. ‘Pass’ is an estimate of a player’s passes that lead to a teammate’s shot attempt. ‘IPP%’ is short for ‘Individual Points Percentage’, which refers to the proportion of a team’s goals scored with a player on the ice where that player registers a point. Most stats are expressed as /60 rates to provide more meaningful comparisons.

You might have noticed that I double-counted production at even-strength by including both raw scoring counts and their /60 equivalent. This was done intentionally to give more weight to offensive production, as I believe these metrics to be more important than most, if not all, of the other statistics that I included. I wanted my model to reflect this belief. Double-counting provides a practical way to accomplish this without skewing the model’s results too heavily, as production statistics still represent less than 40% of the model’s input data.

Now, let's look at defense.

List of defensive similarity input statistics

List of defensive similarity input statistics

Defensive statistical profiles were built using the above 19 statistics. This includes 15 even-strength stats, 2 short-handed stats, and the same 2 qualifiers. Once again, even-strength defensive results are given greater weight than their special teams equivalents.

Sadly, hockey remains limited in its ability to produce statistical measurements of individual defensive talent. It’s hard to quantify events that don’t happen, and even harder to properly identify the individuals responsible for the lack of these events. Despite this, we still have access to a number of useful statistics. We can measure the rates at which opposing players record offensive events, such as shot attempts and scoring chances. We can also examine expected goals against, which gives us a sense of a player’s ability to suppress quality scoring chances. Additionally, we can measure the rates at which a player records defense-focused micro-events like shot blocks and giveaways. The defensive profile built by combining these stats is less sophisticated than its offensive counterpart due to the limited scope of its components, but the profile remains at least somewhat useful for comparison purposes.

 

Methodology

For every NHLer to play 10 or more games in 2017-18, I took a weighted average of their statistics across the past two seasons. I decided to weight the 2017-18 season at 60% and the 2016-17 season at 40%. If the player did not play in 2016-17, then their 2017-18 statistics were given a weight of 100%. These weights represent a subjective choice made to increase the relative importance of the data set’s more recent season.

Having taken this weighted average, I constructed two data sets; one for offense and the other for defense. I imported these spreadsheets into Pandas, which is a Python package designed to perform data science tasks. I then faced a dilemma. Distance is a raw quantitative measure and is therefore sensitive to its data’s magnitude. For example, the number of ‘Games Played’ ranges from 10-82, but Individual Points Percentage (IPP%) maxes out at 1. This magnitude issue would skew distance calculations unless properly accounted for.

To solve this problem, I proportionally scaled all data to range from 0 to 1. 0 would be given to the player who achieved the stat’s lowest rate league-wide, and 1 to the player who achieved the highest. A player whose stat was exactly halfway between the two extremes would be given 0.5, and so on. This exercise in standardization resulted in the model giving equal consideration to each of its input statistics, which was the desired outcome.

I then wrote and executed code that calculated the distance between a given player and all others around the league who share their position. This distance list was then sorted to identify the other players who were closest, and therefore most comparable, to the original input player. This was done for both offensive and defensive similarity, and then repeated for all NHL players.

This process generated a list of offensive and defensive comparables for every player in the league. I consider these lists to be the true value, and certainly the main attraction, of my visualization tool.

Not satisfied with simply displaying the list of comparable players, I wanted to contextualize the distance calculations by transforming them into a measure that was more intuitively meaningful and easier to communicate. To do this, I created a similarity percent measure with a simple formula.

Similarity Formula.jpg

In the above formula, A is the input player, B is their comparable that we’re examining, and C is the player least similar to A league-wide. For example, if A->B were to have a distance of 1 and A->C a distance of 5, then the A->B similarity would be 1 - (1/5), or 80%. Similarity percentages in the final visualization were calculated using this methodology and provide an estimate of the degree to which two players are comparable.

 

Limitations

While I wholeheartedly believe that this tool is useful, it is far from perfect. Due to a lack of statistics that measure individual defensive events, the accuracy of defensive comparisons remains the largest limitation. I hope that the arrival of tracking data facilitates our ability to measure pass interceptions, gap control, lane coverage, forced errors, and other individual defensive micro-events. Until we have this data, however, we must rely on rates that track on-ice suppression of the opposing team’s offense. On-ice statistics tend to be similar for players who play together often, which causes the model to overstate defensive similarity between common linemates. For example, Josh Bailey rates as John Tavares’ closest defensive comparable, which doesn’t really pass the sniff test. For this reason, I believe that the offensive comparisons are more relevant and meaningful than their defensive counterparts.

 

Use Scenarios

This tool’s primary use is to provide a league-wide talent barometer. Personally, I enjoy using the visualization tool to assess relative value of players involved in trades and contract signings around the league. Lists of comparable players give us a common frame through which we can inform our understanding of an individual's hockey abilities. Plus, they’re fun. Everyone loves comparables.

The results are not meant to advise, but rather to entertain. The visualization represents little more than a point-in-time snapshot of a player’s standing around the league. As soon as the 2018-19 season begins, the tool will lose relevance until I re-run the model with data from the new season. Additionally, I should explicitly mention that the tool does not have any known predictive properties.

If you have any questions or comments about this or any of my other work, please feel free to reach out to me. Twitter (@owenkewell) will be my primary platform for releasing all future analytics and visualization work, and so I encourage you to stay up to date with me through this medium.

Analysis: How 5 Elite Scorers Get Their Goals by Owen Kewell

By: Owen Kewell

There’s something beautiful about scoring a goal.

Goals are the building blocks that make up hockey success, both on the individual and team level. They are a single moment in time, a culmination of a series of plays that ends with one team’s attack successfully defeating the other’s defense.

Teams are forever searching to add goals to their lineup, and for good reason. Goals win games, playoff series and, eventually, championships.

Goal-scoring is a repeatable talent, and while certain NHLers are far better at it than others, each player does it their own way. Each scorer exhibits unique tendencies of shot type selection and shot location.

Alex Ovechkin, Evgeni Malkin, Connor McDavid, Nikita Kucherov, and Patrik Laine are five of the best scorers in the game. Of the 10 goal leaders for the 2017-18 season, these five players possess the highest career goals per game rates. They are the elite of the elite when it comes to putting the puck into NHL nets.

I wanted to explore how they each do it differently.

Elite Scorers 1.jpg

The above visualization separates by shot type to show how each player scored their goals in the 2017-18 season. Overall, the most popular shot type was wrist shot, followed by snap shot, slap shot, and finally backhand.

It should be noted that the ‘AVG (10+ G Forwards)’ represents a weighted average of the relevant shot rate among all forwards who scored 10 or more goals, weighted by the number of goals that they scored. It’s a way to quantify ‘normal’ rates for the league’s goal scoring forwards.

Let’s take a more detailed look at each of these five players.

 

Alex Ovechkin

Elite Scorers 3.jpg

It’s no secret that Alex Ovechkin is really good at scoring goals. Since breaking into the league, he’s won the scoring title 7 times and no one else has won it more than twice. Sitting at 607 career goals, Ovi continues to propel himself further up the list of all-time greats. His 0.605 goals per game ranks first league-wide, beating out all other forwards by at least 0.08 G/GP.

Ovechkin loves slap shots, which should come as no surprise to anyone who’s watched Washington’s power play operate. His 17 slap shot goals were an uncontested 1st league-wide, with Steven Stamkos being the only other forward to score more than 7. Ovechkin’s slap shot is so powerful that it beats goalies clean even whey they know it’s coming, meaning that it can be unleashed without needing to be disguised.

Equally noteworthy, Ovechkin scored just 31% of his goals by wrist shot, which represents the lowest rate among all 32 players who scored 30+ goals.

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

The red areas in the above heat map show where Ovechkin shoots more frequently than the rest of the league. Ovechkin makes an absolute killing at the top of the left faceoff circle, often referred to as the ‘Ovi Spot’. This area lines up with Ovechkin’s average shot distance of 32.3 feet, which ranked in the 80th percentile among the league’s forwards.

Although it’s not reflected in the heat map, much of Ovechkin’s damage is done with the man advantage playing the left point. Of his 49 goals, 17 were scored on the power play, which ranked 2nd only behind a player further down this list. His remaining 32 were scored at even-strength, which again ranked 2nd in the league. Elite scoring across both special teams and even-strength situations throughout his career has propelled Ovechkin to the status of the league’s premier goal scorer.

 

Evgeni Malkin

Elite Scorers 5.jpg
Elite Scorers 6.jpg

Despite being the second-best player on his team, Malkin has put together the resume of an elite goal scorer. He’s scored 75 goals in 140 games over the past two seasons, which converts to 44 goals over an 82-game season. His career goals per game of 0.472 ranks 6th among active forwards, placing him in elite company.

What makes Malkin dangerous is his offensive versatility; he can score from anywhere on the ice. Equal parts power and precision, Malkin possesses a variety of weapons. His snap shot goal rate clocks in at roughly double the league average (his 11 snap shot goals ranked 4th), but his middle-of-the-pack rates for wrist shots, slap shots and backhands speak to his balanced toolkit. Malkin does not rely on a single shot type to score goals, meaning that defenders must respect all shot types that Malkin credibly threatens. 

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Did I mention that Malkin can score from anywhere? The sea of red is the beauty of Evgeni Malkin. He’s one of the most complete offensive players in the league. In addition to his heavy shot, his slick puck-handling ability and power forward frame allow him to generate shots and scoring chances at elite rates in the low slot area. His shot distance ranked just inside the upper third league-wide, influenced both by his crease-area chances and his shot activity in the high slot.

Malkin joins Ovechkin as the only two players in the league to finish top-10 in both even-strength goals and power play goals. He scored 28 times at evens, ranking 7th, and 14 times with the man advantage, ranking 6th. Malkin is one of the game’s most dangerous players in the offensive zone, and his goal scoring abilities rank among the NHL’s elite.

 

Connor McDavid

Elite Scorers 8.jpg
Elite Scorers 9.jpg

At this point, not much more needs to be said about Connor McDavid’s offensive game. His 108 points were enough for a second consecutive Art Ross (but not Hart) Trophy. He’s the been the league’s best forward for the last two years, and he’s only 21 years old.

But is he a goal scorer? While it’s true that McDavid has been viewed more as a set-up man than a finisher thus far in his young career, in 2017-18 we saw a transformation in McDavid’s offensive role. Compared to the year prior, McDavid scored 11 more goals and took 23 more shots. He became more of a trigger man, electing to attempt shots more often instead of looking to pass. This development calls to mind a young Sidney Crosby, who recorded seasons of 70 and 84 assists before breaking out for 51 goals in 2009-10.

McDavid prefers to score goals with his wrist shot. His 25 wrist shot goals ranked 3rd league-wide behind only Nathan MacKinnon and Eric Staal, while his rate of 61% ranked 9th among the 32 players who scored 30+ goals. He hardly ever takes slap shots, registering just 7 of these shots during the entire season, of which just 1 beat the goalie. Rather than rely on strength to generate power, McDavid creates offense thanks to generational skating and elite-level hands. He’s able to create and navigate space better than anyone else on the planet and puts himself into positions where a quick and accurate wrist shot is more than enough to beat the goalie.

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

McDavid has figured out hockey’s (not-so) secret formula: if you get close to the net, you’re more likely to score. He's extremely effective at using his speed, hands, and vision to attack the most dangerous area of the ice. McDavid’s sub-20’ average shot distance is a testament to his elite ability to generate scoring chances from the crease and low slot area.

McDavid’s special teams split is intriguing. His 35 even-strength goals ranked first in the entire NHL, but his 5 power play goals tied him for 96th among forwards. This latter can be explained both by Edmonton’s league-worst power play and also McDavid’s primary role as a puck distributor on the top unit. If Edmonton’s power play improves, which is likely given regression to the mean, McDavid’s special teams goal-scoring could very well take a step forward and supplement his elite even-strength scoring totals. He is already the game’s best forward and he poses a legitimate threat to become the game’s best scorer sooner rather than later.

 

Nikita Kucherov

Elite Scorers 11.jpg
Elite Scorers 12.jpg

A late 2nd round pick, Nikita Kucherov has emerged from relative anonymity to become one of the league’s most dangerous forwards. His 79 goals over the past two seasons place 3rd league-wide, and he was one of just three players to break 100 points in 2017-18.

While Kucherov’s absurdly accurate wrist shot remains his primary weapon (4th in wrist shot goals with 24), he is equally dangerous on the backhand. He scored 8 times (21% of all goals) on his backhand, ranking 2nd among 30+ goal scorers to Brad Marchand in both raw total and rate. Kucherov’s ability to score using wrist shots and backhands is all the more impressive considering that he shoots from further away than 93% of other forwards. He can be successful from this range without relying on the power of slap and snap shots due to his innate ability to find and exploit tiny gaps that goaltenders leave open. His shots are precise and accurate, and he excels at finding any available daylight.

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

An incredibly versatile player, Nikita Kucherov generates shots at elite rates all over the mid and high-slot. Rather than favour a specific shooting location, he elects to test the goalie from all areas of the offensive zone. This makes Kucherov unpredictable, which helps explain why his quick-release wrist shot and backhand are so devastating. He doesn’t shoot much from the crease area, but driving the net really isn’t part of how he creates offense.

Kucherov was more of a goal-scorer at even-strength than on the power play in 2017-18. He recorded 31 ES goals, one of just four players to crack 30, compared with 8 on the man advantage. He played more of a set-up role on Tampa Bay’s 3rd-ranked power play, registering 28 assists as he regularly sent cross-ice passes to Steven Stamkos (15 PP goals). Kucherov’s outstanding season cemented his status as one of the most dangerous goal scorers in the NHL, and at the prime age of 25 he’s as good a bet as any to repeat his offensive dominance next season.

 

Patrik Laine

Elite Scorers 14.jpg

At just 20 years old, Patrik Laine is already among the game’s premier snipers. His 44 goals ranked 2nd league-wide in 2017-18, fueling the Jets to their franchise-best season. Laine’s biggest asset is his shot, which may very well be the best in the league. Among current NHLers with 50+ career goals, Patrik Laine’s career shooting percentage of 18.0% ranks 2nd behind only Paul Byron. Byron, meanwhile, had an average shot distance of 19.3 feet in 2017-18, least of all eligible forwards, while Laine’s average shot came from 36.1 feet, ranking in the 97th percentile. The kid can shoot the puck.

Laine’s weapon of choice is his snap shot, which he routinely uses to one-time pucks into the back of the net. His quick release and accurate shot placement resulted in 14 snap shot goals in 2017-18, which tied for the league lead with Phil Kessel. He also is a fan of the slap shot, with his 6 slap shot goals placing him in a tie for 4th among all forwards.

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Heat Map courtesy of Micah Blake McCurdy's website HockeyViz (https://hockeyviz.com)

Here we see Laine’s favourite shooting locations. A right-handed shot, Laine loves to one-time pucks from the high slot. The fact that he’s able to beat the goalie so consistently from so far away speaks to his talent as a shooter. Like Ovechkin, Laine’s shooting locations lack variety, but he’s so good from his spots that goalies have difficulty stopping the shot even if they can anticipate that it’s coming.

The triggerman for the Jets’ 5th-ranked power play, Laine lead all NHLers with 20 power play goals in 2017-18. He would routinely patrol the space between the left half-wall and left point, making himself open to cross-seam passes and one-timing his quick snapshot on net. His 24 even-strength goals tied for 20th in the league, so he’s no slouch at 5-on-5 scoring either.

Since breaking into the league, Laine has used his generational shot to pick apart opposing goalies. The odds-on favourite to inherit Ovechkin’s throne as best goal-scorer is the league, the sky’s the limit for a kid who potted 44 goals in just his second season in the league.

 

Conclusion

So there we have it; the modus operandi of five of the game’s elite. While Ovechkin, Malkin, McDavid, Kucherov, and Laine possess a shared gift for putting the puck in the net, they achieve it with vastly different sets of techniques, skills, and strategies. There is no uniform way to score a goal across the league, but all that matters is that it goes in.

With goals representing the currency of the NHL, goal-scorers are among the most valuable assets out there. Scoring goals wins you games, playoff series, and, as 32-year old Alex Ovechkin and 31-year-old Evgeni Malkin know, Stanley Cup championships. Kucherov (25), McDavid (21), and Laine (20) have not yet won hockey’s ultimate prize but given their relative youth and their otherworldly ability to put the puck in the net, they might not be far away.

 

Data courtesy of Hockey Abstract (http://hockeyabstract.com/testimonials), Natural Stat Trick (https://naturalstattrick.com), and NHL.com (https://nhl.com).

Shot heat maps courtesy of Micah Blake McCurdy’s wonderful visualization website HockeyViz (https://hockeyviz.com).

Does Goalie Rest Help Win a Cup? by Owen Kewell

By: Owen Kewell

On Thursday night, two third period goals scored in quick succession proved to be all that the Washington Capitals needed to defeat the Vegas Golden Knights. In doing so, they became champions, and the core built around Alex Ovechkin finally earned the right to lift the Cup after years of bitter playoff disappointment.

At some point in the Cup Final, I recall reading that both Braden Holtby and Marc-Andre Fleury played relatively few regular season games compared to most starting goalies. I looked it up, and it’s true. Holtby ranked 18th among goalies in TOI this past season, while Fleury came in at 25th.

The two goalies who made it furthest in the 2018 playoffs had a relatively light regular season workload. Could this be more than coincidence? Could a lighter workload directly translate into improved playoff performance? My first thought on the matter was that a goalie who played fewer regular season games would experience less fatigue, and so would be better suited for a long and grueling playoff run. Intuitively, this theory is pleasantly logical, but does it hold any merit?

The Data

To tackle this question systematically, I examined the number of regular season games played by starting goalies of all playoff teams dating back to the 2007-08 season. I defined a playoff run’s starting goalie as the goalie who played the most minutes for that team in that playoff run. I grouped the goalies by the number of series that their teams won, thus separating goalies by degree of playoff success. I then looked at the number of regular season games played by the goalies in each group.

Cup-winning goalies tend to play 7-9 fewer regular season games&nbsp;

Cup-winning goalies tend to play 7-9 fewer regular season games 

The numbers in the coloured boxes show the median GP value for all starting goalies whose teams won the number of playoff series found on the horizontal axis. It’s worth noting that I prorated games played for the lockout-shortened 2013 season as if it were a standard 82 game season.

Interestingly, when we group by degree of playoff success, we can see that the goalies who went on to win the Stanley Cup generally played fewer regular seasons games than did the goalies who went on to be eliminated at one point or another. This certainly supports the hypothesis that having your starter play fewer games would help your chances in the playoffs. Let’s take a closer look at these Cup-winning goalies.

Regular season workload of Cup-winning goalies

Regular season workload of Cup-winning goalies

Of these 11 goalies, only 2 appeared in 60 or more regular season games: Jonathan Quick’s 69 games in 2011-12, and Marc-Andre Fleury’s 62 games in 2008-09. Comparatively, this rate of 2/11 is quite low:

Cup-winning goalies reach 60+ GP less frequently than any other group

Cup-winning goalies reach 60+ GP less frequently than any other group

Only 18.2% of Cup-winning goalies reached 60+ GP, while 47.2% of all playoff starters reached the same threshold. The difference between the two figures is stark, but let’s remember that sample size is a crucial piece of context. Due to the nature of awarding a title, we can only glean a single data point per season. As such, we have just 11 data points, and that’s including 2017-18 Braden Holtby.

We can’t ignore the possibility that Group 4’s low rate of 18.2% was caused by chance. If we were to simulate 11 random trials that each independently had a 47.2% chance of producing a certain outcome, as we established is league average for hitting 60 GP, the binomial distribution tells us that there’s a 4.8% chance that 2 or fewer of the trials would produce the desired outcome. In other words, there’s a 4.8% chance that the observed statistical phenomenon can be completely explained by random chance.

Shifting perspective, this also means that there’s a 95.2% chance that the result is not entirely attributable to chance, and there’s that at least some form of relationship that exists between a goalie’s workload and their likelihood of winning a Stanley Cup. The results, though produced in a small sample size, certainly suggest that a goalie being well-rested contributes to their ability to lead their team to a championship.

So I Should Rest My Goalie, but When?

This was my follow-up question. Accepting that a well-rested goalie is an ingredient in the Stanley Cup recipe, does it matter when that rest happens during the season?

To highlight patterns in the workload of the same 11 Cup-winning goalies, I split each of their regular seasons into thirds (Games 1-27, 28-55, and 56-82) using schedule data from https://www.hockey-reference.com. For each section of games, I examined the starter’s proportion of their team’s total goaltending minutes. For example, in Games 1-27 of Washington’s 2017-18 season, Holtby played 1162:34, which was 71.5% of all TOI for Washington goalies. The chart below shows data for all goalies, including a group median.

Cup-winning goalies tend to have their lightest workload in the season's middle third&nbsp;

Cup-winning goalies tend to have their lightest workload in the season's middle third 

Cup-winning starters tend to play a larger proportion of their team’s minutes during the first third (Games 1-27) and the last third (Games 56-82) of the regular season. Comparatively, during Games 28-55, they tend to play about 7% less frequently. The emphasis on the beginning and end of the season is logical: a team must win games early to build a comfortable position in the standings, and a team must win games late to enter the playoffs firing on all cylinders.

This chart suggests that the best time to rest a starting goalie is during the middle third of the season. This is not an inflexible rule, however, as we can see that there are many ways to structure rest over the course of a season and experience playoff success. Holtby, for what it’s worth, was at his busiest during the middle third of this past season and was still able to remain sharp throughout the playoffs.

Conclusion and Takeaways

Over the last decade, we’ve seen well-rested goalies lift the Stanley Cup more often than not. The empirical data support the notion that resting starters more frequently, particularly in the middle third of the season, will increase the likelihood of playoff success. This means that NHL coaching staffs with championship aspirations could gain an advantage by proactively managing their starter’s workload throughout the season.

Over-reliance on a starting goalie induces fatigue and invites the risk of said goalie being unable to maintain their performance over a two-month playoff run. While teams with strong starting goalies have tendencies to lean on them heavily throughout the regular season, this may be detrimental to championship aspirations. If a coach truly wanted to maximize their team’s Stanley Cup chances, they must ensure that their starting goalie is rested enough to maintain physical and mental focus over an extended playoff run. If this can be done, the team will be one step closer to hockey’s ultimate prize.

All data taken from Natural Stat Trick (https://www.naturalstattrick.com/) unless otherwise specified.

Investigating the Disappearance of Vegas’ First Line by Owen Kewell

By: Owen Kewell

The Golden Knights kept finding ways to pull it off. Driven by all-world goaltending, an opportunistic counter-attack, and the desire to prove the rest of the hockey world wrong (especially their former teams), the group that James Neal affectionately dubbed the ‘Golden Misfits’ put together a Cinderella run through the Western Conference and into the Stanley Cup Final.

Only midnight appears to be approaching faster than anticipated.

After a 6-2 loss at the hands of the Washington Capitals yesterday, the Golden Knights find themselves searching for answers as their first elimination game in franchise history looms. The last three games, which Vegas has lost by a combined score of 12-5, featured a team that appeared much different from the group we saw roll their way through the Western Conference and into a 1-0 Stanley Cup Final lead.

So what’s different?

Goaltending is the obvious answer. After posting a save percentage above .930% for each of the first three rounds, Fleury’s mark is a paltry .845% through four games in the Final. Anyone could point out that Fleury needs to be better, and while it’s not wrong, it’s not particularly insightful.

Instead, I wanted to investigate the play of Vegas’ other big guns, who have been similarly subpar in their recent string of losses. I’m referring to the Knights’ three-headed monster of a top line, which features William Karlsson between Jonathan Marchessault and Reilly Smith. These three have been catalysts for their team’s offense all season and are similarly 1-2-3 in team scoring for these playoffs.

The table below compares all-situations production of Vegas’ top line during the first 16 playoff games, which includes Rounds 1-3 and Game 1 of the Cup Final, versus their production in the last 3 games.

Graphic 1.jpg

We can clearly see that the group’s production has dropped off. While the trio was averaging well over one goal and three points per game through the first 16 games, they’ve managed only one goal and four points total in the last three games. Goals are low-frequency events by nature, though, so to properly evaluate their play in a sample as small as three games we need to look at the higher-frequency plays that lead to goals. The table below reflects even-strength play where Vegas’ 1st line is on the ice together.

Graphic 2.jpg

A few numbers jump out from the above table. While the top line is generating significantly more shot attempts than previously, they are producing fewer shots on goal. This means that a higher proportion of the line’s shot attempts are being blocked, and those that aren’t being blocked are missing the net more often. Only 38.3% of the line’s shot attempts in the last three games are reaching the net, which is down more than 10% from the previous 16 games.

Graphic 3.jpg

Elsewhere, the line’s event rates are down across the board. Per 60 minutes, Marchessault, Smith, and Karlsson are generating 4.86 fewer scoring chances, 1.19 fewer high danger chances, and 1.64 fewer goals than they did in the previous 16 games. Much of the reduced scoring can be explained by a decrease in the unit’s on-ice shooting percentage, but the line’s decreased scoring chance generation remains a worrying red flag.

Offensive production, or a lack thereof, does not exist in a vacuum. I would be remiss if I did not acknowledge the work that Matt Niskanen and Dmitry Orlov have done in neutralizing Vegas’ top line. This pairing has been heavily leaned upon to shut down Vegas’ stars, especially in Games 3 and 4 when Washington had last change as the home team. Using William Karlsson and Dmitry Orlov as proxies for Vegas’ 1st line (VGK L1) and Washington’s 1st pairing (WSH P1), we can see what proportion of VGK L1’s 5-on-5 minutes were played against WSH P1 in each game thus far.

Graphic 4.jpg

Vegas’ lone victory came in the only game where their top line was able to play most of their even-strength minutes away from Washington’s top shutdown pairing. Since then, VGK L1 has seen a healthy dose of Orlov and Niskanen, and their production has suffered.

Whether attributable to a lack of execution or stellar opposing defense, the play of Vegas’ first line has been insufficient in their last three games. Their goal-scoring is down by more than half, fewer shot attempts are reaching Braden Holtby, and the line isn’t producing scoring chances at their usual rate.

For Vegas to begin climbing out of the hole they find themselves in, their top line will need to reverse these trends and find a way to produce. If they don’t manage to do so, the strike of midnight might be right around the corner.

All statistics courtesy of Natural Stat Trick (https://www.naturalstattrick.com/)

The Stanley Cup Formula: An Investigation Through Machine Learning by Scott Schiffner

By: Owen Kewell

NHL seasons follow a formulaic plotline.

Entering training camp, teams share a common goal: win the Stanley Cup. The gruelling 82-game regular season separates those with legitimate title hopes from those whose rosters are insufficient, leaving only the sixteen most eligible teams. The attrition of playoff hockey gradually whittles down this number until a single champion emerges victorious, battle-tested from the path they took to win hockey’s top prize. Two months off, then we do it all again.

Teams that have won the Stanley Cup share certain traits. Anecdotally, it’s been helpful to have a dominant 1st line centre akin to Sidney Crosby, Jonathan Toews or Anze Kopitar. Elite puck-moving defensemen don’t hurt either, nor does a hot goalie. Delving deeper, though, what do championship teams have in common?

I decided to answer this question systematically with the help of some machine learning.

Some Background on Classification

Classification is a popular branch of supervised machine learning where one attempts to create a model capable of making predictions on new data points. We do this by building up, or ‘training’, the model using historical data, explicitly telling the model whether each past data point achieved the target class that we’re trying to predict. In the context of hockey, this data point could be some number of team statistics produced by the 2015 Chicago Blackhawks. The target here would be whether they won the Stanley Cup, which they did.

Sufficiently robust classification models can identify a number of statistical trends that underpin the phenomenon that they’re observing. The models can then learn from these trends to make reasonably intelligent predictions on the outcome of future data points by comparing them to the data that the classifier has already seen.

Building a Hockey Classifier

We can apply these techniques to hockey. We have the tools to train a model to learn which team statistics are most predictive of playoff success. To do this, we must first decide which stats to include in our dataset. To create the most intelligent classifier, we decided to include as many meaningful team statistics as possible. Here’s what we came up with:

team stats.jpg

It’s worth noting that we engineered the ‘Div Avg Point’ feature by calculating the average number of points contained by all teams in a given team’s division. The remaining statistics were sourced from Corsica and Natural Stat Trick. An explanation of each of these stats can be found on the glossaries for the two websites.

Our dataset included 210 data points: 30 teams per season over the 7 seasons between 2010-11 and 2016-17. Each data point included team name, the above 53 team stats, and a binary variable to indicate whether the team in question won the Cup. Using this data, we trained nine different models to recognize the statistical commonalities between the 7 teams whose seasons ended with a Stanley Cup championship. The best-performing model was a Logistic Regression model trained on even-strength data, and so all further analysis was conducted using this model.

Results: Team Stats that Matter Most

To evaluate which team stats were most strongly linked to winning a Cup, we created a z-score standardized version of our team data. We then calculated the estimated coefficients that our logistic regression model assigned to each team stat. The size of these coefficients indicates the relative importance of different team stats in predicting Stanley Cup champions. The 5-highest ranking team stats can be seen below:

top 5 team stats.jpg

Of all team statistics, ‘Goals For Per 60 Minutes’, or GF/60, is most predictive of winning a Stanley Cup. Of the 7 champions in the dataset, 4 ranked within the top 5 league-wide in GF/60 in their respective season, with 2016-17 Pittsburgh most notably leading the league in the statistic. Impressive results in ‘High Danger Chances For’ and ‘Team Wins’ both strongly correlate to playoff success, while ‘Scoring Chance For Percentage’ and ‘Shots on Goal For Percentage’ round out the top 5.    

What Does It Mean?

Generating a list of commonalities among past champions allows us to comment on what factors impact a team’s likelihood of going all the way. Most apparent is the importance of offense. It is more important to generate goals and high-danger chances than it is to prevent them, as GA/60 and HDCA rank 36th and 13th among all statistics, respectively (their corollaries are 1st and 2nd). In the playoffs, the best team offense tends to trump the best team defense, which we saw anecdotally in last year’s Pittsburgh v Nashville Final. If you want to win a Stanley Cup, the best defense is a good offense.

offense vs defense.jpg

We can see that a team’s ability to generate scoring chances, both high-danger and otherwise, is more predictive of playoff success than their ability to generate shots. Although hockey analytics pioneers championed the use of shot metrics as a proxy for puck possession, recent industry sentiment has shifted towards the belief that shot quality matters more than shot volume. The thinking here, which is supported by the above results, is that not all shots have an equal chance of beating a goalie, and so it is more important to generate a shot with a high chance of going in than it is to generate a shot of any kind. Between a team who can consistently out-chance opponents and a team who can consistently out-shoot opponents, the former is more likely to win a hockey game, and therefore playoff series.  

Application: The 2017-18 Season

A predictive model isn’t very helpful unless it can make predictions. So let’s make some predictions.

By feeding our model the team stats produced by the recently-completed 2017-18 regular season, we can output predictions of each team’s likelihood of winning the 2018 Stanley Cup. Since this is the fun part, let’s get right to the probability estimates for all 31 NHL teams:

probability estimates.jpg

The rankings above essentially indicate how similar each team’s season was to the regular season of teams that went on to win it all. In doing so, they hope to identify the teams most likely to replicate this success The model favours the Boston Bruins to win the 2018 Stanley Cup, predicting a victory over the Nashville Predators in the Final.

The above data highlights a few curiosities. Notably, we can see that some non-playoff teams had 5-on-5 numbers that were relatively comparable to past Cup champions. Specifically, the Blues, Stars, and Flames played 5-on-5 hockey well enough this season to qualify for the playoffs. The Blues and Flames can attribute their disappointingly long off-seasons to the 30th and 29th-ranked power plays, respectively. The Stars’ implosion is more of a statistical anomaly, and while conducting an autopsy would be interesting it would be better served as a subject for another article.

The lowest-ranked teams to have made the playoffs in the real world are the New Jersey Devils and the Washington Capitals. While their offensive star power might have been enough to get these squads to the dance, the model predicts a quick exit for them both.

A Computer-Generated Bracket:

2018bracket.jpg

For fun, I’ve filled out the above bracket using the class probability rankings generated by our model. Of the 8 teams who have won or are winning their first-round playoff series, the model picked 7 of them as at the winner, with Philadelphia being the exception. While it’s far too early to comment on the model’s accuracy, as only a single playoff series has been completed, it’s an encouraging start.

Limitations of the Analysis

The above results must be considered in the appropriate context. The model was trained and tested using only 5-on-5 data, which would explain the lack of love for teams with strong special teams like Pittsburgh and Toronto. The model is also blind to the NHL’s playoff format. Due to the NHL’s decision to have teams play against their divisional foes during the first two playoff rounds, teams in strong divisions have a much harder road to winning a Cup. Consider that Minnesota’s path to the conference final would likely involve Winnipeg and Nashville in the first two rounds, who finished 2nd and 1st in NHL standings in the regular season. Divisional difficulty is not reflected in the probabilities listed above, though incorporating divisional difficulty either probabilistically or through a strength of schedule modifier could be areas of further analysis.

A final limitation of the model is that it is trained using only 7 champions. In an ideal world, we would have access to dozens or hundreds of Stanley Cup positive instances, but due to the nature of the game there can only be one champion per year. We considered extending the dataset backwards past 2011 but ultimately decided against doing so. The NHL is different today than it was in the past. Training a model on a champion from 2000 tells us little about what it takes to have success in 2018. Using 2010-11 onwards represented a happy medium in the trade-off between data relevance and quantity.

What next?

Winning a Stanley Cup remains an inexact science. While it’s valuable to identify trends among past winners, there is no guarantee that what’s worked before will work again. It’s a game of educated guesses.

I believe that the most legitimate way to build a Stanley Cup winner is a combination of the past and the future. Analyzing historical data to identify team traits that are predictive of a championship is half the battle. The rest is anticipating what the future of the NHL will look like. The champions of the next few years will be lead by managers who are best able to identify what it’ll takes to win in the modern NHL. While the above framework approaches the first half in a systematic way, the latter remains much harder to crystallize.

In the meantime, let’s turn to what’s in front of our eyes. The playoffs have been tremendously entertaining thus far, and that’ll only pick up as teams are threatened by elimination. Let’s enjoy some playoff hockey. Let’s see which playing styles, tactics, and matchups seem to work. Let’s learn.

Even if your team gets eliminated, just remember that this season’s playoffs are just a couple months away from being data points to train next season’s model.

Then we do it all again.

Playoff Preview: Toronto Maple Leafs vs. Boston Bruins by Anthony Turgelis

By: Kurt Schulthies

Monday May 13, 2013:

The city of Toronto was electric. Competing in the Stanley Cup Playoffs for the first time in 12 seasons, the Toronto Maple Leafs inched their way to game 7 against the heavily favoured Boston Bruins. Continuing an improbable run led by Phil Kessel, Nazem Kadri, James Van Riemsdyk, Cody Franson, Dion Phaneuf, and James Reimer.

I was with a dozen of my closest friends, sitting at the head of the table in a Shoeless Joe’s party room. Every detail of that night is vivid in my mind -- for what was about to come can only be described as demoralizing. The Leafs held a 3 goal lead with less than 11 minutes to go in regulation time.

The lead evaporated. The Bruins’ eventual overtime winner became an inevitability.

Without a word, I immediately got up from my seat and stormed out of the bar. I glanced over at the patrons -- and to this day, I have never seen so many people simultaneously unsure how to react.

Present Day

Toronto is a dramatically different team. Now led by their sophomore phenom Auston Matthews, the Leafs look for revenge against the team that crushed the hopes of an entire fanbase five years ago.  

Taking an analytics-focused view, let’s see how Toronto and Boston compare now.

Offensive Matchup

Screen Shot 2018-04-12 at 5.23.24 PM.png
Screen Shot 2018-04-12 at 4.40.22 PM.png
All data used is courtesy of Corsica and NaturalStatTrick

The Leafs are superior to the Bruins in every major offensive category. Toronto is one of the highest paced teams in the league, relying on their high-end offensive talent to best opponents. Boston had a similarly strong offensive season, but failed to generate a significant amount of high danger scoring chances per 60 minutes of play. This can likely be attributed to the Bruins' slower paced style of play.

                               Toronto                                                                       Boston

Screen Shot 2018-04-12 at 4.31.41 PM.png
Screen Shot 2018-04-12 at 4.31.56 PM.png
Screen Shot 2018-04-12 at 5.14.40 PM.png

 

The visuals above show the league rank of each forward in 5v5 primary points per 60 minutes. This metric is highly repeatable year over year, and gives a somewhat accurate depiction of a player’s offensive prowess. However, numbers are somewhat skewed by factors such as the quality of their linemates and the quality of competition faced.

The first thing that stands out about the Leafs’ chart is Auston Matthews. He ranks first league wide in 5v5 P1/60. Fans can expect him to be a constant threat, and the biggest ‘X-factor’ player in the series. Boston is led by what is likely the league’s most dominant first line. It is one of the only lines that is capable of dominating the overpowering combination of Auston Matthews and William Nylander.

Heat maps created and available on HockeyViz.com

Heat maps created and available on HockeyViz.com

Toronto is incredible at generating high danger scoring chances. This metric is much more predictive of goal scoring than stats such as ‘shots’. In contrast, Boston is far below league average at generating scoring chances right in front of the net, but remain a threat in the high slot. Toronto outperforms metrics such as Corsi for and scoring chances due to their admirable scoring talent, and high number of odd man rushes per game. Boston has slightly above average shot quality, meaning they likely score near their expected results according to Corsi and scoring chances.

Defensive Matchup

Screen Shot 2018-04-12 at 5.23.35 PM.png
Screen Shot 2018-04-12 at 4.40.33 PM.png

                 Boston

Zdeno Chara - Charlie McAvoy

Torey Krug - Kevan Miller

Matt Grzelcyk - Adam McQuaid

               Toronto

Morgan Reilly - Ron Hainsey

Jake Gardiner - Nikita Zaitsev

Travis Dermott - Roman Polak

Boston has been an excellent defensive team this season, beating Toronto in every major defensive category. The Bruins are one of the best shot suppression teams in the NHL, forcing teams to shoot from unfavourable scoring positions. In contrast, the Leafs allow a high concentration of dangerous scoring chances from the slot, leading to a much worse defensive performance. Shots against location heat maps for each team can be seen below:

Heat maps created and available on HockeyViz.com

Heat maps created and available on HockeyViz.com

Toronto gives up a lot of high danger chances, leading to a higher expected goals against per game. It also means the team underperforms metrics such as corsi and scoring chances. Boston, in contrast, is excellent at shot suppression. This leads to outperforming metrics such as corsi and scoring chances, and results in a very low expected goals against per game.

Goaltending Matchup

Both the Leafs and Bruins boast top tier goaltenders with Frederik Andersen and Tuuka Rask. Using a goalie comparison tool created by Tyler Kelley (@DocKelley41), we are able to compare each goalie by key metrics:

Compare other goalies at: https://public.tableau.com/profile/tyler7457#!/vizhome/GoalieTool/2017-18ComparisonTool

Compare other goalies at: https://public.tableau.com/profile/tyler7457#!/vizhome/GoalieTool/2017-18ComparisonTool

For more on what each metric means, read here. The values on the x-axis of the graph are the percentile ranks that each of their stats fall on. Frederik Andersen is near the top of the charts with his Goals Saved Above Average. This is unsurprising considering the aforementioned shaky Leafs defense and the great play of Andersen so far this year. The stat highlights that if an average goalie were to be placed in the Leafs net in front of Andersen, they would be expected to concede a lot more goals. By this metric among others, it appears Andersen has a small edge over Tuuka Rask this season.

Prediction

The team statistics would suggest the Boston Bruins are the favourites in this series. However, in head-to-head matchups in the Toronto Maple Leafs have been the better team with a 7-1-0 record in 8 games over the past 2 seasons. This series should be a war, and one of the most likely first round matchups to go to 7 games. With that being said, my final prediction is Leafs in 7 games.


Keep up to date with the Queen's Sports Analytics Organization. Like us on Facebook. Follow us on Twitter. For any questions or if you want to get in contact with us, email qsao@clubs.queensuca, or send us a message on Facebook.

Playoff Preview: Winnipeg Jets vs. Minnesota Wild by Scott Schiffner

By: Owen Kewell and Scott Schiffner

The calm before the storm.

The brackets have been setup, the matchup strategies developed, and the razors hidden away. For the first time since June, playoff hockey is here. We are mere hours from the puck drop that’ll kick off the 2017-18 Stanley Cup Playoffs, the starting pistol for a two-month long marathon where only one team can cross the finish line. In anticipation of this, we at the Queen’s Sports Analytics Organization decided to tee up the matchups featuring Canadian teams. We start with the Winnipeg Jets, who will play host to the Minnesota Wild on Wednesday night. The first round playoff series between the Central division rival Winnipeg Jets (2nd, 52-20-10) and the Minnesota Wild (3rd, 45-26-11) is an exciting matchup that is sure to feature a high level of speed, talent, and physicality from both sides. Both squads have enjoyed productive seasons, with the Jets posting the best record of any Canadian team, finishing with 114 points.

Offensive Matchup

Winnipeg enters the series with the reputation of having one of the most lethal forward groups in the league. Lead by a rejuvenated Blake Wheeler (91 points) and 44 goals from sophomore winger Patrik Laine, the Jets possess high-end offensive firepower that has torched the league for the better part of the season. Minnesota, meanwhile, enjoyed strong seasons from Eric Staal (76 points), Mikael Granlund (67 points) and Jason Zucker (64 points). Let’s take a quick look at some summary statistics from the regular season.

Stats from Corsica.hockey

Stats from Corsica.hockey

The Jets scored 23 more goals than the Wild over the season, though much of this can be explained by their superior power play. Jets skaters had a higher shooting percentage, though the difference is too small to reasonably infer superior shooting ability. The Jets outperformed the Wild at generating shot attempts and scoring chances, though the Wild were able to create more high-danger scoring chances. While individual point totals suggest Winnipeg has more high-end forwards, we can examine depth charts to clarify the picture.

depth chart.jpg

The graphic above shows the current depth charts (courtesy of Daily Faceoff) and each player’s rank among NHL forwards in even-strength primary points per 60 minutes. Here we confirm our belief that Winnipeg’s forward group is much deeper than Minnesota’s, as we can see that six Jets produced at a top-line rate compared to just three Wild players. To understand how the above results were achieved, we turn to heat maps.

Heat maps created and available on HockeyViz.com

Heat maps created and available on HockeyViz.com

The red areas indicate locations where a team shoots more frequently than league average, while blue is the inverse. In these maps we can see two teams who have a very different approach to generating offence. The Jets set up a triangle of attack, which results in a high volume of shots coming from the points and the mid-high slot. Being able to attack the slot with such regularity doubtlessly contributed to the success that the Jets experienced this season. The Wild, meanwhile, seem to play more on the perimeter with the goal of funneling pucks towards the crease. This explains why Minnesota produced more high-danger chances than the Jets despite generating less total scoring chances.

The offence matchup clearly favours Winnipeg. The Jets have the top-end firepower and the depth to roll scoring threats on every line. Throw in a dangerous power play, and the Jets are dangerous enough to make life miserable for anyone attempting to contain them.

Defensive Matchup

Winnipeg Jets:

Josh Morrissey – Jacob Trouba

Joe Morrow – Dustin Byfuglien

Ben Chiarot – Tyler Myers

Minnesota Wild:

Jonas Brodin – Matthew Dumba

Carson Soucy – Jared Spurgeon

Nick Seeler – Nate Prosser

The Winnipeg Jets allowed 216 goals in 2017/18, with 144 coming at even strength, while Minnesota allowed 229 goals (144 at 5v5). Winnipeg gave up an average of 31.9 shots per game, while Minnesota surrendered 31.3 on average. In terms of possession metrics, Winnipeg controlled 51.42% of shot attempts over the course of the 2017/18 season, good for 10th in the league, while Minnesota sits 29th with only 47.17% of shot attempts.

Comparing the top pairing defencemen for both teams using HERO charts:

http://ownthepuck.blogspot.ca/2017/05/hero-charts-player-evaluation-tool.html

http://ownthepuck.blogspot.ca/2017/05/hero-charts-player-evaluation-tool.html

The Minnesota Wild’s defence corps has taken a significant blow going into the postseason with the loss of number 1 defenseman Ryan Suter, who logged an average of 26:46 minutes of ice time per game before suffering a season-ending ankle injury on March 31. Veteran defender Jared Spurgeon remains a game-time decision due to an injured hamstring. The burden to cover these minutes will fall squarely on the shoulders of young defensemen Jonas Brodin and Matt Dumba, who will be counted on in key defensive situations. The Winnipeg Jets boast a tough lineup of physical defencemen, including Dustin Byfuglien and Tyler Myers, who will look to shut down the Wild’s top offensive lines. The Winnipeg Jets have the edge when it comes to top-tier defencemen, as well as much stronger depth on the blueline overall.

Finally, let’s compare the heat maps for both Winnipeg and Minnesota in their own defensive zones.

Heat maps created and available on HockeyViz.com

Heat maps created and available on HockeyViz.com

Taking a look at these maps, both teams are effectively limiting the number of scoring chances from high-danger scoring areas around the net (<25 feet) and in the slot. Minnesota’s heat map clearly indicates that the majority of chances are coming from the point (>40 feet out from the net) and down the right side, a potential weakness that Winnipeg’s quick wingers will look to exploit. Winnipeg’s defence is managing to limit almost all chances from high-scoring areas directly in front of their net, keeping the majority of shot attempts to the outside perimeter of the rink.

Goaltending Matchup:

We close our positional matchups by considering goaltending. Winnipeg will rely on Connor Hellebuyck, who broke out this year to post the winningest season ever by an American goalie. The young upstart will go toe to toe with Devan Dubnyk, the waiver-wire reclamation project that Minnesota has turned into a competent starter. Dubnyk has the qualitative advantage of playoff experience, but let’s see how the numbers stack up.

goalies.jpg

Unless otherwise specified, the above percentages reflect even-strength play. We see that Hellebuyck and Dubnyk performed similarly at even strength, as their save percentages for low, medium and high danger shots are all within a single percentage point. Where we see a difference, however, is on the special teams. While these stats are influenced by the quality of special team units, we see that Hellebuyck has significantly outperformed Dubnyk on both power plays and penalty kills. We also see that Hellebuyck saved about 2 goals more than expected given the quality of the shots being faced, whereas Dubnyk was over 7 goals in the hole on this metric.

If there had to be a choice between the two to start a Game 7, Connor Hellebuyck would be a safe choice. Despite his inexperience, his exceptional season played a huge role in Winnipeg’s ascension to 2nd place in the NHL’s overall standings. He’s shown to be better than Dubnyk at stopping the puck, and for that reason, he gives his team a better chance to win.

In summary, the numbers indicate that Winnipeg has the advantage in terms of offense, defense, and goaltending. The Jets enter the playoffs on an absolute tear, having won 11 of their last 12 games. They are 3-1-0 vs. the Wild in their season series. We are predicting that the Winnipeg Jets will be victorious in their first-round series against the Minnesota Wild, likely in 5 or 6 games.