Chapter 11 Exercises: Possession and Territorial Control

Overview

These exercises develop your skills in measuring, analyzing, and interpreting possession and territorial control. You will progress from basic possession calculations through advanced efficiency metrics and pressing analysis.

Data Sources: StatsBomb Open Data (World Cup 2018, La Liga, Premier League) Libraries Required: pandas, numpy, matplotlib, statsbombpy, mplsoccer, scipy


Part 1: Possession Fundamentals (Exercises 1-6)

Exercise 1: Calculating Possession

Objective: Understand different methods for calculating possession.

Task:

a) Load a World Cup 2018 match and calculate possession using three methods: - Pass-based: Proportion of successful passes by each team - Event-based: Proportion of all events by each team - Touch-based: Proportion of ball receipts and carries

b) Compare the three methods. How much do they differ?

c) Explain why different methods might give different results.

d) Which method do you think is most meaningful? Justify your answer.


Exercise 2: Possession Sequences

Objective: Identify and analyze possession sequences.

Task:

a) Implement a function to identify possession sequences from event data: - A sequence starts when a team gains possession - A sequence ends when the opponent gains possession or play stops

b) For a single match, calculate: - Total number of possession sequences per team - Average sequence length (in events) - Average sequence duration (in seconds) - Distribution of sequence lengths (histogram)

c) Compare sequence characteristics between the winning and losing team.

d) Find the longest possession sequence in the match. What happened at the end?


Exercise 3: Field Position Analysis

Objective: Calculate and interpret field position metrics.

Task:

a) Calculate for each team in a match: - Average x-coordinate of all events - Average y-coordinate of all events - Standard deviation of x and y positions

b) Calculate the Territorial Index: $$TI = \frac{\bar{X}_{team} - \bar{X}_{opponent}}{120} + 0.5$$

c) Plot the average positions for both teams on a pitch visualization.

d) Calculate "field tilt" (proportion of touches in attacking third) for each team.

e) Analyze the relationship between field position and match outcome.


Exercise 4: Zone Control

Objective: Analyze possession across different pitch zones.

Task:

a) Divide the pitch into a 6x3 grid (18 zones).

b) Calculate the proportion of each team's events in each zone.

c) Create a heatmap showing zone control for each team.

d) Calculate a "zone dominance" matrix showing which team dominates each zone.

e) Identify the most contested zones (closest to 50-50) and most one-sided zones.


Exercise 5: Possession by Phase

Objective: Analyze how possession varies by match phase.

Task:

a) Divide a match into 6 phases (15 minutes each).

b) Calculate possession percentage for each team in each phase.

c) Create a line plot showing possession evolution over time.

d) Analyze: - Does possession change based on the score? - Which team gains possession as the match progresses? - Are there patterns around substitution times?

e) Compare patterns across 5 different matches.


Exercise 6: Possession After Events

Objective: Analyze possession retention after specific events.

Task:

a) Calculate possession retention rate after: - Successful tackles - Interceptions - Clearances - Goalkeeper saves

b) Calculate time (in seconds) until next possession loss after each event type.

c) Compare retention rates between teams with different playing styles.

d) Which event types lead to the most sustained possession?


Part 2: Territorial Control (Exercises 7-12)

Exercise 7: Spatial Control Estimation

Objective: Estimate territorial control using kernel density methods.

Task:

a) Implement a function to estimate spatial control using Gaussian kernel density:

def estimate_spatial_control(events_df, team_name, grid_size=(12, 8), sigma=1.5):
    """
    Estimate spatial control probability map.

    Returns: ndarray of shape (grid_y, grid_x)
    """
    # Your implementation

b) Generate control maps for both teams in a match.

c) Create a visualization showing contested areas (where both teams have similar control).

d) Calculate the proportion of pitch area controlled by each team at different thresholds.


Exercise 8: Territorial Advantage Index

Objective: Develop a single metric for territorial advantage.

Task:

a) Design a "Territorial Advantage Index" that combines: - Average field position - Zone control in attacking areas - Penetration into final third

b) Calculate this index for all teams in a tournament or league.

c) Correlate with match outcomes (wins/losses/draws).

d) Validate: Do teams with higher TAI score more goals?


Exercise 9: Progressive Territory

Objective: Analyze territorial progression during possession sequences.

Task:

a) For each possession sequence, calculate: - Starting x-position - Ending x-position - Maximum x-position reached - Net progression

b) Categorize sequences by outcome: - Ended in shot - Ended in turnover in attacking third - Ended in turnover in middle third - Ended in turnover in defensive third

c) Compare progression patterns between sequence outcome types.

d) Which starting positions lead to the most progression?


Exercise 10: Territorial Control Dynamics

Objective: Analyze how territorial control changes during a match.

Task:

a) Calculate territorial control for each 5-minute window of a match.

b) Create an animated visualization showing control evolution.

c) Identify moments of significant control shifts.

d) Correlate control shifts with match events (goals, substitutions, red cards).


Exercise 11: Home vs Away Territory

Objective: Compare territorial patterns for home and away teams.

Task:

a) Load 20 matches and calculate territorial metrics for home and away teams.

b) Compare: - Average field position - Attacking third control - Zone dominance patterns

c) Is there a "home advantage" in territorial control?

d) How does territorial control relate to home/away win rates?


Exercise 12: Formation Effects on Territory

Objective: Analyze how formations affect territorial control.

Task:

a) Identify matches where teams used different formations.

b) Calculate territorial control metrics by formation type.

c) Which formations lead to: - Higher attacking third presence? - Better defensive third protection? - More balanced territorial distribution?

d) Create visualizations comparing formation territorial patterns.


Part 3: Possession Value (Exercises 13-18)

Exercise 13: xT-Weighted Possession

Objective: Calculate possession weighted by Expected Threat.

Task:

a) Create or load an xT grid (12x8 zones).

b) For each team in a match, calculate: - Total xT possession (sum of xT at each touch location) - Average xT per touch - Distribution of xT values across touches

c) Compare xT possession to raw possession percentage.

d) Which metric better correlates with goals scored?


Exercise 14: Dangerous Possession

Objective: Identify and analyze "dangerous" possession.

Task:

a) Define "dangerous possession" as possession in zones with xT > 0.05.

b) Calculate: - Proportion of possession that is "dangerous" - Time spent in dangerous zones - Conversion rate (shots per dangerous possession)

c) Compare dangerous possession between high-scoring and low-scoring teams.

d) Create a visualization highlighting dangerous possession zones.


Exercise 15: Possession Quality Index

Objective: Develop a comprehensive possession quality metric.

Task:

a) Design a "Possession Quality Index" combining: - Location value (xT-weighted) - Progression achieved - Duration efficiency (longer is not always better)

b) Calculate PQI for all possession sequences in a match.

c) Rank teams by average PQI.

d) Validate against match outcomes.


Exercise 16: Possession Zones Value

Objective: Analyze the value generated in different pitch zones.

Task:

a) Divide the pitch into zones and calculate for each zone: - Time spent in zone (per team) - xT generated from zone - Shots originating from zone - Goals from zone

b) Create a "value per time" heatmap for each team.

c) Identify high-efficiency zones (high value per time) and low-efficiency zones.

d) Compare patterns between teams with different playing styles.


Exercise 17: Transition Value

Objective: Analyze the value of possession transitions.

Task:

a) Identify possession turnovers (changes of possession).

b) For each turnover, calculate: - Location of turnover - xT difference at that location - What happened next (counter-attack, settled possession, turnover back)

c) Calculate "transition value" as xT gained/lost at turnovers.

d) Which teams excel at winning transitions in valuable locations?


Exercise 18: Possession vs Efficiency Trade-off

Objective: Analyze the relationship between possession volume and efficiency.

Task:

a) For 30+ matches, calculate for each team: - Possession percentage - xG per possession - Shots per possession - Goals per possession

b) Plot efficiency metrics against possession percentage.

c) Identify the "optimal" possession range (highest efficiency).

d) Are there diminishing returns to high possession?


Part 4: Pressing and Regain (Exercises 19-24)

Exercise 19: PPDA Calculation

Objective: Calculate and interpret PPDA.

Task:

a) Implement PPDA calculation:

def calculate_ppda(events_df, pressing_team):
    """
    Calculate Passes Per Defensive Action.

    PPDA = Opponent passes in their defensive third /
           Defensive actions in opponent's defensive third

    Returns: float
    """
    # Your implementation

b) Calculate PPDA for all teams in 10 matches.

c) Rank teams by pressing intensity (lower PPDA = more intense).

d) Correlate PPDA with possession and field position.


Exercise 20: High Turnover Analysis

Objective: Analyze ball recoveries in dangerous areas.

Task:

a) Identify all ball recoveries and interceptions.

b) Categorize by pitch zone (defensive, middle, attacking third).

c) Calculate: - High turnover count - High turnover rate - xG generated from high turnovers within 10 seconds

