Showing posts with label chess-hockey. Show all posts
Showing posts with label chess-hockey. Show all posts

Tuesday, June 12, 2018

Success randomness in chess

This is a surprising entry. It's not about hockey at all But maybe it's good to write surprising entries after a long silence like this. This post was inspired by the research of randomness in playoff results in four major sports that was discussed on Twitter between @StatsByLopez, @StatsInTheWild and @BaumerBen.

Chess is regarded as the least random sport, i.e. most frequently the top seeds succeed and the bottom seeds trail in the standings. Naturally, there is some randomness due to humans making errors as well as the error margins in seeding. But I decided to put this to test and to analyze the closest analogs of playoff competitions in chess: the Candidates competitions between 1950 and 1983 and the FIDE World Cup/KO championships between 1998 and 2017. From 1985 to 1997, due to the prolonged competition between Karpov and Kasparov at first, and the breakaway of Kasparov from FIDE later, the playoff competition systems were unstable and I decided to avoid them in this research. Maybe I'll take a deeper look and include them later.

I. Candidates Tournaments (1950-1983)
These were the events where most of the top chess players competed to determine who is going to challenge the World Champion. In these events there was no literal seedings, but we can assign seeds by the historical Elo ratings of chess player at the start of the event, as provided by the wonderful chess statistics site ChessMetrics. Naturally World Champion, most often ranked #1 in the world did not take part in the competition. 

Twelve tournaments were examined, and here are the outcomes for the top 4 placements at the end:

Seed placement in the top 4 finishers
Year # Pl System 1st 2nd 3rd 4th
1950 10 DRR 2 8 1 9
1953 15 DRR 2 6 7 1
1956 10 DRR 1 2 3 9
1959 8 QRR 1 4 3 2
1962 8 QRR 1 6 7 4
1965 8 P/O 2 1 7 5
1968 8 P/O 2 1 4 3
1971 8 P/O 1 4 3 2
1974 8 P/O 1 2 5 6
1977 8 P/O 1 8 3 7
1980 8 P/O 1 6 4 2
1983 8 P/O 1 5 4 6
Systems: DRR - Double Round-Robin. QRR - Quadruple Round-Robin. P/O 8-game or longer head-to-head matches.

In the knock-out playoff format, the opponent seedings were random rather than rating based!

Now if we find the average value of seeds, there are quite big surprises both ways!

Place1st2nd3rd4th
Avg. seed1.334.414.254.25


The value for the column "1st", i.e. for winners is outrageously, uber-surprisingly good. Average seed of 1.33 means 2/3 of the time the top seed won the competition and the remainder of the time the 2nd seed won it. By the way the first seed never finished outside top 4 (8 wins, twice runner-up and once for 3rd and 4th each). That indicates a minimal randomness in the outcome. But then baffling is the average seed taking second place: 4.41, almost completely random, bigger than both average seed for 3rd and 4th places. For myself I haven't any good explanation that would stem from the game theory, so I'll leave this exercise to my readers.

II. World Knock-out tournaments (1998-2017)
At the end of the 1990s the World Chess Federation (FIDE) tried a completely new format: 128 (in the first three editions - 100) players who qualify through various criteria, played a massive 7-round playoff tournament, with most of the rounds consisting of just two games (rapid and blitz tiebreaks if necessary), and only the final stages were played as longer matches - and even these matches became shorter as the tournament developed. The tournament was serving as a World Championship between 1998 and 2004, and as a World Cup (a World Championship qualifier) since 2005.

Although quite frequently some of the top players in the World (sometimes more than a half of the actual top 10) did not take part in the event, the stability of the seedings was ensured because all the 100 or the 128 participants were ranked by their Elo ratings prior to the event.

The summary, similar to the table posted above, turns out like this:

Seed placement in the top 4 finishers
Year # pl 1st 2nd 3rd 4th
1998 100 2 9 18 8
1999 100 36 31 46 5
2000 100 1 4 3 46
2002 128 19 4 15 1
2004 128 28 3 1 18
2005 128 3 9 2 4
2007 128 11 5 17 10
2009 128 1 7 22 12
2011 128 9 6 2 4
2013 128 3 21 23 32
2015 128 11 16 26 4
2017 128 5 11 8 2
We immediately see the high element of randomness in the top placements. In the years 1999 and 2000 46th seed out of 100 made it twice into the semifinals! The average seed summary table comes out as following:

Place1st2nd3rd4th
Avg. seed10.7510.515.2512.17


Interestingly, both the consistency and the inconsistency of the part I (extremely predictable winner and rather random runner-up) disappear. A top 20 player is expected to either win or to finish second, and the semifinalists are expected to be not very much lower seeded. It is once again confirmed, that the length of the series between two competitors is key to eliminate randomness.

 However, the average seed as runner-up in the 1950-1983 Candidates remains a mystery to me.

