Chapter 11: Exercises

Exercise Overview

These exercises build proficiency with Expected Points Added (EPA) and Success Rate calculations. Work through each level sequentially as concepts build upon each other.


Level 1: Conceptual Understanding

Exercise 1.1: Expected Points Intuition

Without calculating, rank these situations from lowest to highest expected points:

a) 1st & 10 at own 5-yard line b) 3rd & 8 at opponent's 40-yard line c) 1st & goal at opponent's 3-yard line d) 2nd & 15 at own 30-yard line e) 4th & 1 at midfield

Questions: - Explain your reasoning for each ranking - Which situation has approximately zero expected points? - Which situations have negative expected points?

Exercise 1.2: EPA Sign and Magnitude

For each scenario, determine whether the EPA is positive or negative, and estimate the magnitude (small: <0.5, medium: 0.5-1.5, large: >1.5):

a) 8-yard completion on 1st & 10 b) Incomplete pass on 3rd & 2 c) 15-yard sack on 2nd & 5 d) 40-yard touchdown pass on 1st & 10 e) Interception returned to opponent's 35-yard line f) 2-yard run on 3rd & 3

Exercise 1.3: Success Rate Thresholds

Apply the standard success rate thresholds to determine if each play is successful:

Play Down Distance Yards Gained Successful?
A 1st 10 4 ?
B 2nd 8 3 ?
C 3rd 4 4 ?
D 1st 10 3 ?
E 2nd 5 3 ?
F 3rd 12 10 ?

Exercise 1.4: EPA vs Traditional Stats

A quarterback has these game statistics: - 25/35, 285 yards, 2 TD, 1 INT - Passer rating: 105.4

But his EPA per dropback was only +0.02 (barely above average).

Questions: - How is this possible? What might explain the discrepancy? - What situations could lead to high traditional stats but low EPA? - What additional information would help explain the difference?

Exercise 1.5: Success Rate vs EPA

Two running backs have identical rushing yards (900) and carries (200).

RB A: 45% success rate, +8.5 total EPA RB B: 38% success rate, +12.2 total EPA

Questions: - How can RB B have more EPA with a lower success rate? - Which running back would you prefer on 3rd & 2? Why? - Which running back would you prefer on 1st & 10? Why?


Level 2: Basic Calculations

Exercise 2.1: Building an EP Table

Using the formula provided, calculate expected points for each situation:

EP Formula (simplified):

EP_base = -1.5 + (yard_line / 50) * 3.5  for yards 1-50
EP_base = 2.0 + ((yard_line - 50) / 49) * 4.0  for yards 51-99

Down adjustments: 1st: 0, 2nd: -0.4, 3rd: -0.9, 4th: -1.5

Calculate EP for: a) 1st & 10 at own 20 b) 2nd & 6 at own 40 c) 3rd & 3 at midfield d) 1st & 10 at opponent's 25 e) 3rd & goal at opponent's 5

Exercise 2.2: EPA Calculation

Using your EP values from Exercise 2.1, calculate EPA for these plays:

Before After Play Description
1st & 10, own 20 2nd & 3, own 27 7-yard completion
2nd & 6, own 40 3rd & 6, own 40 Incomplete pass
3rd & 3, midfield 1st & 10, opp 42 8-yard run, first down
1st & 10, opp 25 Touchdown 25-yard TD pass
3rd & goal, opp 5 Opponent 1st & 10, opp 5 Interception

Exercise 2.3: Drive EPA

Calculate the total EPA for this drive:

Play Down/Dist Before Result After
1 1st & 10 Own 25 5 yard run 2nd & 5, own 30
2 2nd & 5 Own 30 8 yard pass 1st & 10, own 38
3 1st & 10 Own 38 3 yard run 2nd & 7, own 41
4 2nd & 7 Own 41 22 yard pass 1st & 10, opp 37
5 1st & 10 Opp 37 -2 yard run 2nd & 12, opp 39
6 2nd & 12 Opp 39 14 yard pass 1st & 10, opp 25
7 1st & 10 Opp 25 8 yard run 2nd & 2, opp 17
8 2nd & 2 Opp 17 17 yard TD Touchdown

Exercise 2.4: Success Rate Calculation

Calculate the success rate for each category from this play log:

