Monday, June 8, 2009

Scoring Chances by Game State

For those that aren't aware, Dennis King, one of the posters at mc79hockey.com, took the time to track scoring chances for the Oilers over the course of the 08-09 NHL season. An example.

The work that he did is really quite impressive -- for every game, Dennis managed to record the scoring chances for each team, the time that the scoring chance occurred at, which players were on the ice when the scoring chance occurred, and game for and against totals for every Oiler player.

Needless to say, to do that for an entire season is no small task, and Dennis deserves some major credit for all the work that he put into the project.

For those interested, Scott Reynolds at GospelofHockey has made some interesting posts on the subject, as has Vic Ferrari (see here and here, for a few examples).

The topic of this post, however, is whether scoring chances differ according to game state. The term game state is a little vague -- in this case, I'm using the term to refer to whether or not the score was tied at the time the scoring chance happened. In other words, is there a 'playing to the score effect' in terms of scoring chances?

Prior to examining the results, I wasn't sure what to anticipate. On the one hand, shot ratio does vary according to the score, and the effect is fairly marked. As scoring chances are (highly) correlated with shots on goal, intuitively one might expect a parallel effect on scoring chance numbers.

On the other hand, there are reasons to expect a more moderate effect. The team that is playing from behind often plays quite desperately in an attempt to avoid losing. Consequently, the trailing team tends to be more liberal in its shot selection and, on account of playing more aggressively, is forced to concede a high frequency of odd-man rushes against.

Using the data provided by Dennis, I've looked at how the Oilers scoring chance numbers varied according to game state -- that is, whether they were trailing, tied, or leading at the time the scoring chance happened.

I've presented the overall results -- that is, the results for every game situation (EV, PP, SH), as well as the results at even strength only.

I've also added a second table that breaks down the data by period.

I should note that this data is only for 49 of the 77 games that Dennis tracked scoring chances for -- I wasn't able to easily cut and paste the first 30 or so games into excel. Nonetheless, I think that 49 games provides an adequate sample size.

The results:



The abbreviations in each column, from left to right, stand for: scoring chances for, scoring chances against, goals for, goals against, scoring chances for per goal, scoring chances against per goal, time on ice, scoring chances for per minute, scoring chances against per minute.

I was unable to determine time on ice values for even strength due to the way in which the data was recorded.

Some observations:

1. In a recent post on shot ratio by goal state, Tyler at mc79hockey remarked that he wasn't convinced that sitting on the lead was a good strategy. I'm inclined to agree with him. The Oilers were solidly outchanced when playing with the lead, both at even strength and otherwise, and were outscored just as badly.

Likewise , Edmonton actually outchanced the opposition when playing from behind, albeit narrowly.

2. There isn't much evidence that scoring chance quality varies by game state. One might have predicted that the leading team would capitalize on a higher percentage of its scoring chances. However, that doesn't appear to be the case. The team that was leading tended to capitalize on a higher percentage of its scoring chances at even strength, but the difference is quite small and probably not statistically significant.

3. It's difficult to say whether or not the effect is more pronounced later in the game. This was certainly the case when the Oilers were trailing. However, when leading, the opposition decidedly outchanced the Oilers regardless of the period.

Saturday, May 30, 2009

Playoff Predictions -- Stanley Cup Finals

(2) Detroit v Pittsburgh (4)

There isn't much that I can say about these two teams that hasn't already been said.

This is a matchup between two quality teams.

While it was not obvious that the Pens were the best team in the East at the outset of the playoffs, I think that it would be difficult to argue that point now.

They've been dominant since the start of the second round despite having a less-than-impressive showing against the Flyers.

I feel confident in saying that this year's team is better than last year's, if only for the fact that they're now able to consistently outshoot the opposition.

Needless to say, the Wings are also an excellent team that, like Pittsburgh, is clearly deserving of its place in the Finals.

What concerns me about Detroit is their injury situation. They missed a few regulars in several of the games against Chicago and, while some of those players have returned to the lineup, I doubt that any of them have fully recovered at this point. I understand that Datsyuk is out for game 1, and that will hurt them.

This series will be closer than last year's finals. If not in the outcome, then certainly in terms of the play. Last year, the Pens were decisively outclassed in all three games at Joe Louis and marginally outclassed in their own building. The Wings outshot the Penguins in all six games last year, and had an aggregate shot advantage of roughy +80. I just don't see that happening again this year.