Tuesday, February 27, 2018

Website - A Page A Day, Part VII - Buchholz and Sonneborn-Berger

Prologue
Part I
Part II
Part III
Part IV
Part V
Part VI (I need to make a table of contents entry)

This might be the best possible timing for revisiting this page.

We are now past the first section of the website, 'League', and onto the second and probably the richest one - 'Teams'. It opens with Buchholz and Sonneborn-Berger coefficients for the teams.

And why is the timing the best? Because I am going to give a lightning talk about this at the VANHAC 2018!

Actually I already blogged about these two before, so now only a brief recap will follow with a couple of examples:

1. The Buchholz coefficient

The Buchholz coefficient is simply the sum of the points of your opponents.

B = Σn=1N Pn

So, if you played five games, and your opponents currently have 5, 3, 8, 6 and 6 points, your Buchholz value will be 28. Please note, that the current number of points is always used, not the number of points at the moment of meeting. The outcome of the game does not matter (for that one see the Sonneborn-Berger).

 the Buchholz coefficient can clearly show, who has had the stronger opposition up until a certain moment.

Then, if we look at the remainder of the schedule for each team, and for every game we add the opponent's points we get an excellent remaining schedule strength estimator.

Wait... there's a caveat.

Unlike in a chess tournament, where every round occurs for everyone at the same time, and barring very rare circumstances, every participant played an equal amount of games at any point of the tournament, there may be a significant difference in the number of games played by different teams, so summing the opponents up will not work very well. And these opponents also played a different number of games, so their total amount of points is not a very good indicator.

Fortunately, it's not a big deal. Instead of totals, let's operate with per-game numbers. So the NHL Buchholz Coefficient for a team after N games becomes:

B = (Σn=1N PPGn)/N. 

Same applies for the remaining schedule strength, where the per-game numbers of the remaining opposition are summed an averaged.

So, if the team played three games against opponents who currently are:
A) 6 points in 4 games, B) 3 points in 3 games, C) 2 point in 5 games, then the team's Buchholz value would be (6/4 + 3/3 + 2/5) / 3 = 2.9/3 ~ 0.967pts.

Here are the Mar 12th 2017 Buchholz coefficients and remaining schedule strengths for the entire 30 times (and note how the Blues stand out with plenty of matchups vs Colorado and Arizona remaining).

+-----------------------+-----------+-------+-------+
| Team Name             | PPG       | Buch  | RStr  |
+-----------------------+-----------+-------+-------+
| Washington Capitals   | 1.4179105 | 1.119 | 1.133 |
| Pittsburgh Penguins   | 1.4029851 | 1.117 | 1.127 |
| Minnesota Wild        | 1.3939394 | 1.090 | 1.070 |
| Columbus Blue Jackets | 1.3731343 | 1.125 | 1.132 |
| Chicago Blackhawks    | 1.3283582 | 1.088 | 1.096 |
| San Jose Sharks       | 1.2985075 | 1.106 | 1.106 |
| New York Rangers      | 1.2941176 | 1.120 | 1.184 |
| Ottawa Senators       | 1.2537313 | 1.105 | 1.169 |
| Montreal Canadiens    | 1.2352941 | 1.122 | 1.097 |
| Edmonton Oilers       | 1.1791044 | 1.121 | 1.040 |
| Anaheim Ducks         | 1.1764706 | 1.102 | 1.150 |
| Calgary Flames        | 1.1764706 | 1.099 | 1.140 |
| Boston Bruins         | 1.1470588 | 1.115 | 1.151 |
| Toronto Maple Leafs   | 1.1343284 | 1.114 | 1.150 |
| Nashville Predators   | 1.1323529 | 1.105 | 1.116 |
| St. Louis Blues       | 1.1194030 | 1.144 | 0.943 |
| New York Islanders    | 1.1194030 | 1.142 | 1.103 |
| Tampa Bay Lightning   | 1.0895522 | 1.121 | 1.134 |
| Los Angeles Kings     | 1.0746269 | 1.118 | 1.104 |
| Philadelphia Flyers   | 1.0447761 | 1.122 | 1.179 |
| Florida Panthers      | 1.0298507 | 1.118 | 1.175 |
| Carolina Hurricanes   | 1.0000000 | 1.138 | 1.136 |
| Buffalo Sabres        | 0.9855072 | 1.127 | 1.158 |
| Winnipeg Jets         | 0.9565217 | 1.110 | 1.143 |
| Vancouver Canucks     | 0.9558824 | 1.115 | 1.152 |
| Dallas Stars          | 0.9552239 | 1.119 | 1.100 |
| Detroit Red Wings     | 0.9545455 | 1.151 | 1.059 |
| New Jersey Devils     | 0.9117647 | 1.148 | 1.132 |
| Arizona Coyotes       | 0.8358209 | 1.133 | 1.098 |
| Colorado Avalanche    | 0.6119403 | 1.128 | 1.164 |
+-----------------------+-----------+-------+-------+

