What the number means
An estimate of 0.20 xG represents roughly 20 goals in 100 comparable shots according to this model. It is not an exact probability for a particular player. Here, the invented scene simplifies real context.
Source and population
We use StatsBomb Open Data with observed goal/non-goal outcomes; source xG is never the target. The population consists of male open-play foot shots. Headers, penalties and other situations are excluded from training. Event frames are the primary observation; optional 360 availability does not guarantee all defenders are visible. Missing keepers and singular goal-line cases are excluded, without imputation.
StatsBomb Open DataEight positional inputs
Geometry describes the opportunity; counts and distances describe observed opponents. The cone is the finite triangle between shot and posts. Positions use meters independently of SVG. With zero defenders, distance uses the pitch diagonal sentinel alongside the explicit count. Other attackers, identity, preferred foot, technique, speed and temporal context are omitted.
| Feature | Rationale |
|---|---|
| Shot distance (m) | Distance to the goal center. |
| Goal opening angle (°) | Opening between goalposts. |
| Lateral offset (m) | Lateral asymmetry without distinguishing left/right. |
| Represented defenders | Number of represented opponents. |
| Defenders in cone | Occupancy of the shot triangle. |
| Nearest defender (m) | Proximity of the nearest observed opponent. |
| Keeper to goal (m) | Keeper positioning relative to goal. |
| Keeper to shot (m) | Proximity between keeper and shot. |
Training, selection and freezing
Whole matches are separated into training, calibration, selection and test, avoiding shared match events between groups. Bounded search uses five folds on training only; logistic scaling is fitted within each fold. Three logistic regressions isolate geometry, defenders and all inputs. Shallow XGBoost tests nonlinear interactions. There is no class balancing or post-selection refit.
| Partition | Matches | Shots | Goals |
|---|---|---|---|
| Calibration | 183 | 3,440 | 314 |
| Selection | 180 | 3,643 | 324 |
| Final test | 363 | 7,160 | Unopened during selection |
| Training | 1,087 | 20,777 | 1,966 |
The declared rule selected XGBoost using observed performance and the Brier deterioration guardrail for preferring simplicity. Selection intervals did not establish conclusive superiority. Sigmoid calibration did not meet adoption criteria. Freezing means fixing inputs, preprocessing, trees and calibration before opening the final test; the interface only executes those parameters.
- XGBoost
- 300 trees · depth 2 · learning rate 0.05 · minimum child weight 5
- Calibration
- No recalibration (identity)
Validation and final test
Log loss penalizes confident wrong probabilities; Brier measures squared probability error. Lower is better. Selection chooses the model; final test evaluates the already fixed model. It was not used for retuning. The 95% intervals resample whole matches, preserving shot dependence.
Selection — not the final test
| Model | Shots | Goals | Log loss | Brier |
|---|---|---|---|---|
| Constant prevalence | 3,643 | 324 | 0.300265 | 0.08106 |
| Logistic: geometry | 3,643 | 324 | 0.245876 | 0.069567 |
| Logistic: defenders | 3,643 | 324 | 0.240204 | 0.067658 |
| Full logistic | 3,643 | 324 | 0.238355 | 0.067612 |
| Full XGBoost | 3,643 | 324 | 0.235208 | 0.066974 |
Final test held out until freezing
| Model | Shots | Goals | Log loss | Brier |
|---|---|---|---|---|
| Full XGBoost | 7,160 | 655 | 0.239965 | 0.068339 |
| Full logistic | 7,160 | 655 | 0.242871 | 0.069261 |
| Constant prevalence | 7,160 | 655 | 0.306008 | 0.083122 |
Paired final-test differences
XGBoost minus reference: negative values favor XGBoost. Overall intervals favor the candidate on this test; this does not guarantee an advantage in every slice or transfer to other competitions or scenes.
| Reference | Score | Difference | 95% interval |
|---|---|---|---|
| Constant prevalence | Brier | -0.014783 | [-0.017492; -0.012139] |
| Constant prevalence | Log loss | -0.066043 | [-0.075388; -0.056869] |
| Full logistic | Brier | -0.000922 | [-0.001781; -0.000067] |
| Full logistic | Log loss | -0.002906 | [-0.005424; -0.000343] |
Calibration and sparse samples
The diagonal represents agreement between predicted mean and observed frequency. Bars show match-based 95% intervals of observed frequency; hollow points mark sparse bins. No supported bin was flagged, but high-probability ranges have few examples and do not support precision for extreme scenes.
| Prediction bin | Shots | Predicted mean | Observed frequency | 95% interval | Sparse |
|---|---|---|---|---|---|
| 0%–10% | 5,324 | 3.5% | 3.7% | 3.1% – 4.2% | Supported |
| 10%–20% | 818 | 14.3% | 13.6% | 11.2% – 15.9% | Supported |
| 20%–30% | 429 | 24.8% | 21.7% | 17.9% – 25.6% | Supported |
| 30%–40% | 282 | 34.4% | 33.7% | 28.2% – 39.6% | Supported |
| 40%–50% | 164 | 44.4% | 47% | 39.6% – 53.5% | Supported |
| 50%–60% | 69 | 54.7% | 49.3% | 37.3% – 60.3% | Sparse |
| 60%–70% | 41 | 64% | 58.5% | 44.2% – 73.3% | Sparse |
| 70%–80% | 17 | 74.2% | 82.4% | 62.5% – 100% | Sparse |
| 80%–90% | 9 | 85.3% | 55.6% | 20% – 87.5% | Sparse |
| 90%–100% | 7 | 91.8% | 100% | 100% – 100% | Sparse |
The adverse slice matters too
With two defenders inside the cone, XGBoost was worse than full logistic on this test. This refers to the cone count, not the total on the pitch. We keep this result visible; overall averages do not erase local failures.
Shots: 815 · Supported
| Score | Difference | 95% interval |
|---|---|---|
| Brier | 0.000877 | [-0.000344; 0.002305] |
| Log loss | 0.005375 | [0.000098; 0.011708] |
Illustrative scenes and transfer
The descriptive reference uses neighbors in standardized training-only features, with a 99% threshold and a separate zero-defender cohort. We do not publish reference rows, so the interface does not calculate joint support for each edit. Four open-play presets fall outside this reference; being inside does not prove realism either. Rare scenes remain explorable. Comparisons are not causal effects; partial visibility, few defenders and other domains limit interpretation.
Execution and reproduction
TypeScript extracts the same eight inputs as the Python pipeline. The loader validates and captures immutable parameters; XGBoost preserves float32 comparisons/accumulation within 1e-7 tolerance. Trees may retain the result after small movements. Invalid inputs or unavailable models receive no substitute heuristic. Penalties use the fixed 0.76 convention, separate from the learned model.
Scientific review was accepted with limitations and distribution of the exact artifact was reviewed for the free/non-commercial scope. The original automatic status remains “needs_review”; review does not authorize publication. Private training and complete reproduction were run by the owner; the assistant reviewed aggregates/checks without rerunning private data.
Identity and review
- Artifact
- 758526873b8a3a2681f655c064dee52f8bd33749accd499d015420dbe8e11b9a
- Training run
- 222909fe801f4865897fea3541e023fed626f6736dca6ef69ceada1f7c57945a
- Evidence
- e579e10f9699077ddf05e7433af5ed63edf0e03c3ea8c7ca295844951d74ea08
- Scientific review · Oct 11, 2026
- Accepted with limitations
- Original automated status
- Needs review
- Publication authorization
- No
- Final test held out until freezing
- 7,160 Shots · 655 Goals