eGF Finally Fully Explained

Around March of 2015 I launched my webpage ( which was centered around the concept of eGF (expected goals for).  In hindsight that was a stupid name, it should have been just eG (expected goals) but I’ve been using eGF for almost a year and it’s mentally drilled into my brain hole.  The good news about using eGF as my acronym is it allows easy distinction from some of the other expected goal models out there that use the acronym ‘xG’.  This article will be my attempt to explain the key differences between eGF and other shot location based models.

Since I have never fully explained the process by which eGF was created (and how it’s calculated) publicly and I am so familiar with it I might gloss over some detail that others might find to be important – please feel free to ask any questions that you might have.

Before I go into detail about exactly how eGF is calculated I think it’s important to mention that I created my own scraper for my website.  The data, therefore, will not exactly match other sites like or but it should be very, very close.

The reason I created eGF is because the concept that all Corsi events are equal drives me crazy.  They are so obviously not equal, and players play the game (i.e. generate and receive Corsi events) in such vastly different manners that it’s insane (to me) to think that the difference in events ‘even out in the long run’.  So my first inclination was to include some kind of shot location metric in my eGF model to compensate for that.

I’m not going to post any charts showing that shot location matters.  If you’re familiar with the War-On-Ice HD SC metric or the concept of HD SV% vs MD SV% then you know that certain locations carry a higher shooting percentage – which is proof enough for me that shot location matters a great deal.  What I actually did was break the zone into 27 separate areas and then looked at SH% from each of those areas further broken down into shot type.  Each area/type was then given a score based on the conversion rate for that area.

Just that step, in my mind, made my model superior to Corsi in predicting current goals for.  That is to say, predicting how many goals these Corsi events should have led to if the shooter were average and the goalie was average.  I don’t have the data from just this step anymore – but it still didn’t feel right.  Hockey is a sport where there are so many moving parts that it just feels wrong to look at a particular instant in time (in this case a shot event) and pretend that we have really any idea about what’s going on in the game.  In fact, with the data provided in the NHL PbP file we have almost no knowledge about what’s going on in the game in any particular event.

Starting around 2010/2011 the NHL got much better about including X,Y (location) data with events.  They did it before, but it was more sporadic and generally less accurate (again this is an opinion that I am not going to substantiate).  But even with the better X,Y data – what information do we really have about any particular event from the PbP file? Pretty much just this:

  • Who did it (Acting Player)
  • Who he did it to (Receiving Player)
  • Event type (i.e. Face Off, Hit, Giveaway, Shot, etc)
  • Players on the ice (for both teams)
  • Possibly X,Y data
  • Various minor info on the event (shot type for example)
  • Time of the event

Really anyone who has watched a reasonable amount of hockey will tell you that is not enough information to make a fully educated decision about whether or not that play will lead to the desired result: a goal.  Basic logic will tell you that because we see higher shooting percentages (i.e. fewer chances required to score the same number of goals) in shootouts than in powerplays, which in turn have higher percentages than even strength play, that the position of defenders relative to attackers – or defender readiness versus attacker readiness – plays a key role in determining chance conversion.  This is a hypothesis that I will support later on, but you can clearly see from the info in the PbP for a single event that there is absolutely no way to create a proxy for defender readiness (until we get player tracking).  There is, however, a way to look at proxies for defender readiness if we chain the events together and view them as a play instead of a series of distinct and separate events.

Here is where the second key difference between my stats and most other publicly available stats come in.  All of the events in the database are (theoretically) identical, but my site views and publishes them as a series of plays.  You can link a series of events together as being “for” a team based on who had to control the puck in order for the event to occur.  For example, in order to generate a shot for then you must have the puck.  Similarly, to give the puck away you must have had it to start with.  So by following simple rules you can link plays together by assuming who has the puck and then analyze the events in the play to create a proxy for defender readiness.

So, just as Corsi was originally used as a proxy for possession – because the league doesn’t publish actual possession stats (i.e. time the puck is on a team’s stick) – eGF had to use proxies to determine team readiness.  These proxies are relatively simple to understand and are outlined below:

Proxy Logic
Length of Play The longer the attackers have the puck the longer defenders have to get into position.
Rebounds The somewhat random nature of rebounds means that both teams need to reposition in order to adjust for the next opportunity.  If that opportunity comes it is more likely that the defenders aren’t ready and therefore more likely to lead to a goal.
Rush If the play as a rush (i.e. you know it started in a particular zone and it changed to the attacking zone quickly) it is less likely that the defenders had a chance to get into position before the opportunity.
Giveaway/Takeaway Generally, teams don’t expect to have the puck cleanly taken from them and defenders will not be in an ideal position to react to these changes.
Face-Offs Contrary to the giveaway/takeaway, teams spend a great deal of time practicing face-off plays and know exactly where to go in the event of a win/loss.  It is therefore likely that team readiness is very high after a face-off.


Now all we need to do is prove that each of those proxies do in fact have some type of relationship with the conversion rate for goals and then we’ll know we have something.  Out of laziness I am just going to use single seasons for data illustration purposes.  You’ll have to trust me that each season tells the exact same story – or don’t trust me – it’s your choice really.

As an aside the process of writing this article has been very helpful to me – I immediately realized a mistake I made in the current iteration of eGF (v3) and have ideas on how to improve it for the future (v4).

So first let’s tackle length of play.  The mistake that I made is not in holding more variables constant in examining this (but when I did for v4 – which is not yet released – the relationship held true).  My theory is, the longer a play the harder it is to score.  This kind of flies in the face of conventional wisdom – which says that possession leads to goals.  While that’s true, when you bury your opponent in their end it becomes difficult to score:

20160108 Length  of Play

Basically, other than small sample weirdness, long plays don’t convert to goals anywhere near as often as quick ones do.  When you consider that longer plays must have more shots in them, this is a somewhat interesting relationship.  The next group we will tackle is the “play starting” group.  A play must start with either a face-off, a shot attempt against, a giveaway/takeaway, or with no data (because the PbP file is not perfect).  The below table illustrates the conversion rates for each group for the 2013/2014 season as compared to the 2011/2012 season (both chosen because it was easy for me to run those queries).

Play Start

The reason I’m not going to show every season is laziness.  The data is amazingly consistent season to season and illustrates that a) I wish we had better data (since no data is by far the most common play start) and b) how the play starts has a reasonable impact on the chance for that play to convert to a goal.  I also won’t bother going into rebound or rush work – since others have already proven that those are valuable contributors to determining conversion success.