2. The Sonneborn-Berger coefficient.
This stranger beast is a metric extensively used for tie-breaks in chess-round robins and as an auxiliary tie-break tool to the Buchholz coefficient in non-round robin. Let's start with the definition.

$$SB = Σ↙{n=1}↖N f(R_n,P_n)$$

where Rn is the result against the n-th opponent, and Pn is the opponent's points score.
The function  f(Rn, Pn) in the NHL is defined as:

f(Win, Pn) = Pn/N
f(OW, Pn)  = 2*Pn/(N*3)
f(OL, Pn)  = Pn/(N*3)
f(L, Pn)   = 0
where N is the number of games by that opponent

to account for the overtime point.

Then, we can calculate the minimal possible SBmin value for a team with the given schedule so far this season, by assigning Wins to be against the weakest teams played, and the OW/OL against the weakest remainder until the sum of W, OW and OL points add up to the number of points the team currently has.

Similarly we shall calculate the maximal possible SBmax value by assigning Wins to be against the strongest teams played, and the OW/OL against the strongest of the remainder, assuming OT wins are about 1/4 of the whole.

Then the closer the actual SB is to the SBmin or SBmax we may be able to say whether the team is successful more against the bottom feeders, the top guns, or whether it achieves its points from the whole spectrum available.

Here is the table describing how teams had their SB positioned between SBmin and SBmax. on 03/12/2017, multiplied back by the number of games of each team for better visibility:

TeamPointsSBminSBoptSBSBmax
Pittsburgh Penguins1.4044.2846.4846.2453.06
Washington Capitals1.4044.7046.7447.7752.89
Minnesota Wild1.3742.2544.3646.6350.66
Columbus Blue Jackets1.3743.1045.3646.4452.15
Chicago Blackhawks1.3441.6143.9043.7950.80
San Jose Sharks1.3140.6842.9744.1649.84
New York Rangers1.3041.2543.6745.5550.92
Ottawa Senators1.2537.8440.0741.7946.78
Montreal Canadiens1.2539.3741.7441.0548.87
Anaheim Ducks1.1936.8639.4340.1247.15
Calgary Flames1.1835.9738.4938.2046.05
Edmonton Oilers1.1635.8638.3237.4345.70
Boston Bruins1.1534.7337.2337.7444.72
Nashville Predators1.1333.2836.1438.0444.72
Toronto Maple Leafs1.1334.6436.9935.6644.02
St. Louis Blues1.1234.6937.1438.5244.50
New York Islanders1.1234.3636.9437.9444.71
Tampa Bay Lightning1.0932.6234.9835.4142.06
Los Angeles Kings1.0732.1034.6633.5642.34
Philadelphia Flyers1.0431.2633.5632.0140.48
Florida Panthers1.0330.8933.1230.9539.82
Carolina Hurricanes1.0029.4331.7832.4138.85
Buffalo Sabres0.9930.0932.4933.4339.68
Winnipeg Jets0.9627.5530.3531.4838.75
Vancouver Canucks0.9628.4830.9129.0238.21
Dallas Stars0.9428.0530.6231.1638.34
Detroit Red Wings0.9429.1231.1230.0237.13
New Jersey Devils0.9127.7830.1528.6337.27
Arizona Coyotes0.8425.1327.2425.8633.56
Colorado Avalanche0.6117.9019.7419.9825.25

Once again, we use Point Per Game values because the teams and their opponents have a different number of games played at most of the moments within a season.

We would dare to make one more step forward and claim that the team that performs closer to SBmax seem to have a coach problem (notable differences highlighted in green in the table above). The roster is there to compete against the best, but the points aren't trickling in at a pace goo

Sunday, May 28, 2017

Last features - and a summer freeze

During the month of May I added two new features for the website, naturally dedicated to the upcoming draft:

Draft Pick Stats
Draft Pick Success

Now it's time to step back, look around and improve the infrastructure behind the website, both in the matter of the collection and the publication of the data. Thanks to all the visitors both of this blog and of the website.

I will continue to publish my predictions for the remainder of the playoff games on Twitter - follow me @morehockeystats! You are also most welcome to send me your ideas for new unusual statistics.

So the projected plan for the summer months is:
June - improve and finally release the Perl scraper
July - improve the publishing mechanism for the website and speed it up
August - improve the Elo-based models behind the site's projections
September - add some new features

This blog is on no pause! I will continue to publish entries about my hockey-related thoughts as they come. Stay tuned!

Monday, March 13, 2017

On Buchholz and Sonneborn-Berger coefficients - Part II

Part I