Even though the gap between these two teams has narrowed over the last 12 months -- or, more accurately, since Valentines Day -- I still think that Detroit will win. The Wings are, fundamentally, the best team in the league (well, either them or San Jose) and I just can't pick against them. I also want them to win, and this has surely influenced my decision.

I think there's also something to be said for the competitive imbalance between the two conferences. Back in 2007, the Senators had, not unlike Pittsburgh, advanced to the final without too much difficulty, and had looked good doing it.

Of course, as is currently the case, the West was the stronger conference in that year. The Ducks had had a more difficult road to the finals than Ottawa by virtue of facing tougher opponents. And yet, it seemed that few people took that into account judging the relative strength of the involved teams. I'm not going to make that same mistake.

Detroit in 7.

Monday, May 18, 2009

PP S% Percentage: Correction

Well, I feel like a bit of an idiot.

In my post examining powerplay shooting percentage, I concluded that a sizable component of the team-to-team variance in powerplay shooting percentage was non-random.

For the 2008-09 season, the standard deviation in team powerplay shooting percentage was about 0.018. I determined that the predicted standard deviation -- that is, the standard deviation that one would expect if powerplay shooting percentage was entirely random -- was roughly 0.011. Had that figure been correct, that would have meant that a mere 1/3 of the variation in powerplay shooting percentage could be accounted for by randomness.

However, I had erred in calculating that figure. The mistake is an embarrassing one: instead of using each team's shot totals, I used each team's PP S% multiplied by 1000 (the shooting percentages at behindthenet are expressed in this manner). Those familiar with Excel are aware that an incorrectly typed formula can sometimes have profound consequences.

As each team's shot total was roughly double their actual shot total, and the predicted standard deviation was much lower than it should have otherwise been.

Upon doing another set of simulations -- this time hopefully correctly -- it seems that the predicted standard deviation is somewhere in the area of 0.016.

This means that about two-thirds of the variance in team powerplay shooting percentage can be explained through randomness, which is considerably different from my original (flawed) estimate.

However, as identified by Vic Ferrari in the comments section, there was another reason why my study was somewhat flawed.

Vic correctly pointed out that the standard deviation in team powerplay shooting percentage will vary around the 'true' mean standard deviation from year to year. This means that using the standard deviation from any single season as an approximation for the true standard deviation is problematic.

I made the mistake of representing my findings as more or less definitive when that wasn't necessarily the case.

This methodological problem also applies to my earlier study that dealt with even strength shooting percentage.

Obviously, this somewhat limits the extent to which my findings are generalizable.

What I've done, then, is to apply this methodology to other seasons to see if the contribution of randomness to the overall variance is similar. I also did this for even strength shooting percentage (5-on-5 shooting percentage, strictly speaking, as the numbers are from behindthenet), as well as even strength shooting percentage when the score is tied.

The results:


Some observations:

1. It appears that all of the team-to-team variation in EV shooting percentage when the score is tied is due to randomness.

I don't think I've erred this time -- there was absolutely no interyear correlation between 07-08 and 08-09 for team EV shooting percentage when the score is tied (r=0.004).

2. By contrast, the contribution of randomness to EV shooting percentage in general is much lower, and appears to be somewhere around the order of 50%.

This implicates the 'playing to the score effect' as one of the non-random causes of team-to-team variation in EV S %.

3. Contrary to what my last post on the subject would have one believe, team powerplay shooting percentage actually appears to be more random in its distribution than EV shooting percentage, not less.

This seems counterintuitive to me and I'm not sure how much confidence can be placed in these findings. Perhaps there is some other flaw in my methodology that I've overlooked.

Playoff Predictions -- Third Round Part Two

(4) Pittsburgh vs Carolina (6)

That the Penguins-Capitals series went seven games was hardly surprising. What was surprising was the degree in which the Penguins outplayed the Capitals.

The Penguins outplayed the Capitals in at least five of the seven games, and had the edge in shots in all seven. The aggregate shots for the series were 256-180 in favor of Pittsburgh. It's not often that one team manages to outshot the other so decidedly over the course of a best of seven series. When it does happen, there can be no doubt as to which of the two teams was better, especially when the outshooting team is also the victor.

