Showing posts with label Analytics. Show all posts
Showing posts with label Analytics. Show all posts

Friday, 14 August 2015

The Belgian Jupiler Pro League: what do we know before Gameweek 4? A look at the stats

Gameweek 4 of the 2015/16 JPL season begins this evening when Club Brugge entertain Kortrijk at the Jan Breydel Stadium. While we are only 3 games into the season some questions are already being asked of the bigger teams, and rightly so. As the league table stands, Brugge are outside the top-6, Genk have looked poor and disorganised since winning 3-1 against OH Leuven in gameweek 1, and Anderlecht - yet to be convincing at all - share the top spot with surprise stories so far STVV and KV Ostende.

I'm taking this opportunity to go through some of my statistical observations of the season so far in an attempt to shed some more light on what we have seen.

To begin with, I use Ben Mayhew's (@experimental361) 3 'shot-matrices' to illustrate a few key trends:

1) Generally speaking, the teams that have shot more than their opponents are further up the table.

The chart below plots the number of shots JPL teams have taken per game on the x-axis, and the number of their opponents' shots they have faced per game on the y-axis. As a rule of thumb, the teams in the bottom right quadrant are in the "sweet spot": they outshoot their opponent and allow their opponents to shoot less than the average. 



2) Most teams have not yet put their shooting boots on.

In an attempt to measure the effectiveness of JPL team's attacks (offense), the chart below plots the number of shots the teams take to score 1 goal against the number of shots they take per game. Gent have yet to find their shooting boots - no surprise as two of their 3 goals scored have come from the penalty spot. Standard, Charleroi & Club Brugge are also all yet to really excel in front of goal. Interestingly, Waasland Beveren and Westerlo have been efficient at converting their shots into goals, but are not getting enough shots in. An interesting outlier is Mouscron, stranded up there: ineffective in front of goal but taking slightly above average number of shots per game, so they can take some reassurance that they are doing the right thing, they just need to improve their accuracy!




3) Standard and Anderlecht's defensive frailties should be watched (and if playing against them, exploited).

While Anderlecht & Standard's defences deal with a below average number of shots per game, they are tending toward a leaky defence, in the case of Anderlecht, and have a leaky defence, in the case of Standard.



4) More possession does not = victories (duh!)

In the chart below I've plotted the average percentage of possession JPL teams have of the ball, and their Shots on Target Ratio (SoTR), which is calculated by dividing a team's shots on targets by the sum of their shots on targets and their opponents shots on target. If a team has a SoTR value of over 0.5, they take more shots on target than their opponent, and vice-versa. The teams in green - ie the top 6 - are mixed: 3 of them tend to have more possession in games, 3 tend to have less, but what they all have in common is that they take more shots on target than their opponents. An interesting one to analyse from the standpoint of Belgium's bigger teams is Club Brugge: they tend to have more possession than their opponents but have so far conceded more shots on target than they have taken: B- for Club Brugge. Must do better.




More to follow, big debt of gratitude for the statistical and graphical inspiration from the wonderful @experimental361.

Saturday, 7 February 2015

AFCON 2015: Deserving Finalists, Skill Overcame Luck, and Luck Ran Out

Cast your mind back to one of my earlier posts on the 2015 Africa Cup of Nations where I used statistics to look at the skill and luck teams had in the group games. According to these stats, 6 of the Quarter-Finalists had benefitted from a lot of luck in the group stages. This came from my PDO vs SoTR chart: 6 of the Quarter-Finalists had PDO values of over 1000. 

Now, if you recall PDO is a measure of luck - the higher the number the more the luck the team has had. You arrive at a team's PDO figure by adding the percentage of goals scored from shots on target, to the percentage of goals conceded from shots on target against them. More broadly, the score percentage and the save percentage. The SoTR - Shots on Target Ratio - is the proportion of shots on target a team has of the total number of shots on target by the two teams. The higher this number is, the more skill a team has as it indicates they dominate the number of shots on target.

For reference, I bring back the PDO vs. SoTR chart from the group stages below. The chart clearly shows that Ghana and the Ivory Coast exhibited the highest skill - as indicated by SoTR - in the group stages of all the Quarter-Finalists (those teams with a Gold or Silver icon beside their three-letter country code).