2. The Sonneborn-Berger coefficient.
This stranger beast is a metric extensively used for tie-breaks in chess-round robins and as an auxiliary tie-break tool to the Buchholz coefficient in non-round robin. Let's start with the definition.

$$SB = Σ↙{n=1}↖N f(R_n,P_n)$$

where Rn is the result against the n-th opponent, and Pn is the opponent's points score.
The function  f(Rn, Pn) is defined as:

f(Win, Pn)  = Pn
f(Tie, Pn)  = Pn/2
f(Loss, Pn) = 0

The result value evaluates whether the participant performed better against stronger and weaker opposition. Actually, I do have a problem with this criteria as a tie-breaker, in my opinion ALL points are created equal, and it doesn't matter if they came from a contender or a bottom feeder. However, this metric does answer the notorious statements like "This team only shows up for big games" and "This team is only good against garbage opposition."

So, first of all, for the NHL application, we will modify the function f(Rn, Pn) to:

f(Win, Pn) = Pn
f(OW, Pn)  = 2*Pn/3
f(OL, Pn)  = Pn/3
f(L, Pn)   = 0

to account for the overtime point.

Then, we can calculate the minimal possible SBmin value for a team with the given schedule so far this season, by assigning Wins to be against the weakest teams played, and the OW/OL against the weakest remainder until the sum of W, OW and OL points add up to the number of points the team currently has.

Similarly we shall calculate the maximal possible SBmax value by assigning Wins to be against the strongest teams played, and the OW/OL against the strongest of the remainder, assuming OT wins are about 1/4 of the whole.

Then the closer the actual SB is to the SBmin or SBmax we may be able to say whether the team is successful more against the bottom feeders, the top guns, or whether it achieves its points from the whole spectrum available.

Here is the table describing how this season's teams have their SB positioned between SBmin and SBmax.

Team Points SBmin SBopt SB SBmax
Pittsburgh Penguins 1.40 44.28 46.48 46.24 53.06
Washington Capitals 1.40 44.70 46.74 47.77 52.89
Minnesota Wild 1.37 42.25 44.36 46.63 50.66
Columbus Blue Jackets 1.37 43.10 45.36 46.44 52.15
Chicago Blackhawks 1.34 41.61 43.90 43.79 50.80
San Jose Sharks 1.31 40.68 42.97 44.16 49.84
New York Rangers 1.30 41.25 43.67 45.55 50.92
Ottawa Senators 1.25 37.84 40.07 41.79 46.78
Montreal Canadiens 1.25 39.37 41.74 41.05 48.87
Anaheim Ducks 1.19 36.86 39.43 40.12 47.15
Calgary Flames 1.18 35.97 38.49 38.20 46.05
Edmonton Oilers 1.16 35.86 38.32 37.43 45.70
Boston Bruins 1.15 34.73 37.23 37.74 44.72
Nashville Predators 1.13 33.28 36.14 38.04 44.72
Toronto Maple Leafs 1.13 34.64 36.99 35.66 44.02
St. Louis Blues 1.12 34.69 37.14 38.52 44.50
New York Islanders 1.12 34.36 36.94 37.94 44.71
Tampa Bay Lightning 1.09 32.62 34.98 35.41 42.06
Los Angeles Kings 1.07 32.10 34.66 33.56 42.34
Philadelphia Flyers 1.04 31.26 33.56 32.01 40.48
Florida Panthers 1.03 30.89 33.12 30.95 39.82
Carolina Hurricanes 1.00 29.43 31.78 32.41 38.85
Buffalo Sabres 0.99 30.09 32.49 33.43 39.68
Winnipeg Jets 0.96 27.55 30.35 31.48 38.75
Vancouver Canucks 0.96 28.48 30.91 29.02 38.21
Dallas Stars 0.94 28.05 30.62 31.16 38.34
Detroit Red Wings 0.94 29.12 31.12 30.02 37.13
New Jersey Devils 0.91 27.78 30.15 28.63 37.27
Arizona Coyotes 0.84 25.13 27.24 25.86 33.56
Colorado Avalanche 0.61 17.90 19.74 19.98 25.25

Once again, we use Point Per Game values because the teams and their opponents have a different number of games played at most of the moments within a season.

We would dare to make one more step forward and claim that the team that performs closer to SBmax seem to have a coach problem (notable differences highlighted in green in the table above). The roster is there to compete against the best, but the points aren't trickling in at a pace good enough against the fodder. Similarly, if the SB value is closer to SBmin is more likely to have a GM problem (notable differences highlighted in blue in the table above), that its roster is not good enough to compete, but the coach is able to squeeze close to the maximum out of it. However, it is natural to win more games against the weaker teams, so we set the balance point at SBopt = (SBmax + 3*SBmin) / 4;