The Capitals had no difficulty at all in outshooting the opposition over the course of the regular season, and the fact that they were so visibly outplayed calls for an explanation. I'm not sure whether Washington played extremely poorly or Pittsburgh played extremely well. It's likely that both are true to some degree. In any event, the Penguins were clearly the better team and deserved to win.

I've written about Boston at length on this blog and frequent readers are well acquainted with my thoughts on the team. At the risk of belaboring the point, I'll keep my comments brief.

The Bruins are a reasonably good team that were eliminated by another reasonably good team. Some people have commented that the Bruins picked the wrong time of year to play their worst hockey, but I don't think that's accurate at all. The Bruins were trading scoring chances with the opposition all season long, yet came out ahead on the basis of strong goaltending and luck. Against Carolina, the Bruins again traded scoring chances in an entertaining and evenly-matched affair. They did not play poorly. The difference was that, unlike during the regular season, they didn't receive an undue share of the bounces. It's as simple as that.

It's funny -- if you asked the average hockey fan which of the two Eastern series' went according to expectation, and which of the two did not, they'd likely identify Pittsburgh-Washington as the former, and Carolina-Boston as the latter. I couldn't disagree more.

As for the series in question, I'm forced to go with the Penguins. The Penguins, as I mentioned earlier, were very impressive against the Capitals. If they play even somewhat similar against the Hurricanes, they should advance. Carolina, having defeated two quality opponents, is obviously a good team, and I don't anticipate that this will be an easy series for the Penguins. At the same time, I don't see them losing.

Pens in 6.

Sunday, May 17, 2009

Playoff Predictions -- Third Round

(2) Detroit vs Chicago (4)

The fact that the Wings only narrowly got by Anaheim might be of concern to some people, given that Chicago is probably a better team than the Ducks.

On the other hand, the Wings-Ducks series was only really close results wise. I'm not suggesting that the Ducks are a weak team or that they played poorly -- that's not my position. Nonetheless, it was clear to me -- both from watching that series and from looking at the underlying numbers -- that one team was easily better than the other. And the fact that the series went seven games and was decided by a mere goal doesn't change that fact.

In the other Western semi-final, it seemed that the Blackhawks were the slightly better team. While the Canucks had the better special teams, Chicago was better at controlling the play at even strength. Prior to the series, some appeared to pick Vancouver on the basis of the Luongo factor. Although it was reasonable to expect Vancouver to have some advantage in goaltending going into the series, that advantage never really materialized. Perhaps that was the difference.

There isn't really too much that can be said about this series. Chicago is a strong team that can probably compete -- at least broadly speaking -- with the Red Wings at even strength. However, I think that the Wings powerplay might be the difference maker here, and if the Hawks fail to play disciplined, this series might be over quickly.

Wings in 6.

I'll do the Pens-Canes series tomorrow.

Wednesday, April 29, 2009

Second Round Predictions

(1) Boston vs Carolina (6)

To the surprise of few, the Bruins had little trouble with Montreal in the first round. I'm not sure if this validates the Bruins as a elite team, though. The evidence suggests that the Habs were an average-ish squad that was devastated with injuries, and were therefore not a quality opponent.

The Canes were impressive against the Devils. Not only did they emerge from the series victorious, but they managed to upset one of top teams in the conference without getting noticeably outplayed. While I didn't catch as much of the Canes-Devils series as I would have liked to, the numbers indicate that the shots and scoring chances were fairly even. This bodes well for Carolina, I think, given that the Devils were one of the strongest teams -- if not the strongest team-- in the conference in terms of outshooting and territorial play. Therefore, on account of their first round performance, I think it's fair to say that the Canes are a legitimately good team.

What will likely play to Boston's advantage in this series is the fatigue element -- whereas the Canes have played seven games so far, the Bruins have only played four. They also had a much better goal differential than Carolina over the course of the regular season, and dominated the season series against the Canes (at least outcome wise).

However, I find it hard not to go with Carolina here. Territorially speaking, Carolina was much more dominant than Boston during the regular season, as evidenced by their clear advantage in Corsi. Some might point out that the Bruins surely played more with the lead than the Canes, therefore artificially rendering their EV numbers less impressive. While this is a valid point, Carolina's advantage in Corsi remains true even if one only looks at even strength play when the score is tied. I'm also impressed by Carolina's ability to consistently draw more powerplays than the opposition (Boston was merely average in this regard during the regular season).