Play Down Distance Yards Type
1 1 10 6 Rush
2 2 4 2 Pass
3 3 2 5 Pass
4 1 10 2 Rush
5 2 8 5 Pass
6 3 3 0 Pass
7 1 10 8 Rush
8 2 2 3 Rush
9 1 10 4 Pass
10 2 6 12 Pass

Calculate: a) Overall success rate b) Success rate by down c) Success rate by play type (pass vs rush)

Exercise 2.5: Explosive Play Analysis

Using the standard thresholds (10+ yards for rush, 15+ yards for pass), calculate:

Play Type Yards
1 Pass 8
2 Rush 12
3 Pass 22
4 Rush 4
5 Pass 15
6 Rush 3
7 Pass 6
8 Rush 18
9 Pass 45
10 Rush 7

Calculate: a) Explosive rush rate b) Explosive pass rate c) Overall explosive rate


Level 3: Implementation Challenges

Exercise 3.1: Complete EP Model

Build a comprehensive Expected Points model.

"""
Create an ExpectedPointsModel class that:
1. Builds an EP table based on historical data patterns
2. Adjusts for down (1-4)
3. Adjusts for distance to go
4. Handles special situations (goal-to-go, 4th down decisions)

Required methods:
- build_ep_table() -> Dict[int, float]
- get_ep(yard_line, down, distance) -> float
- get_ep_with_context(yard_line, down, distance, score_diff, time) -> float

Test your model against known benchmarks:
- 1st & 10 at own 20 should be approximately -0.5 to 0.0
- 1st & 10 at opponent's 20 should be approximately +3.5 to +4.0
- 3rd & 15 at own 10 should be very negative
"""

Exercise 3.2: EPA Calculator

Build a complete EPA calculation system.

"""
Create an EPACalculator class that:
1. Uses your EP model to calculate play EPA
2. Handles all play outcomes (touchdowns, turnovers, field goals, safeties)
3. Aggregates EPA by player, team, game, season

Required methods:
- calculate_play_epa(play_dict) -> float
- calculate_drive_epa(plays) -> Dict
- calculate_player_epa(player_plays) -> Dict
- calculate_team_epa(team_plays) -> Dict

Handle edge cases:
- End of half plays
- Two-point conversions
- Fumbles recovered by offense vs defense
"""

Exercise 3.3: Success Rate Analyzer

Build a success rate analysis system.

"""
Create a SuccessRateAnalyzer class that:
1. Determines success based on standard thresholds
2. Allows custom threshold configurations
3. Calculates success rates by multiple dimensions

Required methods:
- is_successful(play) -> bool
- calculate_success_rate(plays) -> Dict
- analyze_by_down(plays) -> Dict
- analyze_by_field_position(plays) -> Dict
- analyze_by_play_type(plays) -> Dict

Include:
- Explosive play rate calculations
- Stuff rate for rushing (negative or 0-1 yard runs)
- Deep pass success rate
"""

Exercise 3.4: Efficiency Comparison Dashboard

Create a system to compare efficiency across teams/players.

"""
Create an EfficiencyDashboard class that:
1. Ranks entities by EPA and success rate
2. Identifies strengths and weaknesses
3. Creates quadrant classifications
4. Generates comparison reports

Required methods:
- rank_by_epa(entities) -> DataFrame
- rank_by_success_rate(entities) -> DataFrame
- classify_quadrant(entity) -> str
- generate_comparison_report(entity_a, entity_b) -> Dict

Output should include:
- Overall efficiency grade
- Passing vs rushing efficiency split
- Situational efficiency (early downs, late downs, red zone)
- Consistency metrics (standard deviation of EPA)
"""

Exercise 3.5: Game State EPA Model

Extend your EPA model to account for game state.

"""
Create a GameStateEPAModel that:
1. Incorporates score differential
2. Accounts for time remaining
3. Handles garbage time filtering
4. Provides win probability-adjusted EPA

Required methods:
- get_leverage_index(score_diff, time_remaining, yard_line) -> float
- get_wp_adjusted_epa(play, game_state) -> float
- is_garbage_time(score_diff, time_remaining) -> bool
- calculate_clutch_epa(plays) -> Dict

Consider:
- How value changes when leading vs trailing
- How late-game plays have different implications
- How to filter out low-leverage situations
"""

Level 4: Advanced Analysis