Wrapping up the talk about the Buchholz and the Sonneborn-Berger coefficients we would like to state that these values have an almost entirely descriptive value and without any predictive capability, with a small exception of the Buchholz-based remaining schedule strength metric. And even then, it's sort of a 'descriptive prediction'.

Please see more Buchholz and Berger-Sonneborn data on the website!

Sunday, March 12, 2017

On Buchholz and Sonneborn-Berger coefficients.


The practice of chess tournaments provides two traditional metrics that are used to rank participants beyond their mere scoring. Their names are the Buchholz coefficient and the Sonneborn-Berger coefficient (often called just Berger). They are frequently used as tie-breakers in chess events, however I arrived to completely different application for them for the National Hockey League seasons.

1. The Buchholz coefficient

The Buchholz coefficient is simply the sum of the points of your opponents.

B = Σn=1N Pn

So, if you played five games, and your opponents currently have 5, 3, 8, 6 and 6 points, your Buchholz value will be 28. Please note, that the current number of points is always used, not the number of points at the moment of meeting. The outcome of the game does not matter (for that one see the Sonneborn-Berger).

At first, the usefulness of such a criteria would prompt a raise of the eyebrow. However, it's not used in round-robin all-play-all tournaments as a final tie-break, because, naturally, the coefficient would be the same for all tied parties. It's used in a special format of chess events called the Swiss Tournament, not very popular outside of the realm of board games for purely logistic reason. But then, consider, first, an NFL season. The list of opponents every team plays there over the 16-game season may be quite different. And, whoever would end up with a larger Buchholz coefficient, clearly would've had stronger opposition on the way.

Now let's go back to hockey. First of all, at the end of the season, although everyone has played everyone, they did so a different number of times. Thus, the sum of opponents' points at the end of the season could be different between teams - including within the same division, if they had a different schedule. So, this could still be a very valid tiebreak. Secondly, the season is so long (82 games, unlike a chess Swiss which is rarely longer than 11 rounds), and that gives us a lot of midway points in time, when the all-play-all has not been completed yet! Here the Buchholz coefficient can clearly show, who has had the stronger opposition up until a certain moment.

Then, if we look at the remainder of the schedule for each team, and for every game we add the opponent's points we get an excellent remaining schedule strength estimator.

Wait... there's a caveat.

Unlike in a chess tournament, where every round occurs for everyone at the same time, and barring very rare circumstances, every participant played an equal amount of games at any point of the tournament, there may be a significant difference in the number of games played by different teams, so summing the opponents up will not work very well. And these opponents also played a different number of games, so their total amount of points is not a very good indicator.

Fortunately, it's not a big deal. Instead of totals, let's operate with per-game numbers. So the NHL Buchholz Coefficient for a team after N games becomes:

B = (Σn=1N PPGn)/N. 

Same applies for the remaining schedule strength, where the per-game numbers of the remaining opposition are summed an averaged.

So, if the team played three games against opponents who currently are:
A) 6 points in 4 games, B) 3 points in 3 games, C) 2 point in 5 games, then the team's Buchholz value would be (6/4 + 3/3 + 2/5) / 3 = 2.9/3 ~ 0.967pts.

Here are the current (Mar 12th 2017) Buchholz coefficients and remaining schedule strengths for the entire 30 times (and note how the Blues stand out with plenty of matchups vs Colorado and Arizona remaining).

+-----------------------+-----------+-------+-------+
| Team Name             | PPG       | Buch  | RStr  |
+-----------------------+-----------+-------+-------+
| Washington Capitals   | 1.4179105 | 1.119 | 1.133 |
| Pittsburgh Penguins   | 1.4029851 | 1.117 | 1.127 |
| Minnesota Wild        | 1.3939394 | 1.090 | 1.070 |
| Columbus Blue Jackets | 1.3731343 | 1.125 | 1.132 |
| Chicago Blackhawks    | 1.3283582 | 1.088 | 1.096 |
| San Jose Sharks       | 1.2985075 | 1.106 | 1.106 |
| New York Rangers      | 1.2941176 | 1.120 | 1.184 |
| Ottawa Senators       | 1.2537313 | 1.105 | 1.169 |
| Montreal Canadiens    | 1.2352941 | 1.122 | 1.097 |
| Edmonton Oilers       | 1.1791044 | 1.121 | 1.040 |
| Anaheim Ducks         | 1.1764706 | 1.102 | 1.150 |
| Calgary Flames        | 1.1764706 | 1.099 | 1.140 |
| Boston Bruins         | 1.1470588 | 1.115 | 1.151 |
| Toronto Maple Leafs   | 1.1343284 | 1.114 | 1.150 |
| Nashville Predators   | 1.1323529 | 1.105 | 1.116 |
| St. Louis Blues       | 1.1194030 | 1.144 | 0.943 |
| New York Islanders    | 1.1194030 | 1.142 | 1.103 |
| Tampa Bay Lightning   | 1.0895522 | 1.121 | 1.134 |
| Los Angeles Kings     | 1.0746269 | 1.118 | 1.104 |
| Philadelphia Flyers   | 1.0447761 | 1.122 | 1.179 |
| Florida Panthers      | 1.0298507 | 1.118 | 1.175 |
| Carolina Hurricanes   | 1.0000000 | 1.138 | 1.136 |
| Buffalo Sabres        | 0.9855072 | 1.127 | 1.158 |
| Winnipeg Jets         | 0.9565217 | 1.110 | 1.143 |
| Vancouver Canucks     | 0.9558824 | 1.115 | 1.152 |
| Dallas Stars          | 0.9552239 | 1.119 | 1.100 |
| Detroit Red Wings     | 0.9545455 | 1.151 | 1.059 |
| New Jersey Devils     | 0.9117647 | 1.148 | 1.132 |
| Arizona Coyotes       | 0.8358209 | 1.133 | 1.098 |
| Colorado Avalanche    | 0.6119403 | 1.128 | 1.164 |
+-----------------------+-----------+-------+-------+