While I'm not overly confident about this pick, I've yet to go with an underdog and it would be awfully lame if I were to go with the safe pick in every series. And frankly, the further that the Bruins go, the worse it reflects upon yours truly -- therefore, there's an element of self-interest here too.

Canes in 6


(2) Washington vs Pittsburgh (4)

The Pens had more difficulty with the Flyers than I anticipated. While I personally thought that the balance of play and scoring chances were fairly even, one could make an argument that the Flyers were the better team in that series.

The Capitals-Rangers series was an interesting one. One of the TSN announcers -- Gord Miller, I think -- remarked that, in each of the games, the winning team tended to be the team that got outplayed. I think that this is only partly true. While the winning team was outshot in four of the seven games, I think that at least some of that was due to the trailing team playing desperate hockey and throwing everything on net. In any event, I think that the Capitals demonstrated that they were the better of the two clubs over the course of the series and were thus worthy of advancement.

From my perspective, this series is essentially a coin toss. At first glance, Washington's superior goal differential, better underlying numbers, and home ice advantage makes them the more attractive pick. However, Pittsburgh's underlying numbers and goal differential since the coaching change/return of Gonchar/roster acquisitions are, if pro-rated, on par with that of Washington (or perhaps better). Over the course of a seven game series, home ice advantage is almost negligible (1-3%), but, seeing as how I can't otherwise choose between these two teams, it tilts me in favor of Washington.

Capitals in 7.


(2) Detroit vs Anaheim (8)

Detroit didn't have much difficulty in disposing of the Jackets, although the underlying numbers suggest that the play was more even than the results would imply.

Beating the Sharks in a seven game series is no small feat and Anaheim deserves credit in that respect. However, getting decidedly outshot and outchanced, while giving up a ton of powerplays to the opposition, is never a recipe for long term success. Therefore, without any hesitation, my pick is Detroit.

Wings in Five.


(3) Vancouver vs Chicago (4)

An interesting matchup. Both teams were good at EV throughout the course of the regular season. However, while the Hawks did it through accruing a massive shot differential and dominant territorial play, the Canucks were more reliant on the percentages. Although their impressive EV save percentage is likely sustainable (see: Luongo, Roberto), I'm skeptical as to whether the same is true of their equally impressive shooting percentage. Additionally, while both teams had a positive overall goal differential, Chicago's was better. Therefore, I'll take the Blackhawks.

Hawks in 6.

Sunday, April 26, 2009

The Percentages Revisited: 5-on-4 Shooting Percentage

A while back, I wrote about the effect of randomness on even strength* shooting percentage. For those who didn't have an opportunity to read that post, I'll briefly summarize the findings:


1. It would appear that a large portion of the inter-team variation in EV shooting percentage can be accounted for by random variation.

2. The spread among NHL teams is very slightly broader than what would be expected by chance alone. Therefore, it would appear that teams do in fact exert some influence on their EV shooting percentage.

* I actually only looked at 5-on-5 shooting percentage. I assume that the results are generalizable to even strength play as a whole, although that may not be the case.

In making my playoff predictions this year, I looked very closely at each team's shot rate (both SF and SA) in each of the main game situations (that is, 5-on-5, 5-on-4, 4-on-5). I also looked at how often each team had played in each game situation over the course the season. My method of determining the 'better' team basically revolved entirely around these two factors.

My method of evaluation didn't really accord much weight to the percentages, regardless of game state. I did this under the -- somewhat faulty -- assumption that most of the inter-team variation in the percentages is due to randomness. If true, there wouldn't be much point in taking the percentages into account when attempting to predict future results.

As it happens, that really isn't true at all. It appears to largely be true in terms of EV shooting percentage. However, this finding isn't necessarily generalizable to other game states. For one, it doesn't seem to be case for EV save percentage. More on that later.

It also doesn't seem to apply to 5-on-4 shooting percentage. While I began my analysis under the expectation that the majority of the inter-team variation in 5-on-4 shooting percentage could be explained through randomness, that doesn't appear to be true.

My methodology was basically identical to that used in my analysis of 5-on-5 shooting percentage, with one obvious difference -- instead of looking at 5-on-5 play, my focus this time was on 5-on-4 play. Here's a quick explanation of my method.