Exercise 4.1: Opponent-Adjusted Efficiency

Develop a method to adjust efficiency metrics for opponent quality.

Tasks: a) Calculate raw EPA per play for each team in a conference b) Determine opponent offensive/defensive EPA allowed c) Create an adjustment factor based on strength of schedule d) Apply adjustments to get "true" efficiency ratings

Considerations: - How to handle common opponents? - Circular dependency in calculations - Regression to the mean for small samples

Exercise 4.2: Situational Efficiency Analysis

Analyze how efficiency changes across game situations.

Tasks: a) Compare EPA and success rate in: - First half vs second half - When leading vs trailing - Close games vs blowouts - Early downs vs third down

b) Identify teams/players who perform differently in different situations

c) Calculate "clutch" efficiency metrics

d) Determine if situational efficiency is predictive or random

Exercise 4.3: EPA Stability Analysis

Determine how stable EPA metrics are across time.

Tasks: a) Calculate week-to-week correlation of team EPA

b) Compare EPA stability to: - Yards per play stability - Points per game stability - Success rate stability

c) Determine minimum sample size for reliable EPA estimates

d) Build confidence intervals for EPA measurements

Exercise 4.4: Play Type Efficiency Optimization

Analyze whether teams are allocating plays efficiently.

Tasks: a) Calculate EPA per play by play type for each team

b) Compare actual play selection to theoretical optimal

c) Estimate points lost from suboptimal play selection

d) Identify which teams are over/under-passing

e) Account for game script effects on play selection

Exercise 4.5: EPA Decomposition

Break down EPA into its component parts.

Tasks: a) Separate EPA into: - Field position value - Down and distance value - Yards gained value

b) Attribute EPA to individual players where possible: - Passer EPA - Receiver EPA - Rusher EPA - Offensive line EPA

c) Compare receiver EPA when targeted vs team average

d) Build a "yards over expected" model to isolate skill


Level 5: Research Projects

Research how EPA distributions have changed over time.

Research Questions: a) How has average EPA per play changed over the past 20 years? b) Has the variance of EPA increased (more explosive plays)? c) How has the passing vs rushing EPA gap evolved? d) What rule changes correlate with EPA shifts?

Deliverables: - Time series analysis of EPA trends - Identification of structural breaks - Correlation with rule changes - Future projections

Exercise 5.2: EPA for Draft Evaluation

Develop an EPA-based system for evaluating draft prospects.

Tasks: a) Calculate EPA for college players b) Adjust for team context (offensive line, scheme) c) Project NFL EPA based on college performance d) Validate model against historical draft classes

Key Questions: - How well does college EPA predict NFL success? - What other factors improve prediction? - Are there EPA thresholds that indicate NFL readiness?

Exercise 5.3: Real-Time EPA Dashboard

Build a live EPA tracking system.

Requirements: a) Parse play-by-play data as it arrives b) Calculate EPA in real-time c) Update cumulative metrics throughout game d) Visualize EPA flow during a game

Features: - EPA per drive graph - Cumulative team EPA comparison - Key play identification (highest EPA moments) - Win probability integration

Exercise 5.4: Defensive EPA Attribution

Develop a system to attribute defensive EPA to individual players.

Challenges: a) How to credit individual defenders for team stops? b) Separating pass rush from coverage contribution c) Accounting for scheme and teammates d) Handling plays where multiple defenders contribute

Approach: - Use tracking data if available - Develop proxy metrics from box scores - Build regression models for attribution

Exercise 5.5: EPA in Fourth Down Decisions

Use EPA to analyze fourth down decision-making.

Analysis: a) Calculate optimal fourth down decision using EPA b) Audit actual decisions against optimal c) Estimate points lost from conservative decisions d) Identify which coaches are most analytically inclined

Output: - Team-by-team fourth down efficiency - Quantified cost of conservatism - Recommendations for improved decision-making


Submission Guidelines

For all exercises: 1. Include all code with comments 2. Show sample output demonstrating correctness 3. Include visualizations where appropriate 4. Document assumptions and limitations 5. Discuss edge cases and how you handled them

For research projects: 1. Submit written report (2,500-3,500 words) 2. Include methodology section 3. Provide reproducible code 4. Create presentation-ready visualizations 5. Discuss implications and future directions