In tne next installment we're going to talk about the application of the Sonneborn-Berger coefficient to the NHL regular season.


Wednesday, January 4, 2017

A small digression - about bye weeks.

One of the greatest chess methodologists, if not the greatest one, the sixth World Champion, Mikhail Botvinnik, wrote in one of his books (about the 1948 World Chess Championship Tournament):

A tournament must go on a uniform schedule, so that the participants would get used to a certain pace of competition. ...

The Dutch organizers neglected that. They didn't take into account that plenty of free days (because of the holidays, and because the number of the participants was odd) may break that rhythm and take the participant out of the equilibrium.

When I found out that one of the participants is going to "rest" for six days before the last gameday of the second round, I suggested to my colleagues Mr. Keres and Mr. Smyslov that we would submit a protest together. Alas, they didn't support me! Angrily, I told them then: "You'll see, one of us is going to rest six days in a row at the Hague, and on the seventh day he'll lose without putting up any resistance..."

And here came true the first part of my prophecy: after the six-day rest, Keres, pale as a sheet, sat at the chess table across from me, worrying, probably, that the second part of it will also come true...

Keres lost a rather short and lopsided game.

Saturday, December 31, 2016

On Players Evaluation - Part III (Teams Elo)




Sherlock Holmes and Dr. Watson are camping in the countryside.
In the middle of the night Holmes wakes up Watson:
'Watson, what do you think these stars are telling us?
'Geez, Holmes, I don't know, maybe it's going to be a nice weather tomorrow?
'Elementary, Watson! They are telling us our tent has been stolen!

Iconic Soviet joke.

Estimating a hockey player via Elo ratings is a highly complex task. Therefore, we shall wield the dialectic approach of getting from the simpler to the more complicated, and will tackle a seemingly simplistic task first. Let's work out the Elo ratings for the NHL teams as a whole first. After all, it's the teams who compete against each other, and the outcome of this competition is a straightforward result.

So, let's examine a match between Team A and Team B. They have ratings Ra and Rb. These ratings, or, more precisely, their difference Ra-Rb, defines the expected results Ea and Eb on the scale from 0 to 1. The teams play, one wins (S=1), another loses (S=0). To adapt this to the Elo scale, let's consider win 1 point, loss 0 point. The new ratings Ra' and Rb' will be (K is the volatility coefficient):

Outcome
Sa
Sb
Sa-Ea
Sb-Eb
dRa
dRb
Ra'
Rb'
Team A Wins
1
0
1-Ea
-Eb
K-K*Ea
-K*Eb
Ra+K-K*Ea
Rb-K*Eb
Team B Wins
0
1
-Ea
1-Eb
-K*Ea
K-K*Eb
Ra-K*Ea
Rb+K-K*Eb

and the teams are ready for usage in the next meeting with their new ratings Ra' and Rb', reciprocally.

'Wait!', will ask the attentive reader, 'Not all possible outcomes are listed above! What about the OT/SO wins where both teams get some points.' And he will be correct. In these cases we must admit that the loser team scores 0.5 points, so unlike a chess game where the sum of the results is always 1, in the NHL hockey the total sum of results varies and can be either 1 or 1.5. Note, were the scoring system 3-2-1-0, then we could scale the scores by 3 rather than by two and get the range 1-⅔-⅓-0 where every result sums to 1. Alas, with the existing system we must swallow the ugly fact that the total result may exceed 1, and as the result the ratings get inflated. Which is a bad thing, sure.

