After discovering SDQL I’ve been working to pick up the basics of the query language. Best to start with something easy and work up from there I figure, so the first question I wondered was:
How safe is a lead after each period in the NHL?
Using KillerSports.com as my source (the data goes back to 2006) and filtering for regular season only that answer seems to be: Pretty safe. Teams taking a lead of any kind into the first intermission win 75% of those games. If they hold a lead after two periods that winning percentage jumps to 85%. A 4+ goal lead at any point is a virtual lock, and contrary to popular opinion a one goal lead seems to be the “most dangerous” differential (unsurprisingly) with a winning percentage approx 5% below the “any lead” totals.
The results stack up like so:
Goal Diff / After Period | >0 | 1 | 2 | 3 | 4 | 5 |
---|---|---|---|---|---|---|
1st | 74.6% | 69.1% | 84.3% | 91.9% | 98.9% | 100% |
2nd | 84.8% | 75.4% | 90.7% | 97.1% | 99.4% | 100% |
Examples of the basic SDQL used to generate these results (updating the goal differential) was:
period scores[0] - o:period scores[0] = 1 and playoffs = 0
and:
(period scores[0] + period scores[1]) - (o:period scores[0] + o:period scores[1]) >= 0 and playoffs = 0
As I get more comfortable with SDQL I am hoping I can find some more insightful questions to answer, but this was a good “get your feet wet” first step.