Chapter 9: Exercises

Overview

These exercises reinforce concepts from Chapter 9 on Expected Threat (xT) and ball progression metrics. They progress from conceptual understanding through implementation to advanced applications. Solutions are available in code/exercise-solutions.py.


Part A: Conceptual Understanding (Questions 1-6)

Exercise 1: xT Fundamentals

Difficulty: Basic

a) Explain in your own words what Expected Threat (xT) measures and why it was developed.

b) Why is xT more useful than xG/xA alone for evaluating midfielders and defenders?

c) A player makes a pass from their own half (xT = 0.005) to the edge of the opponent's penalty area (xT = 0.12). What is the xT added by this action?


Exercise 2: Grid Design

Difficulty: Basic

a) Explain the tradeoffs between using a 12×8 grid versus a 24×16 grid for xT calculation.

b) Why might the zones in the center of the pitch have different xT values than zones on the wings, even at the same vertical position?

c) What factors should determine the choice of grid resolution for a given analysis?


Exercise 3: xT Value Interpretation

Difficulty: Basic

Rank the following pitch zones by expected xT value (highest to lowest) and explain your reasoning:

  • Central midfield (center circle area)
  • Edge of penalty area, center
  • Own penalty area, center
  • Wing position, final third
  • Inside penalty area, central

Exercise 4: Progressive Actions

Difficulty: Intermediate

Explain the difference between:

a) Progressive passes and progressive carries

b) The "25% closer to goal" rule and the "30-meter forward" rule for progressive passes

c) Why might a team have high progressive pass totals but low xT generation?


Exercise 5: Framework Comparison

Difficulty: Intermediate

Compare and contrast xT, VAEP, and EPV:

a) What data does each require?

b) What are the main advantages and disadvantages of each?

c) In what situations would you choose each framework?


Exercise 6: Limitations Analysis

Difficulty: Intermediate

For each scenario, explain how xT might give a misleading evaluation:

a) A defensive midfielder whose primary role is ball retention

b) A winger who plays for a team that relies heavily on crossing

c) A center-back on a team that plays out from the back vs. a team that plays long balls

d) A player who takes most corner kicks


Part B: Building xT Models (Questions 7-12)

Exercise 7: Grid Setup

Difficulty: Intermediate

Write a function that:

a) Converts (x, y) coordinates to zone indices for a configurable grid size

b) Handles edge cases (coordinates at boundaries)

c) Can work with both 120×80 and 105×68 coordinate systems

# Starter code
def coord_to_zone(x, y, grid_size=(12, 8), pitch_dims=(120, 80)):
    """
    Convert pitch coordinates to zone indices.

    Parameters
    ----------
    x, y : float
        Pitch coordinates
    grid_size : tuple
        (columns, rows) of the grid
    pitch_dims : tuple
        (length, width) of the pitch

    Returns
    -------
    tuple
        (zone_x, zone_y) indices
    """
    # Your code here
    pass

Exercise 8: Transition Matrix

Difficulty: Intermediate

Using StatsBomb World Cup 2018 data:

a) Build a pass transition matrix showing the probability of moving from each zone to each other zone

b) Visualize the transition matrix as a heatmap

c) Identify which zones have the highest probability of passes leading to the penalty area

d) Calculate the average number of passes needed to reach the penalty area from each starting zone


Exercise 9: Shot Probability Grid

Difficulty: Intermediate

Create a grid showing:

a) The probability of taking a shot from each zone

b) The average xG of shots from each zone

c) The product (shot probability × xG) for each zone—this is the "shooting component" of xT

d) Visualize all three as heatmaps


Exercise 10: xT Calculation

Difficulty: Advanced

Implement the full xT calculation:

a) Initialize xT values using shot probability × xG

b) Implement value iteration incorporating transition probabilities

c) Iterate until convergence (change < 0.0001)

d) Visualize the final xT grid

e) Compare your values to published xT values—are they similar?

# Starter code
def calculate_xt(shot_prob, shot_xg, pass_transition, carry_transition,
                 pass_prob=0.7, max_iter=100, tolerance=1e-4):
    """
    Calculate xT values using value iteration.
    """
    n_zones = len(shot_prob)
    xT = shot_prob * shot_xg  # Initialize

    for i in range(max_iter):
        xT_old = xT.copy()

        # Your iteration logic here

        if np.max(np.abs(xT - xT_old)) < tolerance:
            break

    return xT

Exercise 11: Carry Integration

Difficulty: Advanced

Extend the xT model to separately track:

a) Pass xT (value added through passes)

b) Carry xT (value added through ball carries)

c) Compare which players add more value through passes vs. carries

d) Discuss what this tells us about player profiles


Exercise 12: xT Validation

Difficulty: Advanced

Validate your xT model:

a) Calculate the correlation between team xT generated per match and goals scored

b) Compare player xT rankings to xG + xA rankings—who moves up/down?

c) Test whether high xT zones actually lead to more goals in subsequent possessions

d) Calculate the "explained variance" of your xT model


Part C: Player Analysis (Questions 13-18)

Exercise 13: Player xT Calculation

Difficulty: Intermediate

Using your xT grid:

a) Calculate total xT added for each player in the World Cup 2018

b) Calculate xT per 90 minutes

c) Identify the top 10 players by total xT and by xT per 90

d) Compare to xA rankings—who are the biggest risers and fallers?


Exercise 14: Position-Specific Analysis

Difficulty: Intermediate

Analyze xT generation by position:

a) Calculate average xT per 90 for each position (GK, CB, FB, CM, AM, W, ST)

b) Create percentile thresholds for each position

c) Identify players who significantly outperform their positional average