Or is it? Remember, the Elo expectation function only cares about the differences between ratings, not their absolute values. And all teams' ratings get inflated, so all absolute values shift up from where they would've been without the loser's point. Whom would it really hurt? The new teams. Naturally, we must assign an initial rating to every team at the starting point. One way could be assigning the average rating of the previous season to the new team. But we prefer a different and a much more comprehensive solution. We claim that since the teams that at the start of the next season are different enough beasts from those that ended the previous ones, so that the Elo ratings should not carry over from season to season at all! Therefore all the teams start each season with a clean plate and an identical Elo rating Ro.

Once again, the attentive reader might argue, 'What about mid-season trades and other movements?' Well, dear reader, now you have a tool to evaluate impact of the moves on the team. If there is a visible tendency change, you can quite safely associate it with that move. Overall, the 82 game span is huge to soften any bends and curves in the progression of the Elo ratings along the season.

Speaking of game spans, we must note one more refinement being done to the ratings. In the chess world, the ratings of the participants are not updated throughout the length of the event, which is usually 3-11 games. The ratings of the participants are deemed constant for the calculation of rating changes, which accumulate, and the accumulation is actually the rating change of each participant. We apply a similar technique for the teams' Elo calculations: we accumulate the changes for the ratings for 5 games for each team and "commit" the changes after the five-game span. The remainder of the games is committed regardless of its length, from 1 to 5. Why 5? We tried all kinds of spans, and 5 gave the smoothest look and the best projections.

Now, as a demonstration, let's show how we calculate the possible rating changes in the much anticipated game where Minnesota Wild is hosting Columbus Blue Jackets on December, 31st, 2016:

Rcbj = 2250, Rmin = 2196, Ecbj = 0.577, Emin = 0.423, K = 32 (standard USCF).

Outcome
Scbj
Smin
S-Ecbj
S-Emin
dRa
dRb
Ra'
Rb'
CBJ W Reg
1
0
0.423
-0.423
+13.53
-13.53
2263.53
2182.47
CBJ W OT
1
0.5
0.423
0.077
+13.53
+2.47
2263.53
2198.47
MIN W OT
0.5
1
-0.077
0.577
-2.47
+18.47
2247.53
2214.47
MIN W Reg
0
1
-0.577
0.577
-18.47
+18.47
2231.53
2214.47
Note: MIN gains rating when it gets a loser's point.

Here is a dynamic of Elo changes (without five game accumulation) for the Metropolitan Division, as an example.


See more detailed tables on our website: http://morehockeystats.com/teams/elo

Ok, we got the ratings, we got the expected results, can we get something more out of it?

To be continued...

Happy New Year to everyone!

Wednesday, December 28, 2016

On Players Evaluation - Part II (Elo)


Part I.

The Elo rating system is the system used for evaluation and comparison of competitors. Up until today it's been mostly applied in the domain of board games, most well-known in chess, but also in disciplines such as draughts or go. The Elo system, named after its inventor, Prof. Arpad Elo, who first published it in the 1950s in the US, is capable to produce a reliable score expectation for an encounter between two competitors who oppose each other.

For those who are not familiar with chess or draughts, let's take a look on how the Elo ratings work:

1) In an encounter between two competitors, A and B, assume they have ratings Ra and Rb.

2) There is a function that maps the expected result for each player given the opponent:
Ea = F(Ra, Rb)
Eb = F(Rb, Ra)
where F is a monotonic non-decreasing function bounded between minimum and maximum possible scores, such as 0 and 1 in chess. An example for such a function would be arctan(x)/π + 0.5 .

Ea+Eb should be equal to maximum possible score.

In practice a non-analytical table-defined function is used that relates only on the difference between Ra and Rb, and not their actual values. The function can be reliably approximated by the following expression:
E = 1 / [ 1 + 10(Rb-Ra) / 400 ]

which works well with ratings in low 4-digit numbers and rating changes per game in 0-20 range.


3) After the encounter, when real scores Sa and Sb have been registered, the ratings are adjusted:
Ra1 = Ra + K*(Sa-Ea)
Rb1 = Rb + K*(Sb-Eb)
Where K is a volatility coefficient, which is usually higher for participants with shorter history, but ideally it should be equal for both participants. The new ratings are used to produce the new expected results and so on.

The Elo rating has several highly important properties:

1) It gravitates to the center. As rating R of a participant climbs higher, so does the expected result E, which becomes difficult to maintain, and a failure to maintain it usually results in a bigger drop in the rating.

2) It's approximately distributive. If we gather N performances and average the opponents as Rav, the expected average performance as Eav = F(Ra, Rav), and the actual performance as Sav, then the new rating RaN' = Ra + N*K*(Sav-Eav) will be relatively close to RaN obtained via direct Ra reciprocal update after each of the N games.

3) It reflects tendencies, but overall performance still trumps it. Given the three players with ten encounters against other players with the same rating, when the performances are (W - win, L - loss):

