Modeling 101

“Essentially, all models are wrong, but some are useful.” – George E.P. Box

from Empirical Model-Building and Response Surfaces (1987) co-authored with Norman R. Draper, p. 424.

Mr. Box’s quote is quite popular and used a lot these days. However, I am not sure if all those who quote it fully understand it. And that includes me.

What I took away from the quote.

A model is an approximation of a process that we don’t fully understand. We model processes to get a deeper understanding of the process itself. To build a model we use what we understand about a process and try to approximate (or sometimes ignore) what we dont know.

All models are wrong because of the inherent approximation. But some could be useful because what we have “approximated (or ignored)” is not important to understand or replicate the process.

“Relative simplicity” is an important virtue of a good model. By “relative simplicity” I mean the simplicity of a model compared to the actual process. For example, a “simple model” of Relativity theory for a physicist could still take me two lifetimes to understand.

Math lends itself very well to represent these models. We test the usefulness of a model against the real process by giving identical inputs and comparing the outputs. This is easy in case of some models and not so easy in case of others. ( like verifying the existence of Higgs-Boson particle using the Large Hadron Collider that cost an estimated $9b to build).

A model is useful if for a range of inputs, the output of model closely matches the real output of the process. (How close? – It is a matter of threshold and the +/- error range the user of the model is comfortable with.). To summarize, an useful model has some predictive power with

The game of football is a process. Over the years a lot of people have tried to improve our understanding of the game by building models based on what they understood with the data available to them. We have been collecting more and more information as we progressed. More information has led to the better understanding of the game and dispelling some of the myths. But it has also helped create “new myths” (or truths until they get proven wrong in due course of time).

There are a lot of models out there for football. Some based on past results, some based on what happens in a game (events like shots, goals, final 3rd passes etc) and so forth. I dont quite agree with all of them. Some I agree with more than the others.

What I look for in a model?

  1. A model should an understanding of the process; to be aware of what and how the process works. It doesn’t have to be comprehensive (because it is a model after all) but capture the essence of it.Example: If I want to build a model to predict the winner of a football game – I want my model to take into consideration how I win a game of football? By scoring more goals than the opponent. How do I score more goals? By taking a lot of (hopefully good) shots and not letting the opponent take good shots, How have the two teams have been doing in the run-up to the game and so forth. I can list 20-30 items and I am sure I still would have missed many things. The goal is to not to account for every factor but to identify the handful of factors that capture the essence or “signal” as Nate Silver calls it in his popular new book.

    I am skeptical of any model that does not understand the process that it is trying to be a model of.

  2. A model should factor in the nature of the underlying data from a process. For example: Based on Chris Anderson‘s analysis, number of goals scored in a game is not normally distributed. Something like that needs to be factored in if the model using goals scored as an input. This is probably more important for models making long term predictions because the inherent characteristics of data tend to manifest over a longer period of time than in a shorter period of time.Example: Probability of a getting 4 heads if you toss a coin 4 times is 6.25%. But if you repeat the experiment 5 times, you might get 4 heads once, twice, thrice, 4 times, 5 times or never. You might have to repeat the experiment thousands of times to see the probability of 4 heads converge to 6.25%.

Building a good model is not trivial and is an iterative process. But if the first version of a model doesn’t address the above, it might be time for a rethink.

MCFC Analytics blogposts Summary #9

In the past week, I found the following posts written using the #MCFCAnalytics data

  1. Some interesting stuff by @PedroAfonso85 building on some previous work  to breakdown the importance of ball possession and some discussion about the oft discussed yet hard to quantify, momentum.
  2. @MarkTaylor0 analyzed Blocked shots to find if blocking shots is a talent.
  3. @hpstats visualized points difference “with/without” a player in  the starting lineup. Also from the same blog is profiling players based on their shooting
  4. @SportsViz has a video with examples of 3D-visualization of passes using the data from Bolton vs. City game

Previous Summaries

Summary #8

Summary #7

Summary #6

Summary #5

Summary #4

Summary #3

Summary #2

Summary #1

MCFC Analytics blogposts – Summary #8

Here is the list of interesting posts I found in the past week

  1. An interesting post on home advantage and how it manifests itself into football stats by @FbPerspectives. The post also has a link to a detailed paper from 2009 on home advantage.
  2. Guardian Data blog has an interactive visualization of the Bolton – City game by @jburnmurdoch. The viz has a pitch map + a radial diagram that captures the pass direction and length.
  3. The man in the yellow shirt – an analysis of the refs by @PedroAfonso85
  4. An interactive visualization of the direction of a player’s passes by @alekseynp . Some of the outliers are very interesting.
  5. Momentum in Bolton – City game. by @SoccerStatistic . This is a different approach from the previous attempts on visualizing momentum using this data set.

