<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Jakim Berndsen on Medium]]></title>
        <description><![CDATA[Stories by Jakim Berndsen on Medium]]></description>
        <link>https://medium.com/@jakimberndsen?source=rss-f2c8d192e3dd------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*b52PclV7amjHmg3T.jpg</url>
            <title>Stories by Jakim Berndsen on Medium</title>
            <link>https://medium.com/@jakimberndsen?source=rss-f2c8d192e3dd------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 06 Dec 2026 00:02:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jakimberndsen/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[What Might Have Happened: Women’s EY Hockey League]]></title>
            <link>https://medium.com/@jakimberndsen/what-might-have-happened-womens-ey-hockey-league-55f94714e23?source=rss-f2c8d192e3dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/55f94714e23</guid>
            <category><![CDATA[field-hockey]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[sports-predictions]]></category>
            <dc:creator><![CDATA[Jakim Berndsen]]></dc:creator>
            <pubDate>Sat, 28 Mar 2020 15:46:25 GMT</pubDate>
            <atom:updated>2020-03-28T16:19:27.517Z</atom:updated>
            <content:encoded><![CDATA[<p>Following on from <a href="https://medium.com/@jakimberndsen/what-might-have-happened-mens-ey-hockey-league-708b6b8514d4">yesterday’s post</a>, where we predicted the remaining fixtures of the men’s EY Hockey League, we attempt to simulate the outcomes of the women’s league. With the league finely poised at the top with just 4 games remaining, who is most likely to win the league and be crowned champion?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/768/1*CR1WTcSJcNNQcsJfzT2gQw.jpeg" /><figcaption>League and Champions Trophy winners last year — what is Pegasus’ chance of repeating this year?</figcaption></figure><h3>Method</h3><p>For an in depth look at the method used, we recommend reading yesterday’s post. However, we will summarise the steps taken to make our predictions below for those who have not read it.</p><ul><li>We generated features representing attacking and defensive ability for every match in the last 5 seasons of the EYHL and the last 10 seasons in Leinster Division 1. We also took a note of who won the game, or whether it was a draw.</li><li>We trained a probabilistic model on this data that predicts the outcome of a matche based on the attacking and defensive abilities of each team. It also gives the probabilities of each result occurring.</li><li>Generated the attacking and defensive features for each team up to this point in the EYHL season. For each remaining game we then used these features to predict the match outcome.</li><li>To play a match we randomly select one of the possible results. The chances of picking that result correspond to the probability of that result occurring as determined by the model. We pick the result in this manner because in sport the most likely event doesn’t always happen (otherwise sport would be very boring).</li><li>Adding together all the outcomes — and the points gained by each team — we calculate the final table for our simulated league.</li><li>This process is repeated for 50,000 simulations so that every possible combination of results is collected, alongside the probability distribution of each combination of results occurring. Teams that have high probabilities of winning their remaining games will win these matches in the same proportion of the simulated seasons.</li><li>As an example, if a team has a 60% chance of winning a match, and a 25% chance of drawing, we would expect them to win in 30,000 of our simulations, to draw in 12,500 simulations and to lose in 7,500 simulations.</li><li>By looking at the simulations as a collective, we can establish how many points we expect a team to finish on by averaging how many points were earned in each simulated season. We can also establish their probability of finishing in each league position by looking at how many times a team finished in each position, averaging by the amount of simulations run.</li></ul><h3>Predicting Matches</h3><p>Through use of our model we can predict the probability of each of the remaining games in the women’s EY season. These probabilities of each result can be seen in the table below. Again, we reiterate that we cannot simply look at the highest probability in each game and use that to determine a result. As probabilistically speaking a sporting contest is seen as a random event, a team that has a 10% win probability would still be expected to win on 10% of occasions. Across the sporting world we can see plenty of examples where we can confirm the truth of this statement, with teams at the bottom of the table sometimes beating teams at the top. In Watford’s recent game against Liverpool in the premier league they were given just a 12.5% chance of winning by the bookmakers, but still came out comfortable 3–0 winners.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*eVGbeIUrJ_H3hQ0Go4bSlA.png" /><figcaption>Result Probabilities for Our Remaining Games</figcaption></figure><h3>The State Of Play</h3><p>Before looking at the outcome of the simulations it is useful to familiarise ourselves with the current state of play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qBG_xktPQ7Kt9w9gI0S4BQ.png" /><figcaption>Current EYHL Table. source: hockey.ie</figcaption></figure><p>There is what appears to be a 4-way battle for the lead in the table. Loreto sit 3 points clear of the chasing pack, but with an extra game played meaning they can be caught by Pegasus and Old Alex in the next round out games, while UCD can move up to within a point. Pembroke, meanwhile, seem poised to strike on any slip ups by the top 4 sitting another 4 points behind but with another additional game to play. A win in each of these games could potentially bring them within 2 points of top spot.</p><p>At the bottom Belfast Harlequins seem to have been cut adrift, needing to pick up 5 points reach parity with Railway Union and gaining the possibility of being in the relegation playoff. Railway themselves are a further 5 points adrift of reaching automatic safety and seem destined to play second place from EYHL 2 for the right to play in the league next season.</p><h3>Predicting the League</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/946/1*fsZB-FYkx4XZ5bh6J83J-g.png" /><figcaption>Predicted League Table</figcaption></figure><p>Above we see the predicted league table for the completed women’s EYHL. For each team we see their expected league position, the expected number of points scored and the probability of teams finishing in each position. Taking Catholic Institute as an example we can see their expected rank is 6.81 with an expected points of 20.49. They have a 1% chance of finishing 4th, 45% chance of finishing 5th and so on.</p><h3>Race To The Top</h3><p>Loreto seem to be favourites to win the league finishing in the top rank of the table on 52% of occasions. However, Old Alex, UCD, and Pegasus between them have a substantial chance of upsetting them. Even Pembroke maintain some hopes of finishing in the top spot and directly qualifying for Europe next season. In order to win the league in half of our simulations the winning team requires 36 points (win in 66% of simulations) meaning Loreto only require 5 points from a possible 9 to be the likely champions.</p><p>With the teams so tightly matched in the table it is worth investigating why Loreto seem to have such exceedingly high chances of winning the league. This is where the extra game played actually comes in advantageous (provided it has been won) when we run such a high number of simulations, and is one of the drawbacks of modelling when teams have played inconsistent numbers of games. Each of the teams below play an extra game with some probability of winning — unless the probability of winning this game is 100% the teams will end up on the same number of games played with an average number of points that is less than 3, giving Loreto an automatic advantage in our table.</p><p>To visualise this we will take Old Alex as our example. Their game in hand is against Cork Harlequins — a game in which they have a 56% chance of winning and an 18% chance of a draw. We can calculate the number of points we expect them to get from this game, on average, by multiplying the probability of each result occurring with the return they will receive from each result. This gives us an expectation of Old Alex gaining 1.86 from this game across all the simulations, putting them on average 1.14 behind Loreto after they have played their additional game.</p><p>This is a well known issue when calculating win probabilities over the course of a season, and is particularly evident in sports, such as the NFL that have a playoff system and a bye for the best teams. By getting a bye and therefore avoiding an additional game the probability of winning the tournament increases massively. This is essentially what the additional won game affords Loreto — a bye in the tournament, and it makes it difficult for the teams behind to catch up. Equally, by having two additional games to play it puts Pembroke at an even greater disadvantage probabilistically and is likely why their chances of winning the league appear so low.</p><p>In the race for the playoffs we can see each of our top 5 teams have a realistic chance of reaching the final weekend. In this race 32 points appears to be sufficient to qualify in over 50% of cases.</p><h3>Mid Table and Relegation</h3><p>Interestingly the above noted disadvantage of the game in hand is flipped in the situation where a team with an additional game is level on points with their opponent. In this situation the additional game guarantees them additional points on average, even if the probability of winning or drawing a game is very low. Despite Cork Harlequin’s expected points from their game against Old Alex only being 0.96, this translates into a lead on Muckross, with whom they are currently tied. Consequently Harlequins have a better expected rank and finish with on average 1.33 points ahead of Muckross and appear to be relatively safe in the mid table.</p><p>In the battle to avoid the relegation playoff Railway seem destined to finish in 9th position, with a 60% probability of ending the season there. With a big gap in both directions in the table this is the expected outcome. All of Muckross, Cork Harlequinns and Catholic institute have some chances of ending up in the relegation playoff position if Railway do claw their way upwards, however. This prediction probably remains too close to call in this instance. 16 points is the required mark for safety using our 50% threshold, while 18 points guarantees survival in over 80% of cases.</p><p>At the bottom there is no major intrigue. Belfast Harlequins have a 91% chance of getting directly relegated, the 5 point gap being too large to overcome. They do, however, gain an additional 3.99 points on average, showing they may still be potential kingmakers with a game against Loreto remaining. They may also have a large say on the outcome of 9th position with games against Railway Union, Muckross and Catholic Institute allowing them a chance to cause upsets.</p><h3>Champions Trophy</h3><p>At the end of every season the top 4 teams battle it out over a single weekend of knockout competition to be crowned Irish Champion and to gain the top European spot for the following season. For each of our 50,000 simulations we also simulate this competition — taking place in a neutral venue. We give the probabilities of each team reaching the final and eventually taking home the trophy.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/354/1*yDKFVG4kH3Jwcr3TXoOx-A.png" /><figcaption>Champions Trophy Outcome Predictions</figcaption></figure><p>Being favourites to win the league Loreto are also favourites to win the Champions Trophy this season, having a 54% chance of reaching the final and a 29% chance of lifting the trophy. This means that Loreto would win the final over half the times they make it there — an impressive feat when our teams are this well matched.</p><p>Interestingly, despite being predicted to finish nearly 3 points shy of Loreto in the table, UCD are our second favourites to win the trophy. They fall in just behind Loreto, reaching the final on 45% of occasions and having a 25% chance of winning the Champions Trophy. This suggests UCD are stronger than their League Table position belies, and suggesting they have perhaps been slightly unlucky in previous games, with results not matching performances alongside a more difficult run in than their competitors.</p><p>Due to their reduced chance of making the playoffs (only a 45% chance of finishing in the top 4) Pembroke are the least likely side to win the Champions Trophy despite being still harbouring chances.</p><h3>Conclusions</h3><p>As always this model comes with a few caveats. Firstly we need to make sure we are not misinterpreting the probabilities. Belfast Harlequins having a 91% chance of finishing in 10th does not mean that they are definitely getting relegated, rather that it is unlikely that they avoid the drop. In 2018 Loreto won the Champions Trophy despite our model predicting only a 5% chance of them doing so. Probabilities are suggestive, and will not tell us exactly what will happen, because even events with small probabilities remain possibilities.</p><p>Secondly we need to mention that the model doesn’t take into account form. How a team plays at the beginning of the season has as large an effect on a team’s attacking and defensive ability as their most recent games. As we know teams go on good and bad spells during the course of the season, and this model doesn’t capture such momentum. With the condensed nature of the women’s EYHL this year, this is likely less of an issue than usual, however.</p><p>Finally, we must mention that unusual results can have a disproportionate bearing on the attacking and defensive abilities of a team. We are fortunate that in the women’s season to date there have been none of these results, however we can note in the men’s EYHL that YMCA’s 8–0 loss at home to Banbridge takes their defensive ability from one that was approximately average in the league to second worst due to a single game.</p><h3>Wrap Up</h3><ul><li>Built a dataset of GSOA and GCOA from 10 years of historical hockey matches.</li><li>Used this dataset to train a model to predict the outcome of hockey matches</li><li>Ran 50,000 simulations of the remaining games in the Women’s EY Hockey League and the Champions Trophy</li><li>Loreto most likely champions but the race remains too close to call.</li><li>All of the top 5 harbour realistic chances of reaching the playoffs and winning the Champions Trophy</li><li>Belfast Harlequins likely down, but while Railway are the most likely 9th place finisher the probabilities here remain too tight to make a realistic judgment.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=55f94714e23" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What Might Have Happened: Men’s EY Hockey League]]></title>
            <link>https://medium.com/@jakimberndsen/what-might-have-happened-mens-ey-hockey-league-708b6b8514d4?source=rss-f2c8d192e3dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/708b6b8514d4</guid>
            <category><![CDATA[sports-predictions]]></category>
            <category><![CDATA[field-hockey]]></category>
            <category><![CDATA[sports-analytics]]></category>
            <dc:creator><![CDATA[Jakim Berndsen]]></dc:creator>
            <pubDate>Fri, 27 Mar 2020 16:27:33 GMT</pubDate>
            <atom:updated>2020-03-27T17:19:47.967Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Amid the Covid-19 shutdown, Irish hockey officially declared the Men’s EY Hockey League over on March 26th. A season that was heading into its defining period has now been deemed finished with final results, such as crowning a champion and deciding upon relegation, to be decided by the competitions committee. This provides a rather interesting problem. How can a champion be decided when games remain in the season, and how can we decide on who should be relegated or in the relegation playoffs?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WY0MZBeqbMsKu1XNBpBA_g.jpeg" /><figcaption>Lisnagarvey won the Men’s EYHL in 2019 — Would we have seen this image again in 2020?</figcaption></figure><p>In this article we will look at statistical modelling techniques in an attempt to predict the remaining games in the Men’s EY Hockey League and determine each team’s chances of winning the league, reaching the playoffs, and league survival. We will also predict each team’s champions trophy chances, were they to reach this stage. If you wish to skip how the modelling works, jump down to the section <a href="#216a">“Predicting Future Results”</a> (click the quotes to go there now).</p><h3>Determining Attacking and Defensive Ability</h3><p>We attempted to <a href="https://medium.com/@jakimberndsen/predicting-the-eyhl-champions-trophy-30b4310edd2a">predict the EY champions trophy in 2018</a>, and will be following a similar approach in this work. We start by determining each team’s attacking and defensive abilities by determining a side’s Goals Scored Over Average (GSOA) and Goals Conceded Against Average (GCOA). An explanation of these two features can be seen in our previous article, however we will include if for brevity below:</p><blockquote>By way of explaining these two features, we will look at a mid table clash in Leinster men’s D1 between Avoca and Clontarf played on the 15/02/18. Going into this game Avoca has scored an average of 1.66 goals per game, while conceding 2.16 goals per game. Clontarf on the other hand has scored at 1.58 goals per game and conceded 1.9. These are, in themselves, fairly meaningless stats as both Avoca and Clontarf will have played different opponents of different abilities so we need to look at how many goals, on average, the teams they were playing had scored or conceded.</blockquote><blockquote>At this point of the season the teams Avoca had played against had given up an average of 2.17 goals a game. This gives us a better look at the attacking ability of Avoca. Against the same opponents, they were scoring 0.57 goals fewer per game — meaning they had an attack that was worse than average. Meanwhile, their opponents had scored an average of 2.64 goals per game, pointing towards a lean streak in Avoca’s defense. In order to determine the GSOA for Avoca, we divide the average number of goals they have scored, by the average number of goals their opponents have conceded (1.66/2.17) to give a value of 0.76. This can be interpreted as Avoca having an attack that is 25% worse than league average at this point of the season. GCOA follows a similar pattern, with goals conceded being divided by average goals scored by the opposition. A value above 1 in GSOA indicates an above average attack, while a GCOA below 1 indicates the team is strong defensively. By ranking the GSOA and GCOA at any point of the season, we can rank each teams attacking and defensive ability. Heading into this game Avoca held a slight advantage both offensively and defensively over Clontarf, and duly won by a margin of 2–0.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*8zvXszZrvI8F6c8etiniGA.png" /><figcaption>Eqns for GSOA and GCOA</figcaption></figure><p>In order to determine the ability of each of the teams in the Men’s EY we calculate their GSOA and GCOA for league games in the current season, up to the point when a halt was initially called.</p><h3>Modeling Matches</h3><p>We gather historical GSOA and GCOA data from every Men’s and Women’s EYHL game going back to the 2015 season, alongside every Men’s and Women’s Leinster Division 1 match going back to the 2010 season. To ensure each team has played a reasonable number of games from which to obtain a reflective GSOA and GCOA we take only those games where both teams have played at least 4 previous games in that season. This leaves us with 1328 historical matches, the GSOA and GCOA for each team at that point in the season and the result of each of the games.</p><p>In order to make predictions for the games remaining the Men’s EYHL we train a model, known as a neural network, to determine the outcome of each of the games based on the home and away side’s respective GSOA and GCOA. A neural network will look at the abilities of each of the sides and predict a result. It then learns the errors of it’s predictions and corrects the prediction formula until it figures out the pattern required to make a correct prediction. To determine the ability of the neural network to predict a match result we test it some of our historic data and determine it predicts the correct result in 66.7% of cases.</p><p>A neural network is a probabilistic model, meaning we can not only see the outcome of a match, but also the probability of each outcome occurring. This will prove important later when we wish to predict each team’s chances of winning the league or avoiding relegation.</p><h3>Predicting Future Results</h3><p>We use the model trained above, alongside the attacking and defensive features for each team at the time of the league stopping to predict the outcome of each remaining league game. The predictions of these matches can be seen in the table below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/535/1*bjcI152FKkYwk8CF9FzNzA.png" /><figcaption>Percentage probabilities for each remaining game</figcaption></figure><h3>The State Of Play</h3><p>Before predicting the outcome of Men’s EY Hockey League table it would perhaps be useful to remind ourselves of the current state of play.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/745/1*0MlyBGw_xGgPQ47oYzjdYA.png" /></figure><p>Lisnagarvey are sitting comfortably at the top of the table. They are 5 points clear with two games in hand over their nearest rival, Banbridge. There is a clear gap in the race for the Champions Trophy playoff positions, with Three Rock Rovers 6 points ahead of Glenanne, albeit with an extra game played. The battle to avoid the relegation playoff is extremely tight, with YMCA and Pembroke level on points and Corinthian only 2 points ahead. At the bottom Annadale have been cut adrift with only a single point to show for their efforts at this point of the season.</p><h3>Predicting The League</h3><p>Using the match probabilities that we obtained above we run 50,000 simulations of the remaining season. This means that for each game we randomly predict the outcome 50,000 times using the calculated probabilities. For example, in game between Three Rock Rovers and Monkstown we would expect 17,500 wins for Three Rock, 9500 draws and 23,000 Monkstown wins. By simulating such a large number of times we can almost ensure that we will encounter possible combination of results and detect the frequency with which each combination happens, allowing us to calculate the probability of each league finish occurring.</p><p>By calculating the finishing position of each team in each of these simulations, alongside the number of points earned we are able to produce the following table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/516/1*BW17WX0xlZplhvMgerkfKQ.png" /><figcaption>Predicted League Table</figcaption></figure><p>The table shows us the average finishing position for each team, alongside the average number of points they accumulated in every season. By going across the table we can then see the probability of each team finishing in each position. For example UCD on average finish in the 5.9th position with 22.82 points. They have a 1% chance of finishing 4th, 45% chance of finishing 5th etc. It is important to note that the percentage probabilities have been rounded to the nearest whole number, meaning that there are occasions where Corinthian, YMCA, and Pembroke make it into the playoffs. However these occur with such low probability that they have been omitted from the table.</p><h3>League Winners</h3><p>Based on our predictions Lisnagarvey have a 99% chance of winning the league given their performances to date and the number of games remaining. This should not come as a surprise as the team have only dropped points on one occasion so far this season. To win the league in over half of our simulations they require only 37 points, which equates to only 2 wins from their remaining 7 games. With an average of nearly 47 points across our simulations Lisnagarvey seem worthy champions of the EYHL, with only Monkstown having any sliver of hope remaining.</p><h3>Race To The Playoffs</h3><p>Every year the EYHL culminates with the Champions Trophy, where the year’s champion is crowned and the top European spot is decided. That makes a top 4 finish in the league incredibly important as it gives teams a chance to be deemed the best side in the country over a single weekend. Indeed, over the past number of years we have seen Three Rock Rovers emerge as the eventual champion despite not finishing top of the EY league standings.</p><p>The current top 4 in the league maintain the status quo in our predictions with Lisnagarvey, Banbridge, Monkstown and Three Rock Rovers earning places in the finals weekend. UCD and Glenanne both have (exceedingly) slim chances to emerge with a top 4 spot, and thus we can expect that these would have been the 4 teams to make the Champions Trophy playoffs. Due to the current gap between the top 4 and the chasing pack this result is as expected.</p><p>Monkstown and Banbridge appear well matched in our simulations, with both sides averaging half a point of each other, and both having relatively equal chances of finishing in second position. However, whether each team finishes in second or third is of little consequence as both will play each other in the semi-final anyway.</p><h3>Fight For Survival</h3><p>The battle to remain in the EYHL for another season and avoid the relegation playoffs is the point of the league where the most excitement remains in this year’s league. YMCA and Pembroke are locked on points and Corinthian remain within touching distance. Both bottom sides are yet to play each other in what could be the decisive fixture in deciding survival.</p><p>It would appear that with a 39% chance of finishing in 9th position Pembroke are the most likely team to be in a relegation playoff. Following them are Corinthian on 29% and YMCA on 23%. Both UCD and Glenanne have small chances of being in the relegation playoff, with a 3% and 6% chance respectively.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*smGodKcZzKYgQrFwKmcMZQ.jpeg" /><figcaption>YMCA and Corinthians seemed destined to battle for survival with Pembroke. Picture: Sinead Hingston</figcaption></figure><p>In order to avoid the relegation playoff in over 50% of our simulations a team requires 19 points, with 20 points giving a near 70% chance of survival. For both Pembroke and YMCA 19 points equates to 2 wins and a draw, while Corinthian require 5 points. YMCA seem to have the best chance of avoiding the relegation playoff, largely due to their remaining game against Annadale (80% win probability, 10% draw probability), whom the other two sides have already played twice. YMCA also have the advantage of a game in hand against Glennane (41% win probability, 18% draw probability). From these two games we would, on average, expect YMCA to obtain 3.91 points, bringing them just a win in their remaining games away from likely safety.</p><p>However, despite this each of the teams avoids the playoff position on more occasions than they fall into it. This means that no conclusive statement can be made on who is likely to finish 9th. Indeed, we expect all three sides to finish within 1.1 points of each other.</p><h3>Relegation</h3><p>Of our 50,000 simulations there exist none where Annadale manage to finish above the 10th spot in the table. However, they do, on average, pick up an additional 1.8 points, which they are most likely to pick up in their ties against UCD and YMCA. This suggests that while they are not likely to survive the season they could have had a big role to play in both side’s ambitions for the season.</p><h3>Champions Trophy</h3><p>Ultimately the season culminates in the crowning of a national champion, not from the league, but from the playoff system that is the Champions Trophy. Therefore we also wish to determine which side is most likely to win this competition and qualify for the EHL the following year. We calculate this for each of our 50,000 simulations by taking the top 4 teams in that run and playing them against each other as would occur in the champions trophy — first from the league plays fourth, and second plays third to determine a final. As our model has learned a small bias in favour of the home team, and the Champions Trophy is played on a neutral venue we predict the probabilities of each result twice; one with each team as the home side. It could be argued that as the Champions Trophy was due to be hosted by Banbridge they should retain their home advantage in these simulations, but we have decided that the scale of the game would likely negate the advantage a home side would have.</p><p>We also adapt our predictions slightly to ensure that in the event of a draw we have a means of breaking the tie. We scale up the win probabilities of both sides, removing the possibility of a draw, and make a further prediction as to the outcome of the game.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*T-GicOxLYbiYEu7Gc5LXeg.png" /><figcaption>Champions Trophy Final and Win Probabilities</figcaption></figure><p>Above we show the probabilities of each team in the league making the final, and the probability of each side eventually winning the Champions Trophy. Lisnagarvey go into the final’s weekend as strong favourites, having a near 50% chance of winning the trophy. However, other sides should not be disheartened, as we should not overstate this probability. In our prediction of the women’s Champions Trophy in 2018 Loreto emerged victorious with just a 5% probability of winning. In 100 runs of the men’s Champions Trophy we would still expect Three Rock Rovers to win on 10 occasions. As such we would make no certain prediction as to who would win the Champions Trophy, however, we expect it to be Lisnagarvey with twice the chance of every other side.</p><p>Some teams not listed also have chances of winning the champions trophy or appearing in the finals, however as their percentage chance is less than 1% we have chosen not to report them in the table. Of our 50,000 simulations UCD win the Champions Trophy on 34 occasions, and Glennane on 6. YMCA are the sole remaining side with any chance of winning the trophy, winning it in 2 of our simulations. Each of these events occur with such small probabilities that we can essentially rule them out of possibilities.</p><h3>Model Limitations</h3><p>There are some caveats as to the effectiveness of this model. While the predicted probabilities give a good indication as to the expected outcome of the league — had it been played — we must note a few things when interpreting the results.</p><p>For one, we do not have a large quantity of features on which to model. While the GSOA and GCOA we use to make predictions do an exceptional job we would likely have obtained a better accuracy — and therefore a better prediction — with some additional features such as PC conversion (%). Without the availability we had to settle on a model that we know has scope for improvement.</p><p>The model also does not take into account form. A good example to look at here is UCD, who started incredibly strongly but have struggled slightly since Christmas. This model does not take account of that change in form. Similarly Banbridge have improved in the new year, while the model has no way of showing that we would perhaps expect better performances now than we did in October. While we attempted to model form, by taking GCOA and GSOA just over the most recent games, we found it led to a decrease in accuracy when predicting match outcome on our historical data.</p><p>Lastly, we need to be careful when analysing probabilities. While it is fine to say that Monkstown have a higher probability of finishing second than Three Rock Rovers, we must not take this as definitive. Over 50,000 simulations Three Rock still finished in second position over 5,500 times. While we can infer from our predictions what might have happened in the conclusion of the season, nothing presented in this article can conclusively state what would have happened.</p><h3>Wrap Up</h3><ul><li>Built a dataset of GSOA and GCOA from 10 years of historical hockey matches.</li><li>Used this dataset to train a model to predict the outcome of hockey matches</li><li>Ran 50,000 simulations of the remaining games in the Men’s EY Hockey League and the Champions Trophy</li><li>Lisnagarvey almost certainly league champions, Annadale relegated</li><li>Current top 4 likely to remain in the playoff positions</li><li>Fight to avoid 9th too close to call between Corinthian, YMCA and Pembroke</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=708b6b8514d4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Predicting the EYHL Champions Trophy]]></title>
            <link>https://medium.com/@jakimberndsen/predicting-the-eyhl-champions-trophy-30b4310edd2a?source=rss-f2c8d192e3dd------2</link>
            <guid isPermaLink="false">https://medium.com/p/30b4310edd2a</guid>
            <category><![CDATA[sports-analytics]]></category>
            <category><![CDATA[hockey]]></category>
            <category><![CDATA[field-hockey]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Jakim Berndsen]]></dc:creator>
            <pubDate>Fri, 04 May 2018 18:40:50 GMT</pubDate>
            <atom:updated>2018-05-04T18:55:43.063Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*99Z9s170xVf66m5PcBx7FQ.png" /><figcaption>League winners Glenanne celebrate finishing top of the table</figcaption></figure><p>This weekend sees the top four sides in this years EY Irish Hockey League, on both the men’s and the ladies side, pitted against each other for the opportunity to call themselves the top team in the country. Glenanne and UCD enter the competition as de facto favourites, having won their respective league titles over the course of a grueling 18 game season. However, common wisdom does not always prevail in such a competition with upsets being far from irregular, so we’re going to use some factual backing to determine who the statistical favourite is for each competition, while also showing each teams chance of overall success. If not interested in how these results were achieved, simply scroll down an there’s a table of each teams predicted chances waiting towards the bottom.</p><p>In this blog post we will look at building a simple statistical model in order to predict the outcome of the Champions Trophy. We will outline the dataset being used in the next section, followed by a method by which the outcome of a match can be predicted. We’ll then present the outcomes of these predictions for the EYHL champions trophy, and give each team’s chances of emerging as the champions. Lastly, we’ll discuss some limitations of this model, and what precautions should be taken when interpreting the results.</p><h3>Data and Determining Ability</h3><p>In its absolute simplest terms a team’s success in any field sport, including hockey, comes down to their ability to attack and their ability to defend, compared to the ability of the opposition. Inspired by a similar blog post seeking to predict the results of NFL games, the idea of Goals Scored Over Average (GSOA)and Goals Conceded Over Average (GCOA), which can be roughly described as a team’s attacking and defensive efficiency, was devised.</p><p>By way of explaining these two features, we will look at a mid table clash in Leinster men’s D1 between Avoca and Clontarf played on the 15/02/18. Going into this game Avoca has scored an average of 1.66 goals per game, while conceding 2.16 goals per game. Clontarf on the other hand has scored at 1.58 goals per game and conceded 1.9. These are, in themselves, fairly meaningless stats as both Avoca and Clontarf will have played different opponents of different abilities so we need to look at how many goals, on average, the teams they were playing had scored or conceded.</p><p>At this point of the season the teams Avoca had played against had given up an average of 2.17 goals a game. This gives us a better look at the attacking ability of Avoca. Against the same opponents, they were scoring 0.57 goals fewer per game — meaning they had an attack that was worse than average. Meanwhile, their opponents had scored an average of 2.64 goals per game, pointing towards a lean streak in Avoca’s defense. In order to determine the GSOA for Avoca, we divide the average number of goals they have scored, by the average number of goals their opponents have conceded (1.66/2.17) to give a value of 0.76. This can be interpreted as Avoca having an attack that is 25% worse than league average at this point of the season. GCOA follows a similar pattern, with goals conceded being divided by average goals scored by the opposition. A value above 1 in GSOA indicates an above average attack, while a GCOA below 1 indicates the team is strong defensively. By ranking the GSOA and GCOA at any point of the season, we can rank each teams attacking and defensive ability. Heading into this game Avoca held a slight advantage both offensively and defensively over Clontarf, and duly won by a margin of 2–0.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/882/1*FQoIq_tvViX1nAZq_qm79g.png" /><figcaption>Formula for calculating GSOA and GCOA for a team at any point in the season</figcaption></figure><p>Moving back towards the EYHL, we have a database consisting of all the games and each of the results. For each of the games we calculate the home and away teams GSOA, GCOA and take a note as to whether the home team won, lost or drew. Using both the Men’s and Women’s leagues that gives us a dataset of 180 games. As the Leinster division 1 games are also readily accessible we also add these games to double the data we have available. As draws are not possible in the Champions Trophy (each game requires a winner) all draws are removed from the dataset, meaning in the upcoming prediction we will simply be predicting whether the home team won or lost, based on the GSOA and GCOA for both teams. To ensure each team has played a reasonable number of games from which to gather data, and potential outliers are removed, it is also ensured both teams in a match have played at least 4 games each before being added to the final data.</p><h3>Predicting the Games</h3><p>Trying to describe this section as briefly as possible, a technique known as a neural network was used in order to predict games. Put in simple terms, it looks at the GSOA and GCOA for both sides, and predicts the result. It then learns the error of its predictions over the entire dataset and corrects the formula it uses to make them iteritively until it figures out the pattern required to make correct predictions. Using a method known as cross-validation, where the data is split into 10 parts and each is taken out and checked to see whether the model makes correct predictions for that set of matches, we determine that the model accurately predicts 81.8% of the games in our dataset.</p><p>A neural network is a probabilistic model, meaning it associates a probability to its decision. From this we can not only predict the result of a match, but also tell the probability of each team winning. This will prove crucial when determining each teams chances of winning the tournament.</p><p>For the upcoming Champions Trophy we predict the results of each of the possible match ups in the tournament. We do this by running the model, using the GSOA and GCOA for both teams in a potential match-up as the inputs. This prediction is run twice, giving each team home advantage once, and averaging the results. This step is done as there is a potential home advantage (or interestingly enough a disadvantage in the case of two strong sides competing, however that’s a story for a different day) in the model and each of these teams are competing on a neutral venue. The win probabilities for each of these teams is then averaged to give their probability of winning that game. There is reason to consider all games played by Three Rock as home games, as Irish Hockey is using their home venue to host the competition, but in the interest of consistency and because a game of this magnitude is considerably different to a normal home game, all matches are treated as being played neutrally.</p><p>Using this method on each of the games we get the tables below. By looking at the row of a given team, and looking up the column of the opposition, you can see the chances of the team beating that opposition, expressed as a percentage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*pVzKZoj_BmEw9JuIRxqHQw.png" /><figcaption>Winning probabilities for individual matches in EYHL Men’s Champions Trophy</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/1*NIQwr9PXJnvMokrVRWDEeA.png" /><figcaption>Winning probabilities for individual matches in EYHL Women’s Champions Trophy</figcaption></figure><h3>Predicting Tournament Outcome</h3><p>Given the above single game probabilities, and the fact we know the draw for the semi final stage of both tournaments, giving final tournament winning probabilities is relatively straightforward. We know on the women’s side UCD must beat Loreto Hockey Club and then either Cork Harlequins or Pegasus in order to be crowned champions. Using a notation of P(A|B) meaning the probability of Team A beating Team B, UCD’s chances of winning the champions trophy can therefore be calculated by the following formula:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xsR5KnfsMyZGN1o9-N8gvg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/706/1*1tsNM2REUTL3nRsuWoYpQw.png" /></figure><p>Thus gives UCD a 59.8% chance of being crowned champions on Sunday afternoon. Using this same Formula applied to each of the teams in both competitions, we can figure out the statistical favourites in each tournament and rank them by their chances of winning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*twlF1Y-YPdNoqlCDFw2MMA.png" /><figcaption>Men’s EY Champions Trophy Winning Probability</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/448/1*mLrLk3V6rd8gbT53k6LTDA.png" /><figcaption>Women’s EY Champions Trophy Winning Probability</figcaption></figure><h3>Model Limitations</h3><p>While the above probabilities give a reasonable reflection of each team’s chances of winning the Champions Trophy, there are a few things that must be noted when looking at these results.</p><p>Firstly, a team other than Three Rock or UCD winning does not mean the model was wrong. If the Champions Trophy is played 100 times, one would still expect Loreto to win on 5 of those occasions. Probabilities are open to misinterpretation, the model results simply indicate the favorites and each team’s chances of winning, rather than being an ultimate determiner. Despite UCD’s overwhelming favourite tag from this model, there is still a reasonable chance that they do not emerge as champions.</p><p>Secondly, the data used in this model is incredibly basic. While it does seem a good predictor of team ability and match outcome on the whole, it doesn’t note Glenanne’s big game temperament against the topsides this season. Glen’s seem to be able to raise their game just enough for any side they have been playing — something that cannot be captured in this model. As an improvement there could be some scaling done based on the importance of the game, however any scaling would be arbitrary and thus likely unhelpful to generating a fair outcome. This ability to raise the standard cannot be discounted for the weekend though, and would likely raise Glenanne’s chances of lifting the cup on Sunday. Similarly it doesn’t take into account personnel or tactics on the given day, with injuries and unavailability potentially having played a massive role in determining the league table throughout the season.</p><p>Lastly, the model also discounts recency in its predictions. Form is a large indicator in any sport, and thus the team that is coming into the final weekend in the best form is likely to have some advantage in the games they play. However, in this model games from the start of the season are weighted with equal importance to those that have been played in the past few weeks. There are a number of ways this could be addressed, including changing model type, but these methods require significantly more time to implement and thus weren’t included here. It might be something that can be added if there are any future iterations of this post.</p><h3>Wrap Up</h3><ul><li>Built a dataset consisting of Goals Scored Over Average and Goals Conceded Over Average and the corresponding result from 360 hockey matches played across Leinster and Ireland</li><li>Built a model from this data capable of predicting the outcome of a hockey match with over 80% accuracy</li><li>Used this model to determine the most likely winners of the EY Champions Trophy, with Three Rock being most likely to win the men’s competition and UCD being strong favourites in the women’s</li><li>Don’t read into these figures too much. The model is strong but simple, and anything could happen on the day — that’s the beauty of sports!</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=30b4310edd2a" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>