Firstly, I looked at how many shots each team took at 5-on-4 during the 2008-09 regular season. The values can be viewed at behindthenet. I then figured out the average 5-on-4 shooting percentage in the league (~0.128). I then simulated 100 'seasons'. In each 'season', the number of shots taken by each team was the number of 5-on-4 shots taken by that team during the 2008-09 season. However, the percentage of scoring a goal on each shot for every team was 0.128 -- the league average 5-on-4 shooting percentage. That is, each team was assigned the exact same shooting percentage. This is significant as, in any particular 'season', any deviation from the mean is strictly due to randomness, thus allowing one to determine how the spread in 5-on-4 should appear through the impact of randomness alone.

The results:

The first graph is fairly straightforward. The blue distribution is the 'predicted' distribution. It represents the spread in 5-on-4 shooting percentage over the course of the 100 simulated seasons. Thus, it's an approximation of what the spread among teams in 5-on-4 shooting percentage would look like if each team had the exact same underlying 5-on4 shooting percentage.

The red distribution is the 'actual' distribution. It represents the spread in 5-on-4 shooting percentage among NHL teams for the 2008-09 regular season. That mini-peak on the far right of the graph represents Philadelphia, who led the league with a gaudy 5-on-4 shooting percentage of 0.181.


This graph is a 'smoothed' version of the above graph. The blue distribution required no smoothing and is therefore identical to the one above.

However, the red distribution did require smoothing. Thus, the red distribution in this graph is simply a normal distribution with a mean of ~0.128 and standard deviation of 0.02. Why 0.02? That was the standard deviation in 5-on-4 shooting percentage among NHL teams during the 2008-09 season.

Here's the raw data. It's more or less self-explanatory.

The first two columns are the start and end points for the percentage 'ranges' (it's hard to make sense of non-discrete data). The 'actual' column -- the third one from the left -- shows the numerical distribution in 5-on-4 shooting percentage for the 2008-09 season. So, for example, one team in the NHL had a shooting percentage between 0.18 and 0.185 this season. The 4th column merely shows the relative frequency of the third column values.

In terms of the predicted values, the 5th column shows the frequency of each percentage range for the 100 simulated seasons, while the 6th column expresses those values as a relative frequency. So, for example, out of the 3000 simulated team-seasons (100 seasons * 30 teams = 3000 team-seasons), two teams had a shooting percentage falling between 0.165 and 0.170.

The final column merely shows the numerical distribution in shooting percentage in a hypothetical 30 team league where each team has the same underlying shooting percentage. This allows for a comparison to be made with the actual distribution, shown in the 3rd column.

Finally, the supplemental data. For each of the 100 simulated seasons, I calculated the standard deviation in shooting percentage among the teams. 'PREDICTED ST DEV MEAN' is the average standard deviation over the 100 seasons. 'PREDICTED ST DEV MIN' is the minimum standard deviation for the 100 seasons. 'PREDICTED ST DEV MAX' is the maximum standard deviation for the 100 seasons. 'ACTUAL ST DEV' is the standard deviation in 5-on-4 shooting percentage among NHL teams for the 2008-09 regular season.

The fact that the actual standard deviation is larger than the maximum standard deviation for any of the simulated seasons is fairly conclusive proof that randomness alone cannot account for the inter-team variation in 5-on-4 shooting percentage. For what it's worth, when I did my analysis on the effect of randomness on EV shooting percentage, some of the simulated seasons had a larger standard deviation than the actual standard deviation.

Lastly, the final row shows the inter-year correlation -- that is, for 0708 and 0809 -- in 5-on-4 shooting percentage at the team level. The value is non-trivially positive, which lends support to my above finding that teams can reliably influence their 5-on-4 shooting percentage.* Not surprisingly, the Flyers were tied for the league lead in 5-on-4 shooting percentage last season.

*On the other hand, Tyler at mc79hockey, in a post examining this type of thing at the start of the 2008-09 season, found an inter- year correlation that was somewhat lower, on the order of ~0.30.

EDIT:

Also relevant and of interest:

Vic Ferrari, in the comments section of this post -- in which he examines the ability of individuals player to effect PK SV% --, reports that individual Oilers had a substantial effect on powerplay shooting percentage while on the ice. This tends to support the idea that powerplay shooting percentage is highly non-random in its distribution.