Below, however, is a table that should give some idea (and backup to the idea that play length doesn’t improve conversion chance) about the importance of shot quantity in a play:


As you can see – the sample size gets relatively small as you get past 3 shots, but adding additional shots into the play does not necessarily improve the chance to score by much.  Which, if you think about for a minute means each additional shot lowers SH% and raises SV%.  The very interesting thing about this is in goaltender analysis – a Randy Carlyle coached team (for example) would have a very high expected SV% as they are more likely to have multi shot plays against.

                Again, in the interests of me not re-hashing work others have done – shot location matters a lot. Everyone knows it and everyone believes it – so I’m not going to go over it.  What I have shown though is that there are other factors which may also impact the chance that a play converts to a goal.  So, if you take the basic idea that WOI (and others) have of breaking the offensive zone down into areas – you can grade each shot location from 0 to 3 based on the odds that it converts to a goal (I have also done additional work on shot type by shot location which seems to make some difference) and then add in those other factors to get the overall quality of a single chance (or play).

All we need to do is design an algorithm that classifies chances appropriately based on the known quantities that we have (play start, length, shot locations, rush, and rebounds).  In effect, that’s all that eGF is, putting those factors into a black box and putting each chance into a bucket based on the (expected) odds that it will convert to a goal.  There are 6 buckets, 0 to 5, each with a different chance to convert to a goal.

