The [ppm] eyrie

November 6, 2009

Advanced PPM-o-metrics

Filed under: powerplay manager hockey, PPM.statistics — glanvalleyeaglets @ 3:43 pm

Howdy everyone,

I haven’t posted for a while, you should appreciate the reasons – the daily job, the autumn blues, Dinamo Riga underperforming in the second KHL season and, most importantly, the lack of fresh ideas and results to present.

There are many discussions out there about the use and futility of counter-tactics, inconsistency of the game engines, about theories how to build player attributes to suit the demands of certain tactics. I don’t “know” the answers, all I can provide is evidence based on evaluation of over 200 000 games played in the second season of powerplay manager hockey. My opinions and interpretations may be wrong, cruical aspects of the game might be missing in my analysis and you can always believe your intutition outperforms any analysis, or you might just not believe the existence of a “game matrix” when facing the evident and omnipresent random factor making you win a game with 10:0 and losing the next one by 0:10 all settings being equal. Nevertheless I think I have a point to make and this blog is the perfect vehicle for doing so.

Let me keep this stupid and simple – apart from the aesthetics, ice hockey is all about scoring goals and preventing goals. In order to score goals, you have to shoot on the net and shoot with a certain quality. Everybody knows, what the average number of shots per game means. The quality of the shots is measured by the shot efficiency, which I’ll define as the inverse of “shots per goal” (the number of shots needed to score 1 goal). 5 goals with 40 shots gives an efficiency of 5/40 = .125 = 12.5%.

Take the number of shots per game and multiply it by the shot efficiency and you’ll recover the number of goals scored. Learn how to control the two factors and you’ll understand the game. What are the important factors and variables? How big or small is the random factor and what does it depend on?

The best variables available for analysing team strength are the “stars” shown in the profile page of a team. Let us suppose our team has a goaltending at 29 (notation: G+=29), defence at 26 (D+=26), offence at 25 (O+=25) and shooting at 23 (S+=23), and our opponent has goalkeeping G-=28, defence D-=19, offence O-=24 and shooting S-=17. In order to compare our offence to opponent’s defence, we introduce the offence-defence quotient O+/D-, which in this case would be 25/19=1.32. A good measure of comparison between our shooting quality and opponent’s goaltending quality is the shooting-goaltending quotient S+/G- given by 23/28=0.82. It turns out that these along with the corresponding quotients from opponent’s point of view (O-/D+ and S-/G+) are very important indicators for the chances of the teams.

Let us look at the graph in Figure 1. It shows the average number of shots per game versus the offence-defence quotient O+/D-. The blue line is computed from the data of all teams, the green line – from teams playing the right countertactics and the red line – from teams playing against the countertactics.

Avg shots per game vs O+/D-

Fig. 1. Average shots per game versus the O+/D- quotient for all teams (blue), teams playing countertactics (green) and teams playing against countertactics (red)

Evidently this is a “master curve” of the game. We see how the counter-tactics work (improving the shot differential), we see that teams with a weak offence perform few shots against a team with a strong defence, and we see that there is a saturation effect – the average number of shots per game stays below 35.

The lines show an almost cosmic order, but there is the back-side – the mighty random. To estimate its influence, let me introduce the variance \sigma=\sqrt{N^{-1}\sum_{i=1}^N (x_i-\bar{x})^2}. It is a moment of probability distribution function, but very roughly saying, in most games the deviation will be considerably smaller than \sigma.

O+/D- Shots p G Variance \sigma
30-40 16.5 3.28
50-60 20.8 7.17
80-90 27.4 12.8
120-130 31.0 15.8
150-160 32.3 17.1
170-180 32.9 17.4
200+ 33.2 17.5

What this shows is that a weak offensive line will not likely create many shots against a much stronger defence (low variance at low O+/D- levels), but the stronger team may have a good or bad shooting day 🙂 (By the way, the rule of three sigmas doesn’t apply here as the number of shots is not a normal random variable.) (Should provide a graph to illustrate this in the future.)

So we have learned that the number of shots on the net depends on the offence-defence quotient. If one keeps the O+/D- quotient constant and increases the strength of the own defence, the number of shots slightly increases. This probably has to do with the fact that the better defence creates more offensive situations and the defenders themselves are more likely to take a shot or two. We also have seen the huge variance, so don’t come to me and complain that your team managed only 20 shots whereas it was suppose to generate at least 30. It will all even out in the long run 🙂

