Wednesday, June 02, 2010

Throw A Few Pennies On The Weight

The Big Ben clock tower is pictured behind a sculpture in London

I remember a scene from a film I saw as a boy. A brash American character was walking alongside a posh Englishman through the West End of London. They were probably solving a crime, I don't recall. I do remember the American looking up at Big Ben, then checking his watch and informing his colleague that the tower clock was running a couple of minutes slow. The Englishman quipped: “I'll be sure to tell the lads to throw a couple of pennies on the weight”. I don't know why I remember that, though I'm pretty sure that shit like this is occupying the head space that I would otherwise have used to remember anniversaries.

Do pennies on a clock weight really influence the clock speed? I don't know. I do, however, think that it is a good analogy for hockey and scoring chances. If keeping fast time is a good thing; throwing Visnovsky over the boards is like adding a bunch of pennies onto the weight, throwing Moreau over the boards a few seconds later is like taking most of them back off again. And the question becomes; how many pennies are Visnovsky and Moreau actually worth?

Consider the following information, gathered from a few games in an imaginary league where the quality of competition and linemates, just generally the context of the ice time, is the same for everyone. There are also only four defensemen per team in this league (it's my imaginary league, I can do what the hell I want). How many pennies are each of these four defenders adding or subtracting from the weight? You can click on the image to enlarge it.

What if Dennis King, going purely by instinct, told you that Smid was worth -3.6 pence per shift, Vis worth +6.3 pence, Souray +4.5 pence and Struds -8.6 pence? Would you believe him?

Personally I would tend to think he's probably right. After all, every game that someone tracks scoring chances makes them colder and more rational, and Dennis has recorded more than most people around here. Then I would remember Springsteen's sage advice “Blind faith in anything will get you killed”. And while I'm not sure how I could die from this, short of provoking Dennis to the point that he tracked me down and murdered me ... they are still wise words. I'd bust out some simple math to check on Dennis' assertion.

Using Smid first:

He obviously played all 100 shifts with himself on the ice, so -.036 x 100 = -3.6

He played 75 shifts with Vis, so .063 x 75 = 4.73

He played 15 shifts with Souray, so .045 x 15 = .68

He played 10 shifts with Struds, so -.086 x 10 = -.86

Add those up and it's predicting a scoring chance +/- of +1 for Smid. And that's what he got. It works for everyone else as well, so Dennis is probably a witch.

We'll call these King Values. It would be better if Dennis had a less popular surname, such as Clutterbuck or Schultehammer, but it's still a decent name for the statistic.

And just so you know that I'm not blowing smoke up your ass, you can use this link to check for yourself. It takes the shifts-together information from above, then calculates the King Value from the scoring chance +/- data that you input in the URL.

The default URL linked above is The red numbers that I've shown here are the scoring chance +/-s that I used in my example. You can change those to anything you'd like and rerun the script. You will, of course, get a new batch of King Values.

On the output, which looks like this:

The initial guess is emboldened, and is +/- in pounds sterling (so vis's 0.04 is £0.04, or 4 pence), that's the starting point. Each row of data below that represents the next iteration. In short, we took what we learned from trying the emboldened numbers as King Values, saw that it didn't give expected scoring chance +/-'s that were worth a damn, modified them rationally to try and get a better result with the next try, then had another go. Ad infinitum. Or in this case, ad ten. Of course if you enter something absurd for player scoring chance +/-s the whole thing will become unstable and output nonsense.

For the mathematically inclined: A quicker way of doing the checking math: If you think of the shift-together chart as matrix A, the King Values as matrix B, and the recorded scoring chance +/-s as matrix C, then A times B using =mmult() in a spreadsheet ... that should equal C.

I'm not intending this post as a mathematical exercise. My goal here is to forward the general way of thinking, and also to open the floor to considered criticism, this using an example that's still on a small enough scale that spoken languages are relevant in helping us comprehend the universe. Because what comes next with this line of thinking, whether I choose to use MLB or NHL data, is going to make the world seem simpler than even the squarest of heads could have ever imagined.


Blogger Jonathan Willis said...

The link isn't working Vic - I tried substituting '' for 'localhost' and it still didn't work.

Hell of an idea, though.

6/02/2010 2:25 pm  
Blogger Vic Ferrari said...

Thanks for the heads up, Jonathon. It should work now.

6/02/2010 2:39 pm  
Blogger Coach pb9617 said...


Dennis is missing 13 games from this season's schedule. Part of my June project is to go back and count chances is all of the missed games. I'll submit them after I watch them.

6/02/2010 5:09 pm  
Blogger Passive Voice said...

This is awesome stuff.

I was tutoring a kid** in 11th-grade math awhile ago, and we were doing "systems of equations", and I remember thinking that there had to be some way to mess around with those things to come up with a measure of player value. I figured Gabe Desjardins was gonna get around to it(he had a post awhile ago about Corsi overachievers, and mentioned the "holy grail", which I just figured was something like an enormous system of equations encompassing every player in the league), but he's been busy fending off angry Avalanche fans I think.

Is there any way to account for opposition? Like, if you did a big-ass league-wide one of these, could you input the number of shifts against each individual opposition player with a negative coefficient (e.g. Smid's values in a two team league might be 100Smid, 75Visn, 15Sour, 10Stru, -58Mitc, -54Biek, -49Salo, -39Edle, if any of that makes a lick of sense)? Or would that make the whole thing whacky?

I am insanely excited about this.

**The kid, btw, is obnoxious. He's on a real "I'll never use this bullshit" jag. I wish he liked hockey, so I could jab him in the arm and show him this and say "see?" triumphantly.

6/03/2010 1:30 am  
Blogger Jonathan Willis said...

Passive Voice:

If it makes you feel any better, I was a "I'm never going to use this stuff" guy.

Amazing how handy it's been to me since.

6/04/2010 11:41 pm  
Blogger Vic Ferrari said...


Man, you guys are hardcore. Huge props for the scoring chance and excellent game analyses. It's incredible what Dennis started with this scoring chance thing.

6/05/2010 9:57 pm  
Blogger Vic Ferrari said...

Passive Voice,

On your third paragraph ... exactly. You can think of 'A' as a variance-covariance matrix for the probablity distribution of everyon in the league. That's what it is.

Of course are eyes tell us that there are only three dimensions, and we can be made to believe that there are four or five. Math tells us that there are an infinite number of dimensions, and we'd need over 800 of them to execute that.

This is the same as Lupulsmid btw, just a more aggressive algorithm. It has some stability issues, but so far so good.

One day I'll list off the Oiler players and have people guess who gets moved the by context, on a scale of -10 to +10. If enough people take a guess, I'll post the King Values for all the Oilers, incl faceoff zones, competition and teammate effects.

It's a bitch to execute though, and computationally intensive. You literally van't generate the numbers for one player without generating them for every single player in the league.

6/05/2010 10:05 pm  
Blogger Jim Philips said...

Yeah, you are right there are scene or songs that it can takes a lot of space and It would be great to use that kind of space in other things like pph free demo

5/30/2013 11:41 pm  

Post a Comment

<< Home