This chart got a bit of love on Twitter in the past couple of days as it shows that despite a limited sample size (16 teams competing over the course of 24 matches) the SoTR (Skill) PDO (Luck) comparison yields some intuitive insights as to why teams succeed and/or fail. Additionally, the simple fact that there are no "lucky" teams - as shown by PDO, anyway - in the final shows that using this chart has some power in explaining things in this particular tournament.

Again, this is a small sample of data, and it must be stressed that Ghana faced, in Guinea and Equatorial Guinea, two massively inferior opponents in the knockout stages. The Ivory Coast have overcome bigger challenges to get to the final, so it will be an interesting one to watch. If, the skill levels (SoTR) continue to hold some predictive power - if I could call it that? - Ghana looks like the winner.

I've said it before. I'll say it again: I can't bloody wait for this final!

Monday, 2 February 2015

Further Analysis of the AFCON 2015 Quarter Finals: Luck must run out, or does it?

In my last post I talked about how skill and/or luck helped the quarter-final victors take their spoils.

In this post I am looking at another chart to explore the topic from another angle.

The chart I have made looks at PDO (Luck) of the teams playing in the quarter-finals of the tournament. It compares their group-stage PDO to their PDO statistic from the quarter-finals. Of course, this is imperfect as a comparison because the group stage PDO is over 3 games whereas the quarter-final PDO is from just one. However, the comparison is insightful as it shows that of the 6 teams with PDOs of over 1000 in the group stages, 4 were eliminated in the quarter-finals: Algeria, Congo, Guinea & Tunisia.

PDO indicates luck. Luck is subject to the laws of gravity. In short, it is possible that those four teams' luck ran out in the quarter-finals. Spare a moment to sympathise with Tunisia all the same.

Interesting to also note how 'lucky' the Ivory Coast and Equatorial Guinea were in the quarter-finals when thinking about what may happen in the semi-finals... As I said before, I think the counter-attacking performance of the Ivory Coast was excellent and, overall, deserving of victory. Furthermore, the Cinderella-story of Equatorial Guinea in front of their home crowd is a force to be reckoned with.




AFCON 2015 Quarter-finals: Deserving Winners or Unlucky Losers?