Do different tactics have different number of shots versus O+/D- quotient curves? If this was true, then there might be a tactic suited for stopping better offensive lines, or a tactic that generates more shots on average, but is it so? Is there a secret key to success hidden in the sea of data?

Alas, see Figure 2.


Figure 2. Shots per game vs O+/D- for various tactics (excluding counter-tactics situations). (Sorry, there are three 'extra' zeroes on the y axis, cross them out when reading the graph)

This study suggests that the answer is negative. Within the margin of errors the lines coincide. (It has to be remarked that towards the extreme ends of the graph the error margin increases considerably due to significanltly smaller amount of available data.) Once more, for underlining and pinning on the walls: no tactics is better suited to a certain team, every one will perform the same way in the long run. Or, more modestly, I could not confirm the opposite to be true although the Universe knows I tried 🙂

Let us now move to the second parameter – shot efficiency alias scoring percentage. Figure 3 below shows the mastercurve “shot efficiency vs the shooting-goaltending quotient S+/G-” for all teams (blue line), teams playing counter-tactics (red line) and teams playing against countertactics (red line).


Fig. 3. Shot efficiency vs S+/G- for all teams (blue), teams playing countertactics (green) and teams playing against countertactics (red)

This chart is worth a thousand words. Not only does it confirm that the relation between shooting skill and opponent’s goaltending skill is the most important factor determining the scoring percentage, but it also shows an almost linear dependence of shot percentage on S+/G-. One more thing we can read off the curves is that counter-tactics do not influence the shot percentage.

To estimate the magnitude of random in scoring efficiency (including the famous goalie’s good/bad night effect), let us look at the variances.

S+/G- Shot effic. % Variance \sigma
30-40 5.9 5.84
50-60 10.2 6.09
80-90 13.7 7.03
120-130 18.4 7.91
150-160 21.9 8.92
170-180 24.2 9.42
200+ 29.1 10.6

As we see, the variance grows slower than the scoring efficiency, hence the bigger your S+/G- advantage, the less likely gets the chance for the great upset. It is difficult enough for an average goalie to stop a much stronger offence. However, and I want to emphesize this, the stronger the goalie, the larger the relative fluctuations in his game!

However, S+/G- is not the only one parameter that influences the scoring percentage. You don’t have to train the shooting skill exclusively to improve your shot efficiency. This curve happens to shift considerably with changing offence-defence O+/D- quotient.


Fig. 4. Shot efficiency versus shooting-goaltending ratio (S+/G-) for various offence-defence ratios (O+/D-)

This is illustrated in Figure 4.

Again, no words are required to explain the results – except that I’ve found out that the shot efficiency is more sensitive with respect to shooting-goaltending ratio S+/G- than it is to offence-defence ratio O+/D-. The bottom line is – you gotta train both offence and shooting for the best performance 🙂

The final picture for today studies the curves for different tactics played.


Fig. 5. Goaltending efficiency versus goaltending-shooting ratio (G+/S-) for the different tactics.

Figure 5 shows the opposite quantities to Figure 4, namely, goalkeeping efficiency versus goalkeeping-shooting ratio G+/S-. However, it is basically the same thing as goalkeeping efficiency is just 100% minus shot efficiency and G+/S- is just reversed S-/G+, so basically it is the same thing (but the tactics are chosen by the defensive team). The thing to take home from here is the fact that the curves coincide within the margin of error. No optimal tactics for a great goalie or for a team with great shooting, it is all the same 🙂

I’d like to conclude that the following passage in the Guide is henceforth a busted myth:

“Every team has a different composition of player attributes and therefore a different style of play is suitable for each team. Therefore you need to find the right style of play that suits your team. A different style of play is suitable for a team with a weak goalie and brilliant forwards and vice versa for a team with a goalie star. “

Hopefully they’ll implement it some day 🙂

Right, folks, that’s it for today. Good luck for the upcoming playoffs everyone! (And thanks for your interest, I never expected to get tens of thousands of hits in the first half-year of this blog!)

Blog at