For player 1: L,L,L,L,L,W,W,W,W,W
For player 2: L,W,L,W,L,W,L,W,L,W
For player 3: W,W,W,W,W,L,L,L,L,L

player 1 will end up with the highest rating of the three, player 2 will be in the middle, and player 3 will have the lowest one - but not by a very big margin. Only when the streaks become really long the Elo of a lower performance may overcome the Elo of a higher one.

And how does Elo stack against the four Brits?

* Goodhart's Law: pass. It measures the same thing it indicates.
* Granger's Causality: pass. It is a consequence of a performance by definition, and a prediction of future peformance, by definition.
* Occam's Razor: pass. The ratings revolve around the same parameter they measure.
* Popper's Falsifiability: partial pass. The predictions of Elo sometimes fail, because they are probabilistic. However, the test of time and the wide acceptance indicate that the confidence level holds. Elo was even used for "paleostatistics" when the ratings were calculated backwards until middle XIX century, and the resulting calculations are well-received by the chess historians' community.

The only well-known drawback of Elo is the avoidance by top chess players of competition against much weaker oppositions, especially when facing White, as such a game can be drawn relatively easily by the opponent, and the Elo rating of the top player could take a significant hit resulting in a drop of several places in the rating list.

Now, to the question of the chicken and the egg - where do the initial Elo ratings come from? Well, they can be set to an arbitrary value of low 4-digit number. Currently a FIDE beginner starts with the rating of 1300. If the newcomer is recognized as being more skilled than a beginner, then a higher rating is assigned based on rating grades for each skill level, sort of an historical average of the newcomer's peers.

And... What does all this have to do with hockey?

To be continued...



Friday, December 23, 2016

On The NHL Scoring System (Part II)

Part I.

Goodhart's law is the bane, the safeguard and the watchdog of everyone who tries to make conclusions from sample data. The "Schroedinger Cat of Social Sciences" practically says, if you want people to do X, but you reward them for doing Y, they will be doing Y rather than X. We start seeing that in the "possession analytics", based on shots taken, that the players begin to shoot from everywhere to get their possession ratings up. But we digress - the topic is the scoring system, we'll save that note for another blog entry.

We want the NHL hockey to be spectacular. That's the main objective (beyond being fair and competitive, otherwise look for Harlem Globetrotters). In the past the spectacular was fighting as much scoring and winning games, but that taste of the public changed, and the fighting went away. It was not directly related to scoring and winning, it was just an extra free show provided.

Now we're left with scoring and winning. These two are closely tied, and not necessarily as a positive feedback, since not allowing your opponent to score also helps winning. A 2-1 win is practically just as valuable as a 7-2. So in the mid-2000s, the winning objective, the points objective took over the scoring objective. And from the previous post we see that the existing 2-2-1-0 points system encourages low-intensity game preferably slipping into the OT. On the other hand we also noted that the 3-2-1-0 points system would encourage teams to clamp down and protect their minuscule leads. Looks like a circle to break...

Well, here comes Goodhart's law. You want teams to score, or at least try to score, but you reward them for achieving points. So what they do is concentrate on getting points. Therefore, if the NHL want to see score-oriented hockey, the NHL needs to reward scoring, and not points. Still, the points have been used to determine playoff spots, so something has to give.

First, let's take a wild ride by suggesting that we rank teams by the amount of goals scored. That would lead to a pretty drastic change and the end of hockey as we know it. This will lead to situations where a team might play for a period without a goaltender in a playoff race. In general, the goaltending position will deteriorate, and aren't we loving the spectacular saves just as we love slick goals? Probably, that would be too much.

Thus, we can mitigate to allow the goal differential to be the ranking criteria. At the end of the season, the teams with the higher goal differentials will be ranked at the top, and the wins-ties-losses, well, they get relegated to tie-breaks. The incentive to score rather than to hold the opponent increases, because while now the competitors in their games cannot score more than two points, they still can score a bigger goal differential! All the lazy skating to finish the game after it's 4-0 or 5-1? Gone.

This idea is actually not novel. It's been used for a long while in team chess tournaments. Such tournaments consist of matches, where each player of one team plays against an opponent of the opposing team at the same time. Each player's individual score (win, draw or loss) is accumulated into the total score. So a match of 8-player teams, where one team had 5 wins, 1 draw and two losses ends up with 5.5-2.5 score, essentially "the goal differential". At the end of the tournament, the scores accumulate, and the teams are ranked according to them. You can see the crosstables of historical chess tournaments at the wonderful Olimpbase website.

And if you feel that the fact of winning or losing the game should be have more weight than just a tie-break (by the way, there will be less tie-breaks on goal differential), that is easy to factor in, just add a bonus "goal" to the winner, like it is done in the shootout now. Better, add two bonus "goals" for winning in regulation, one bonus "goal" for winning in the OT, abolish shootouts.