This weekend was a mammoth weekend of football which obviously means mountains of potential writing material. However, since my recent focus has been on the Africa Cup of Nations tournament, it seems only fair (and logical) to continue in that vein. (And, the less said about Saturday's new-firm semi-final at Hampden the better...)

In my last post I discussed my observation a seemingly large number of goals have been scored in the last 30 minutes of these games. It makes sense, of course, as a knock-out cup tournament like the Africa Cup of Nations is all about the elimination of teams until a winner is crowned. Naturally, teams will push more in the dying minutes as their survival in the competition depends on it.

Luck or Skill?

Another theme of this tournament I have tried to explore is what role luck plays compared to skill. Work done by the excellent James Grayson using English Premiership team-level data has shown that even in leagues, and over time, metrics such as percentage of shots on target or percentage of shots saved boil down to luck much more than skill.

Using data from the bbc football match summaries, I graphed team skill and luck from the quarter-finals. I calculated a team's Shots on Target Ratio as a measure of skill and PDO as a measure of luck. The chart** is below:



Reminder: PDO (Luck) centres on 1000 and is mean-reverting. What this means for the purposes of this explanation is that teams at the higher-end of PDO have had more luck on their side than the teams on the lower-end of PDO. Additionally, we would expect PDO to converge on 1000 over time.

According to the PDO figures in the chart above, the Ivory Coast and Equatorial Guinea were luckier than Ghana and the Democratic Republic of Congo (DRC) were to be victorious in their respective quarter-finals. Ghana, for example, did not allow Guinea a single shot on target in their game and made it look easy. The DRC made a truly inspired comeback against Congo scoring four goals in slightly over 25-minutes. But they also shot nearly double as much as Congo did (21 to Congo's 12).

Hard luck or good tactics? Or, something else?

So, I sat there thinking about luck and skill...

After watching the Ivory Coast manage to beat Algeria 3-1, I thought it would be incredibly difficult to use any figures (apart from goals scored, obviously) to prove that Ivory Coast were deserved winners. Algeria seemed to dominate the pace of play, and seemed to be a much stronger team. Additionally, Ivory Coast looked very shaky in defense.

However, Herve Renard - the Ivory Coast boss - made an insightful comment about how he arranged his players tactically to overcome the individual strengths of Algeria, a team he considered the 'best in the tournament'. He told the BBC:
"We needed to be very well-organised and try to counter a team who are very strong individually." (emphasis my own)
In the same interview, Renard explained he thought Algeria were much better on the ball and going forward, but he set his team up specifically to make the most of the pace of the likes of Gervinho and Max Gradel to supply Wilfried Bony on counter-attacks. And, it worked.

Algeria themselves played a different kind of game to how they played in the group stages: they had more possession and shot more. In the group stages they averaged under 50% of the possession in games. In this quarter-final they had 60% of the possession. In the group stages they took around 7 shots per game (on avg.). In this game, they took double that, 14 shots. But Ivory Coast had all the right answers to Algeria's change of style. And, Ivory Coast had Wilfried Bony to thank who scored twice and drew Algerian defenders to foul him four times. Algeria could have done with a presence like his in their attack...

In the Tunisia-Equatorial Guinea match, however, I think poor refereeing luck played a huge role in assisting the hosts progress to the Semi-final. An extremely soft penalty awarded to Equatorial Guinea in second-half stoppage time seemed to be so unfair on Tunisia. I think the image below says much more than my words can...
Dominance in the Quarter-Finals? Or, was it really luck?

I also wanted to look at the games in another way so I looked at the shot-dominance in the quarter-finals. Recall from my earlier post when I dived into a preliminary statistical sweep of the group games that the sweet-spot of the graph below is the bottom-right corner. This is where teams take many shots and limit the number of shots taken against them. In this corner is Algeria and the DRC. Now, from the PDO vs. SoTR chart above we already established the DRC ran out deserved winners. And, from what Renard said about his tactics against Algeria we see that the counter-attacking style of play is not well accounted for in these charts. 
chart concept from Ben Mayhew of experimental361.com

An interesting part in the chart below is how closely matched Equatorial Guinea and Tunisia were over the course of 120 minutes - at least in terms of shots. Again, it is hard for these charts to take refereeing decisions into account...

** Updated on 2/2/15 at 16:30 to include revised PDO chart

Saturday, 31 January 2015

Luck or Skill: updated chart

With big thanks to Ben Mayhew of the excellent experimental361.com for alerting me to the errors in the skill vs luck chart in my last post.

I re-ran the numbers and got a much more normal looking chart, which I have put below. 

As PDO is mean-reverting you would expect Ghana and Ivory Coast to become luckier and the teams with PDO above 1000 to become unluckier as the tournament progresses.

However, the big caveat as Ben Mayhew pointed out to me, is that these figures (PDO & SOTR) are usually traced over the course of a league season and not in a cup-tournament. Cup tournaments generally ride much more on luck due to their duration than leagues. 

So, take these figures with a pinch of salt...


Footnote 1: If you recall, PDO is a measure of a team's luck. The higher the figure, the higher the luck - the logic goes. A team's PDO consists of its Shot percentage + its Save percentage. There are excellent summaries on PDO on James Grayson's blog (here) specifically about football and a comprehensive explanation of the measurement's origins in Ice Hockey here.

Footnote 2: The whoscored.com do not perfectly add up: shots on-target for add up to 177, whereas the shots on-target against add up to 173. No biggie, but it means no team sits on the 1000 line for PDO, as it is supposed to.

Friday, 30 January 2015

Africa Cup of Nations 2015: A dive into the statistics of the group stages...

*** updated 31/01/2015 to include updated PDO vs. SoTR chart

In my last post I ran through some fairly general impressions of the 2015 Africa Cup of Nations so far. Among other topics, I bemoaned the lack of goals and the high number of draws. In this post I develop some analysis of the Africa Cup of Nations by relying heavily on … wait for it … statistics.

By using data provided by whoscored.com I set out to try and understand what aspects of a team’s game have helped them progress to the quarter-finals. In short, I wanted to understand if it is more down to skill or luck.

I also wanted to see if there is any way of guessing how the quarter-finals will go based on trends or patterns in the data.

What I have found out is:

  1. It is a combination of skill and luck;
  2. 4 of the 8 quarter-finalists (50%) enjoyed over 50% of the possession in their group matches --> dominating possession is just as successful as...er, not dominating the possession. It would appear...;
  3. Only 3 of the 8 quarter-finalists (38%) took above the average number of shots per game --> shooting more than your opponent is not always a guarantee for success;
  4. Having a busy attack and quiet defence is no guarantee for progressing to the quarter-finals in this year's tournament; and,
  5. It is definitely NOT good defending keeping the number of goals down in this years tournament.

All of this begins with…

Dominance

One of the first topics I wanted to explore was the concept of dominance. My reasoning is the most dominant team should surely win the game, right?

In the first chart of many below, I compare the shots per game a team takes and the shots per game it defends against. The x-axis (horizontal) shows the number of shots the teams take per game. The y-axis (vertical) plots the shots per game teams defend against. Broadly speaking my logic went like this: “if you take more shots than your opponent, you dominate the game”. In terms of statistics, comparing shots taken to shots defended, we have a simple (but crude) measure of ‘game dominance’.

The dotted blue lines plot the ‘average’  (the same goes for all charts used) which is roughly 11 shots for and 11 shots against per game. Using the example of Senegal, they shoot above average against their opponents and they tend to face fewer than average shots on their goal.

If you think about the chart as four quadrants, the ‘most dominant’ quadrant is that one on the bottom-right. It is the area where teams shoot the most and manage to stifle shots coming against them: in other words, they are strong in attack and have a relatively quiet time defensively. The top-right quadrant is the busiest quadrant. It is where teams have taken many shots but also faced many shots. You get the picture.

Data sourced from whoscored.com and graph idea from Ben Mayhew experimental361.com


So, in looking at this chart, we see that Senegal, Zambia and Burkina Faso all belong to the bottom-right quadrant, but none of these teams progressed to the quarter-finals.

This chart only shows whether the team has attacked its opponents more or has been more on the back foot. It says little about the effectiveness of the attack…

But you have got to score to win

True. The Democratic Republic of Congo are the only team in the quarter-finals to have scored fewer than 3 goals so far. Algeria have scored the most of any team at the tournament so far. They also take the fewest number of shots to score a goal:

Team
Goals Scored
Shots Taken
Shots per goal
ALG
5
22
4.4
TUN
4
35
8.8
CON
4
33
8.3
GHA
4
38
9.5
EQG
3
27
9.0
MAL
3
28
9.3
CIV
3
30
10.0
GUI
3
22
7.3
RSA
3
33
11.0
SEN
3
44
14.7
DRC
2
37
18.5
ZAM
2
38
19.0
GAB
2
34
17.0
CAM
2
30
15.0
CPV
1
32
32.0
BFA
1
47
47.0

But it is not always so simple...

How many shots must a player take, before he scores himself a goal?

The answer is not blowing in the wind, certainly not in Equatorial Guinea. The chart below compares the shots a team takes to the number of shots it takes the team to score. This is a crude measurement of shooting skill, or the potency of the team’s attack. If a team takes more shots to score a goal, generally speaking, they have less skill than a team that takes fewer shots to score a goal.

Data sourced from whoscored.com and graph idea from Ben Mayhew experimental361.com


The measurement in this graph is of ‘attacking effectiveness’, i.e. how effective the attack of one team against the other. Generally speaking, the teams in the bottom right of this chart are in the sweet-spot. They take a lot of shots, so they play with a high intensity AND they don’t take many shots to score a goal. It seems fairly reasonable then that Ghana and Tunisia – two of the stronger teams in this tournament – are in the sweet-spot. But, what about the other two favourites: Algeria and Ivory Coast? Well, both Ivory Coast and Algeria don’t take as many shots as Tunisia and Ghana but the four teams are similar in the aspect of not needing to take many shots to score a goal. Interestingly, seven of the eight quarter-finalists take below average number of shots to score a goal. In other words, generally speaking the teams with highest attacking skill have progressed. The Democratic Republic of Congo is the exception: it has progressed to the quarter-finals taking an above average number of shots to score a goal.

What is a good chance?

Alright, so shooting accuracy is one thing, but it is also important for attackers to be supplied with plenty of chances by their teammates. So, I was sitting there thinking (wahey): "how could I come up with a stat simple enough to understand that shows a ‘good chance’ objectively?"

Most of us would agree that if a team advances play to a position where they can shoot from inside the opponent’s box, they have created a good chance to score. So, I developed a measure of what a good chance might be: 

I have taken the number of shots a team makes inside the box as a proportion of the total shots they take (per game). So, if a team takes 8 shots inside the box per game and takes 10 shots per game, its “good chance” proportion is 80%. Make sense?

In the chart below, the ‘sweet-spot’ is in the top right-hand corner. Here, teams have a lot of possession and more than half of their shots are inside the opponent’s box. 

Senegal, Burkina Faso and Gabon all populate this quadrant, however, none progressed to the quarter-finals. If we look to the bottom-right quadrant, we see three quarter-finalists - Equatorial Guinea, Ghana and Congo - populating the area. These teams create good chances (>50% of the shots they take are inside of the opponent's box) but have less than 50% of the possession.

Data sourced from whoscored.com graph idea my Charles Low (my own)
So, then, it is not all about creating "good" chances...

The Importance of Possession

My belief that possession is key to winning games (as well as scoring, obviously!) probably reveals my bias approaching the data, so I should make it clear. My belief is based on seeing the way the tiki-taka style popularised by Barcelona, (i.e. possession is king) has come to dominate the game in recent years. When I think of “teams of my generation” very few could compare to Barcelona under Pep Guardiola or the Spanish World Cup winners of 2010.

I wanted to dwell on this thought for a little longer. Think about it like this – how does a team convert its possession? Does it create a high number of chances but has a weakness of conceding a lot of chances on the counter-attack? Think Arsenal…

So, to try and translate this into figures I developed a "shot dominance ratio". I called it this way as I constructed a ratio of shots taken by a team to the total number of shots in a game. So: 

shot dominance = shots for per game / (shots for per game + shots against per game). 

If shot dominance > 0.5 the team has taken more shots than its opponent.

Possession is the average possession figures over three games. Again if possession is greater than 50% the team had more possession than their opposition. So, the teams in the top-right of the chart (i.e. with over 50% possession and 50% shot dominance) dominated the game in terms of possession and shooting – broadly a measure for chances to score. Only five teams – Democratic Republic of Congo, Cameroon, Ivory Coast, Burkina Faso and Senegal – had more possession and shot more than their opponents. Three of those teams are going home.

Data sourced from whoscored.com and graph idea Charles Low (my own)

What about the defence?

Less is made of the defence, but it is interesting to look at nonetheless. What this chart below reveals is really interesting. Remember from my last post I said there have been a pretty low number of goals in these games? Well, that is NOT explained by good defending. So, the explanation is either excellent goal-keeping, or poor skill in front of goal – because it is certainly not due to lack of chances being created.

Again, if we think about the chart as four quadrants, the top-left quadrant is where good defensive teams are situated. It is the quadrant where teams don’t allow many shots to be taken on their goal and it is also where many shots must be taken before a goal is scored against them. If we consider Equatorial Guinea way up there in the right-hand quadrant we could view it that their defence has done well – it takes their opponents many shots to score a goal. However, their defence (and goalkeeper) are probably well over-worked as the team faces a lot of shots, on average, in games.

Data sourced from whoscored.com and graph idea from Ben Mayhew experimental361.com



Something Else?

So, I sat there thinking (wahey): “how can it be that the dominance of possession and shots cannot explain the team’s performances?” How is it that teams who have more of the ball and shoot more than their opponents do not qualify for the quarter-finals? It could be down to luck. But, it could also be down to skill.

In football analytics there is a way of providing a rule-of-thumb to quantifying skill and luck. Skill is described as the Shots On Target Ratio (SOTR) [shots on target for/total shots on target]. Luck is described as shooting % + saving %. It is taken as a given that it requires great skill to shoot a high percentage on target. In the luck category, it is considered a great fortune to save a high percentage of shots against you. [NB: it makes sense right – you ever been watching a game and you thank god the opposition striker couldn’t hit a barn door?!] I owe a great deal of praise to Seth Dobson’s fantastic blog 2-2-6 for explaining these concepts.

Basically, the higher the PDO, the greater the fortune a team has. And, as luck is subject to laws of gravity this spells bad news for teams with PDO of above 1000. In the graph the teams are grouped by colour according to where they finished in the groups. The quarter-finalists are the gold and silver marks. What we can see broadly is that 6 of the quarter-finalists have benefitted from luck - as PDO would have it - so far. How long will it last?

Conclusions

So, what have I learned? I have learned that making charts is a great way to waste time and provides some insight into the beautiful game. However, I still have a gut feeling Ghana are going to win this thing…