I did not publish anything last week, although I did start writing. Hopefully I will publish something later this week.

Previous Summaries

Summary #7

Summary #6

Summary #5

Summary #4

Summary #3

Summary #2

Summary #1

If I missed any, please post them in the comments section or tweet them to me!

Sunderland – Opposition Analysis

This is an “Opposition analysis” of Sunderland, City’s opponent on Saturday 2012/10/6 at the Etihad. I used the #MCFCAnalytics Lite data set to do this analysis.

Disclaimer: The analysis is primarily based on data from 2011-12 season with some data points from the first six games of 2012-13 season.

Sunderland – Offense

Goals 1.13 per game – 12th (excluding own goals)
Strong on direct free kicks 5 goals – 1st
% of Open play goals 76% – 4th
% of goals from inside the box 69.7% – 19th
% of goals from outside the box 30% – 2nd
Shots on Target 3.71 per game – 18th
Efficiency: Goals/shots On + off Target 7th
Efficiency Inside the box 16th
Efficiency Outside the box 3rd
Assists per Goals scored 18th
Poor from inside the box 19th in proportion of goals from inside & 16th in efficiency
Strong from outside the box 5th most goals and 3rd most efficient from outside
Final 3rd completions / comp % 16th / 14th
Poor in the final third and opposition box 18th in final 3rd touches & 19th in touches in opp. box
Poor in short passingcompletions / comp % 15th /15th
Good in long balls:  # of successful / success % 9th / 8th
Good in Open play crosses 7th in # of crosses & crossing accuracy
Very few Through balls 18th – less than 1 through ball per game
Other Sunderland just took 6 short corners all season, fewest in the league.

Sunderland – Key attacking players (2011-12)

Goals Bendtner – 8, Larsson & Sessegnon – 7 each,

McClean – 5

Shots On Target Bendtner – 23, Sessegnon – 21, Larsson – 17
Efficiency Larsson – 23%, McClean – 17% and Bendtner – 16. %
Assists Sessegnon – 9, Bendtner – 5
Final 3rd Completions Sessegnon – 401, Larsson – 281, Bardsley – 253
Final 3rd Completion% Sessegnon – 77.4%, Larsson – 66.27%, Bendtner – 60.6%
Touches in opposition box Sessegnon – 120, Bendtner – 98

Sunderland – Offensive summary

Major personnel changes for 2012-13

IN – Steven Fletcher; OUT – Nicklas Bendtner

Bendtner was highest goal-scorer for Sunderland last season with eight. He also had five assists. Steven Fletcher is doing more than enough to replace him. Fletcher has scored all the five goals of Sunderland so far. There have not been any major changes apart from this.

What the numbers say

A mixture of long balls, great long-range shooting, some great free kicks and accurate crossing were the mainstay of Sunderland’s offense last season. Their attack ran through Stephané Sessegnon, Sebastian Larsson and Nicklas Bendtner.