d) Discuss why certain positions naturally generate more/less xT


Exercise 15: xT Decomposition

Difficulty: Intermediate

For the top 5 xT generators:

a) Break down their xT into: progressive passes, progressive carries, final third passes, other

b) Create a stacked bar chart comparing their profiles

c) Identify distinct "styles" of ball progression

d) Discuss how this information could inform tactical decisions


Exercise 16: Progressive Passing Profile

Difficulty: Intermediate

Create a comprehensive progressive passing profile:

a) Calculate: progressive passes per 90, progressive pass distance per 90, progressive pass completion %

b) Add: passes into final third per 90, passes into penalty area per 90

c) Create a radar chart template for comparing players

d) Apply to 3-4 similar players and analyze differences


Exercise 17: Risk-Reward Analysis

Difficulty: Advanced

Analyze the relationship between xT generation and turnover risk:

a) Calculate xT added per action and action success rate for each player

b) Plot xT per action vs. success rate—identify the Pareto frontier

c) Calculate a "risk-adjusted xT" metric that penalizes turnovers

d) How do player rankings change with risk adjustment?


Exercise 18: Contextual xT

Difficulty: Advanced

Analyze how xT generation varies by context:

a) Calculate player xT when team is winning, drawing, and losing

b) Calculate player xT in first half vs. second half

c) Identify players who generate more xT in important moments

d) Discuss the value of "clutch" ball progression


Part D: Team Analysis (Questions 19-24)

Exercise 19: Team xT Profiles

Difficulty: Intermediate

For each team in World Cup 2018:

a) Calculate total xT generated per match

b) Calculate xT from different pitch thirds (defensive, middle, final)

c) Identify teams' preferred "progression zones"

d) Create a visualization comparing team styles


Exercise 20: Build-Up Analysis

Difficulty: Intermediate

Analyze team build-up patterns:

a) Track the average path of possessions that reach the penalty area

b) Calculate xT accumulation at each stage of successful attacks

c) Compare "direct" teams (few actions, large xT gains) vs. "possession" teams

d) Correlate build-up style with tournament success


Exercise 21: xT by Match Phase

Difficulty: Intermediate

Analyze how xT generation changes during matches:

a) Calculate average xT generated in 15-minute intervals

b) Identify when teams are most/least threatening

c) Compare patterns between teams that won vs. lost

d) Discuss tactical implications


Exercise 22: Defensive xT

Difficulty: Advanced

Analyze the defensive side of xT:

a) Calculate xT allowed (opponent's xT generation) per team

b) Identify which zones teams concede the most xT from

c) Create a "defensive xT profile" showing where teams are vulnerable

d) Correlate defensive xT with goals conceded


Exercise 23: xT Differential

Difficulty: Advanced

Create an xT differential analysis:

a) Calculate xT generated minus xT allowed per match

b) Correlate xT differential with match results

c) Identify matches with large xT differential that didn't match the scoreline

d) Discuss what xT differential tells us vs. xG differential


Exercise 24: Transition Analysis

Difficulty: Expert

Analyze ball progression in transitions:

a) Identify possession sequences starting from turnovers

b) Calculate xT generation in transition vs. settled possession

c) Compare team profiles—who is dangerous on the counter?

d) Discuss implications for defensive analysis


Part E: Advanced Applications (Questions 25-30)

Exercise 25: Scouting Model

Difficulty: Advanced

Build a scouting model for ball-progressing midfielders:

a) Identify key xT and progression metrics

b) Create a composite score weighting different attributes

c) Apply to a dataset and generate a shortlist

d) Validate by checking which identified players have since transferred/performed


Exercise 26: xT vs VAEP Comparison

Difficulty: Advanced

Compare xT to a simplified VAEP-like model:

a) Build a logistic regression model predicting goal in next 10 actions

b) Calculate probability change for each action

c) Compare player rankings between your model and xT

d) Identify where the models disagree most—why?


Exercise 27: Dynamic xT

Difficulty: Expert

Extend xT to account for game state:

a) Build separate xT grids for when team is winning, drawing, losing

b) Calculate how values shift with score differential

c) Discuss strategic implications of state-dependent xT

d) Identify players who excel in specific game states


Exercise 28: xT Projection

Difficulty: Expert

Build a projection model for future xT:

a) Analyze year-over-year stability of xT per 90

b) Build a regression model predicting next-season xT

c) Identify factors that improve prediction (age, role change, team change)

d) Generate projections for a set of players


Exercise 29: Network Integration

Difficulty: Expert

Combine xT with network analysis:

a) Create a passing network weighted by xT added per connection

b) Identify the highest-value passing combinations

c) Analyze which network positions generate the most xT

d) Compare to standard centrality measures


Exercise 30: Full Possession Value Chain

Difficulty: Expert

Create an end-to-end possession value analysis:

a) Track xT accumulation through complete possession sequences

b) Identify which action types contribute most to reaching high-xT zones

c) Calculate the "value chain" from build-up through shot

d) Compare to xG alone—what additional insights does this provide?


Submission Guidelines

For programming exercises: - Include complete, runnable code with comments - Generate all requested visualizations - Report numerical results clearly - Provide brief interpretations

For conceptual questions: - Write clear, structured answers - Use specific examples where helpful - Acknowledge limitations and uncertainties


Grading Rubric

Category Weight Criteria
Conceptual Understanding 20% Accurate explanations, nuanced thinking
Model Building 30% Correct implementation, appropriate methods
Analysis Quality 25% Valid conclusions, appropriate metrics
Visualization 15% Clear, informative graphics
Interpretation 10% Meaningful insights, proper context