d) Which teams are most effective at high turnovers?


Exercise 21: Counter-Pressing Effectiveness

Objective: Measure counter-pressing (Gegenpressing) success.

Task:

a) Identify moments when a team loses possession.

b) Track what happens in the next 5 seconds: - Did they apply pressure? - Did they regain possession? - Where did the opponent move the ball?

c) Calculate counter-pressing success rate.

d) Compare counter-pressing between different teams/matches.


Exercise 22: Pressing Triggers

Objective: Identify what triggers pressing actions.

Task:

a) For each pressing action, record: - Ball location - Recipient location (who received the pass that triggered pressing) - Pass type (backward, lateral, forward) - Previous event type

b) Analyze: Which situations most often trigger pressing?

c) Calculate pressing success rate by trigger type.

d) Create a visualization of pressing trigger zones.


Exercise 23: Defensive Line Height

Objective: Analyze the relationship between defensive line and possession.

Task:

a) Calculate average defensive line position (x-coordinate of defensive events) for each team.

b) Correlate with: - Possession percentage - PPDA - Opponent shots

c) How does high defensive line relate to territorial control?

d) Analyze risks: Do high-line teams concede more from long balls?


Exercise 24: Possession Regain Location

Objective: Analyze where teams win the ball back.

Task:

a) Identify all possession regains (ball recoveries, interceptions, tackles won).

b) Create a heatmap of regain locations for each team.

c) Calculate: - Average regain x-position - Proportion of regains in each third - xT value at regain location

d) Compare regain patterns between pressing and non-pressing teams.


Part 5: Efficiency and Advanced Analysis (Exercises 25-30)

Exercise 25: Possession Efficiency

Objective: Calculate comprehensive efficiency metrics.

Task:

a) For each team in a match, calculate: - Shots per possession sequence - xG per possession sequence - Goals per possession sequence - Successful progressions per sequence

b) Compare efficiency between teams with different possession levels.

c) Identify the most efficient possession sequences. What made them efficient?

d) Create efficiency ranking for tournament teams.


Exercise 26: Sequence Pattern Analysis

Objective: Identify patterns in successful possession sequences.

Task:

a) Categorize possession sequences by: - Length (short: 1-3, medium: 4-7, long: 8+) - Speed (fast, medium, slow based on duration/length) - Direction (wide play vs central)

b) Calculate shot and goal rates for each category.

c) Which patterns are most effective?

d) Do different teams have different optimal patterns?


Exercise 27: Possession Under Pressure

Objective: Analyze how teams perform when pressed.

Task:

a) Identify possession sequences where opponent applied pressure (many pressure events).

b) Calculate under-pressure metrics: - Pass completion rate - Sequence length - Turnover locations

c) Compare teams' ability to retain possession under pressure.

d) Which teams improve or worsen under pressure?


Exercise 28: Build-Up Play Analysis

Objective: Analyze how teams progress from defense to attack.

Task:

a) Identify "build-up" sequences (start in defensive third, reach attacking third).

b) For successful build-ups, analyze: - Number of passes - Time taken - Route (central, left, right) - Players involved

c) Create a flow diagram of common build-up patterns.

d) Compare build-up styles between teams.


Exercise 29: Possession Style Fingerprint

Objective: Create a multi-dimensional possession style profile.

Task:

a) Calculate 8+ possession metrics for each team across a tournament.

b) Use dimensionality reduction (PCA) to identify key style dimensions.

c) Cluster teams by possession style.

d) Create radar charts showing team possession fingerprints.


Exercise 30: Comprehensive Possession Report

Objective: Create a complete possession analysis report for a team.

Task:

For one team across all matches in a tournament:

a) Calculate all possession and territorial metrics.

b) Create visualizations: - Average possession heatmap - Sequence length distribution - Efficiency metrics - Pressing intensity

c) Identify: - Strengths in possession - Weaknesses and vulnerabilities - Key patterns

d) Write a 500-word tactical analysis based on the data.


Submission Guidelines

Required Submissions

  1. Jupyter Notebook containing: - All code implementations - Visualizations with captions - Markdown explanations of findings

  2. Written Report (2-3 pages): - Summary of key findings - Interpretation in tactical context - Recommendations for analysts

Evaluation Criteria

  • Technical Correctness (40%): Accurate implementations and calculations
  • Visualization Quality (25%): Clear, informative graphics
  • Interpretation (25%): Meaningful insights about possession
  • Code Quality (10%): Clean, documented, reusable code

Exercise solutions are provided in the appendix for selected problems.