Sunderland was poor in the final third and even worse from inside the box (19th in touches inside the opposition box). They scored 30% of their goals (13) from outside the box. They do not have a lot of through balls (less than 1 per game, 18th in the EPL) or assists (18th in assists per goal scored). Sunderland was poor in short passing (15th in # of completions and completion %). These stats indicate that Sunderland were very direct in attack. The low # of assists per goal is likely due to Sunderland playing a counterattacking style football. (= a lesser emphasis on interplay between multiple players in the final third to create a chance). They used long balls to good effect to get close to the opponents goal and take shots from outside the box. Their shooting and shooting efficiency from inside the box is poor.

So far this season

Steven Fletcher has accounted for all the five goals Sunderland scored this season. They have a hard time keeping the possession of the ball (like last season). They are unbeaten this season with four draws and a win. Their inability to hold on to leads (or scoring an extra goal) has cost them dearly. They had a lead into the second half in four of the five games but have won only once. Their problems with keeping the ball imply that opponents find it easier to breakthrough, especially in the second half when Sunderland is most likely trying to protect a lead or the point.

Steven Fletcher – One man army, so far. Picture courtesy –

Sunderland – Defence

Goals conceded 1.21/game – 5th fewest
Final 3rd passes completions allowed 100/game 6th most
Short passes allowed 343/game 2nd most
Shots on Target Conceded 8th fewest
Lots of headed clearances 7th most
Fouls conceded 10.8/game – 8th fewest
Tackling machines! 1stin tackles won76% tackle success rate – 5th highest

5th in last man tackles

Weak in aerial duels, strong in ground duels 19thin % of aerial duels won5th in % of ground duels won
Corners 7th most corners conceded but conceded just 1 goal from corners, fewest in the league
Make it easy for opponent GKs 3rd highest GK distribution success for opponent GKs
Opponents get a lot of clean sheets 3rd highest # of clean sheets for opponents

Sunderland – Defensive summary

Based on the numbers, Sunderland is a clean tackling defence who do not concede many shots on target. However, they allow opponents a lot of short passes & pass completions in the final third. This indicates that they are likely not pressing and defend deep. Opponent GK’s have great success (over 70%, 3rd in the league) distributing the ball against Sunderland, another indicator that they do not press much and defend off the player. Their relatively low foul count is probably indicative of this. They concede a high number of corners but have just conceded one goal off of corners last season. They are strong in ground duels and are one of the worst teams in aerial duels. They also employ a high number of head clearances.

City had a lot of success against Sunderland in the final third with 181 & 167 completions away and home respectively (average: 135). However, this advantage did not translate into shots on target for City. This could be a side effect of their clean tackling and high # of headed clearances.

Sunderland – Goalkeeping – Simon Mignolet

Goals conceded overall 1.13/game – 6th fewest
Goals from outside 0.31/game – 4th most in the league
Saves made 3.2/game – 7th most
GK distribution efficiency(Successful GK distribution/Total GK distribution) 17th of 18 GKs with 29 or more starts
Long passes completion 34% – 16th of 18
Short passes completion rate 77.4% – 17th of 18(53 attempts 2nd fewest)
Ratio of Long to short passes 90-10

Sunderland – Goalkeeping Summary

Mignolet is good with saves and does not allow many goals (which, is probably a reflection of the overall defensive scheme, not just the goalkeeper). However, he seems to have trouble distributing and passing the ball. The proportion of long passes of the total passes is highly skewed in favor of the long passes. These numbers indicate that Mignolet hoofs the ball as far as possible and most of the time his passes end in loss of possession.

The low number of short passes and pass completion rate of short passes could be indicative of an overall scheme and/or that Mignolet & the Sunderland central defenders are not very good at passing short from their goal.

This means pressing the ball high in the defensive third of Sunderland could be a very productive strategy for opponents. City forwards might enjoy a lot of success prolonging their possessions in the final third by keeping the pressure on the Sunderland GK and defence.

City vs. Sunderland Head – to – head 2011-12

  • Sunderland had great success against City last season. They took four points from the Champions
  • At the Etihad, City needed a big comeback from 1-3 down to salvage a point.
  • Sebastian Larsson x 2 and Nicklas Bendtner were the scorers for Sunderland. Mario Balotelli x 2 and Alexsandr Kolarov scored for City
  • At the Stadium of light, Sunderland upset City 1-0 with a late goal from Di Jong Won.
  • City had 181 (away) and 167 (home) completions in the final third, both higher than their average of 135/game. Shots were close to their game averages.

Final word

City is very likely to have a lot of success pressing Sunderland in their defensive third. They might not find it very difficult to pass short and have lengthy possession spells in the Sunderland final third. However, they need to stay patient as Sunderland defend very well as a team. Sessegnon, Fletcher and Larsson are the three players to watch out for at the other end of the pitch.

MCFC Analytics – Summary of blog posts #5

We had a great meeting this weekend to discuss how to move our community forward. We discussed some great ideas. As @MCFCGavinFleig pointed out on twitter, the next big announcements and steps forward will be public in late November/early December when the “CityAnalyticsCommunity” will be launched. Until then, keep blogging away with the data.

Here is a summary of the blog posts based on #MCFCAnalytics data.

Analytics posts

  1. @MarkTaylor0How passing sequences create chances – the title is self-explanatory. Great post
  2. @JDewittLong passing in the Premiership – John looks at the long passing and its correlation to finishing position in the league table. Interesting post. A question that came up when I read this post is, how is correlation to points or goals scored instead of position in the league table?
  3. @TheWestStandO digs deeper into Fernando Torres’ struggles in front of goal last season
  4. @ChrisJLilley defines metrics and rates the attacking midfielders, central midfielders and the defensive midfielders of last season.
  5. @We_R_PLComparison of Top scorers in EPL
  6. @Hpstats  – A better passing statistic this was posted in the comments of summary #4
  7. Fulham – opposition analysis by me

Visualization posts

  1. @AlexThamks – a neat viz of Assists, chances created & key passes per formation + the best 11 for each formation using Tableau Public
  2. @Tomberthon  – a visualization of the advanced data set and how to make sense out of it


  1. @MarchiMax has a refined version #Rstats code for parsing the F-24 XML
  2. @DannyPage has implemented a Ruby on rails code for importing the F-24 XML

Past summaries

Summary #4

Summary #3

Summary #2

Summary #1

MCFC Analytics – Summary of blog posts #4

It has been about a month since the basic MCFC data set has been released and it is great to see lots of people churning out stuff using both the basic and advanced data sets.

Based on the tweets with #MCFCAnalytics tag, there are quite a few peoples’ projects are in progress. Good luck to all of you. Make sure you share your project/blog links with the hashtag.

Some people are looking for partners and contributors to the projects they are working on. If you are interested, please keep a tab on the #MCFCAnalytics tab and get in touch with folks directly.

Analysis posts

  1. @MarkTaylor0Analyzing the passes by comparing them to their expected pass completion rates using passes of James Milner in Bolton Vs. Manchester City from 2011-12 season.
  2. Mark also has post on how Man City and Bolton passed the ball
  3. @JdewittHow goals are scored in EPL
  4.  @ChrisJLilleyAnalyzing center-backs of the premier league
  5. @analysefooty (this blog!)Opposition analysis of Arsenal

Visualization posts

  1. @DanJHarrington – a very interesting visualizations of passes using Vector diagrams in Tableau Public
  2. @MarchiMax – a visualization of where the ball is a few seconds before a shot is taken
  3. @OngoalsscoredVisualization of the goalscorer’s body parts. Very neat!

If I missed any please post your links in the comments section.

Links to previous summaries

Summary #1

Summary #2

Summary #3

Feel free to tweet me or email me if you want to chat with me on something specific!

MCFC Analytics – Summary of blog posts # 3

Thanks for the amazing response to Summary of blog posts #1 & Summary of blog posts #2

I also want to thank people who have reached out to me via twitter with links to their blogs & posts.

Goalscorer ‘footedness’ by @DavidAHopkins measures the footedness or the foot favoured by Premier League goalscorers.

How do the more successful clubs keep the ball in EPL by @JDewitt talks about how the top teams in EPL keep possession. Also by John is Successful Passing and Winning

A sneak peek of a very interesting carto by @Kennethfield  Charlie Adam’s “passing wheel”

Football Philosophy – Long passes by @Poolq1984 explores the importance of long ball in football.

@We_R_PL has a nice post on how to use the MCFC dataset more efficiently. He also has spreadsheet which has the own goals calculated per team.

@footballfactman has a post on Darron Gibson using a mix of data from MCFC dataset, whoscored and statszone

The always excellent MarkTaylor0 has detailed post Analysing the quality of shots in Bolton – Manchester City game using the advanced dataset.

@ChrisJLilley has 3 posts on his blog using MCFC data

GK positional analysis

Premier league game changers Part I & Part II

@DanJHarrington has cranked up a lot of things using the advanced dataset

1.  an interactive tableau viz to see touches of each player in Bolton -City on the pitch.

2. Passing visualization using D3.js

3. Dan also has some interesting visualization work in progress. There is a cool video in the link showing ball movement.

Network passing diagrams by @DevinPleuler

Bolton –

Man City –

Extracting data from XML

There have been some questions regarding this and some folks have come up with solutions

1. If you have MS Excel 2007 or a later version you can open the file in XML. The only issue with is that XML’s are nested and Excel converts this into a very flat format. So you will see multiple rows for the same events. For example: A successful pass has multiple rows indicating the direction, the x,y coordinates of where it is passed to. Read the data spec thoroughly to understand how the data is formatted in the XML. It will help understand the data much better.

2. Code for R users to extract the F-24 XML by @MarchiMax

3. Code snippets from @JBrisson to extract events from the F-24 XML

4. If you are into programming, most languages have XML parsers. A simple search will get you code snippets to start with.
If I missed any links, please let me know via Twitter or comment on the blog post. Always use #MCFCAnalytics tag in twitter so I can pick them up easily!

%d bloggers like this: