Live app: https://waazy-w.github.io/pull-the-goalie/ (runs in your browser, first load ~30 seconds) Code: https://github.com/waazy-w/pull-the-goalie

The problem

When a hockey team is losing late in a game, the coach can pull the goalie and add an extra attacker. It's a gamble: you're more likely to score, but the other team can shoot into an empty net. Analysts have said for years that coaches wait too long, but coaches have never had a simple answer to "when exactly should I pull?"

What we built

A web app that answers that question, using every play from 4,072 NHL games (2023-24 to today).

  • The Verdict: the best time to pull vs. what NHL teams actually do.
  • Bench Calculator: enter the score, time left, and power-play situation, and it tells you "PULL NOW" or "WAIT until 3:35".
  • Team Audit: ranks every team by how many standings points they lost by pulling too late.
  • Game Replay: pick a real game and see when the team pulled vs. when they should have.

What we found

Situation Best time to pull When NHL teams actually pull
Down by 1 goal 3:35 left 1:57 left
Down by 2 goals 7:21 left 2:42 left
  • 94% of these decisions were made too late, and teams haven't changed in four seasons.
  • Waiting too long costs the league about 13 standings points every season.
  • Stronger offensive teams should pull even earlier, as early as about 5 minutes left.

How it works

  1. We downloaded every play from the free NHL API, which tells us exactly when each goalie was on the bench.
  2. We measured how often teams score and get scored on with the goalie in vs. pulled.
  3. We used a dynamic programming model to simulate the rest of the game second by second and find the pull time that earns the most standings points.
  4. We checked our work: we trained on two seasons, tested on later seasons, and used bootstrapping to get confidence ranges (down 1: 3:01 to 4:13).

Why it matters

  • Coaches get a simple rule for the bench: down 1, pull at 3:35; down 2, pull at 7:21.
  • Front offices see exactly how many points the habit costs their team.
  • It's free value: no trades, no salary cap space, just better timing.

Limitations

Each late pull costs only a small amount; it adds up because it happens about 1,000 times a season. The model also doesn't know where the puck is when the goalie is pulled, so its predictions for comebacks are a bit conservative.

Built With

Share this project:

Updates

Submission history