For example, if you have a play that started with a takeaway, was a rush, contained a rebound, and at least one high quality shot – then that was likely a very high quality chance – probably a 5.  Conversely if you had a very long play that contained 4 or 5 shots from poor locations that was likely a very poor quality chance maybe a 1 or a 0.                 

Before I get to the actual data I have to add a very important caveat.  This assumes an average shooter shooting at an average goalie.  I think it makes no sense to include shooter (or goalie) quality in the calculation for eGF.  In an expected goals model you shouldn’t have the target of exactly matching GF – we already have a stat for that – GF!  What you are trying to do is find players who are putting themselves (or teammates) in good scoring positions while limiting opponent chances.  If you include shooter quality you immediately will find that the players with high historical SH% will be at or near the top of your eGF model all the time, while players who face them will have a higher eGA (all else equal).  To me that doesn’t help you learn about who is playing well or not – it’s basically like putting in a reverse QualComp measure – the harder your comp the worse your eGF% (all else equal)!

I’m just going to throw these charts at you and then explain them in more detail.  The first chart shows the total number of chances by chance quality in each NHL season since I feel there was reliable data (2010/2011), excluding 2015/2016 (mostly because I have these charts ready to go).

chance by quality april 3

The first thing you can see is that the absolute number of chances per season are relatively constant (by chance type, by season) and they tend to decrease in quantity as they progress.  The lock-out shortened season obviously has shorter bars since fewer games were played.  So, we’re doing well in showing that the vast majority of plays are just garbage where nothing much happens (Q0 and Q1).  The next chart is the absolute number of goals by chance quality by season.

goal by quality april 3

As you can see, despite the huge number of total chances in the Q0 and Q1 buckets, very few result in actual goals and again the absolute number per bucket is relatively constant in each season.  A massive number of the actual goals (>50% if memory serves) are the result of extremely good chances (Q4/Q5), despite the low total number of those types of chances.  The next chart outlines the conversion rates by quality by season.

goal conversion by quality april 3

Again the conversion rates are very steady on a season to season basis.  This is key in getting the model to work as you need some training data (in this case 2010/2011 to 2013/2014) to get it to work and then so long as the conversion rates are constant (or semi constant) going forward the model will continue to work.  It may need tweaks every once in a while – but it doesn’t rely on the season being finished and then going back over the data to correctly function.

So to recap to this point – basically we view each play as a whole rather than discrete events.  We then examine as many factors as we can to determine the overall quality of the chance and place that chance into a quality bucket (0 to 5).  We then have a very good idea of the conversion rate for each chance so we can count the number of chances each team (or player) had and multiply by the appropriate conversion rate to reach eGF.

Finally, to illustrate that it works better than Corsi or Shots (as applicable) I am going to show the comparative data for forwards and defensemen in the 2014/2015 season (which is outside my training set).  First the forwards, then the defense:

Forward GF

Defense GA

In the forwards’ case I used shots to explain GF instead of Corsi because it had a much higher R2 (0.7432 versus 0.68 something for Corsi).  For defensemen I used Corsi instead of shots because it had a slightly higher R2 (0.6855 versus 0.6844).

I’m sure I should have included all kinds of other comparisons, ultimately though, all of my data is available on my website and you can make any cross comparisons you want (i.e. team level – combined seasons, etc).  If you feel that I should show some other comparisons I’m also happy to do so – just send me a message on Twitter: @NickAbe.




4 thoughts on “eGF Finally Fully Explained”

  1. Cool stuff – hockey stats need to keep making incremental gains and moving from unweighted shots to an expected goals model is the best current avenue we have IMO.

    One question – when you say black box what learning algo are you using if you don’t mind sharing?

    1. It’s not a learning algo atm, my goal is to get it there in future iterations – but for now it is just a plain old algorithm based on the research. Shot location generally carries the highest weight.

Leave a Reply

Your email address will not be published. Required fields are marked *