Appendix E — Statistics Toolkit
Golf is a game of small differences buried in large noise. A tour player's round wanders about 2.76 strokes around his own level, and the gap between the 10th- and 50th-best players is a fraction of that. Nearly every claim in this book therefore comes with a statistical method attached: an interval, a test, a shrinkage factor or a probability check.
This appendix gathers those methods in one place. Each entry gives the formula, a plain-English reading, a golf example with real or SIMULATED numbers, the toolkit function that implements it, and the chapters where it appears. The numbers come from three kinds of source:
- REAL: computed from the ESPN PGA TOUR hole-by-hole data (2004–2026) in this book's tables.
- SIMULATED: golfkit's shot simulator with a stated seed.
- Worked arithmetic: computed by
appendices/_code/appendix_e/01_statistics_examples.py, which runs in about four seconds and prints every number that is not quoted from an earlier chapter.
Notation: $n$ is a sample size (rounds, shots, events), $\bar x$ a sample mean, $s$ a sample SD, $\sigma$ a population SD, $\tau$ the SD of true skill across players, and $z_q$ the $q$ quantile of the standard normal ($z_{0.975} = 1.96$, $z_{0.80} = 0.84$).
E.0 Quick reference
| Method | Core formula | Toolkit | Main chapters |
|---|---|---|---|
| SE and CI of a mean | $s/\sqrt n$; $\bar x \pm t\,s/\sqrt n$ | yardbook.signal.mean_ci, rounds_for_ci |
2, 10, 14, 19, 28, 31 |
| Wilson interval | eq. (E.4) | yardbook.forecast.wilson |
16, 31, 34, 35 |
| Bootstrap | resample, recompute, take quantiles | signal.is_improvement_real, chapter scripts |
3–6, 9–11, 13, 14, 20, 32–35 |
| ICC and Spearman–Brown | $\tau^2/(\tau^2+\sigma^2)$; $n\rho/(1+(n-1)\rho)$ | signal.reliability |
7, 14, 17, 19, 32, 35, 39 |
| Shrinkage / empirical Bayes | $B = \tau^2/(\tau^2 + \sigma^2/n)$ | signal.shrink, shrink_group, golfkit.ratings |
9, 13, 14, 32–35 |
| Regression to the mean | $\mu + r(x-\mu)$ | signal.expected_next |
14, 23, 32, 39 |
| Power and sample size | $n = 2\bigl((z_\alpha + z_\beta)\sigma/\delta\bigr)^2$ | signal.rounds_needed, power |
7, 13, 14, 19, 22–24, 27, 28, 33, 36 |
| Multiple comparisons | Bonferroni, Holm, BH | signal.bh_adjust, yardbook.sg_deep.flag_weaknesses |
13, 14, 26, 33, 35 |
| Permutation test | shuffle labels, recompute | chapter scripts | 14, 35 |
| Linear regression, partial R² | $(\text{SSE}_\text{red} - \text{SSE}_\text{full})/\text{SSE}_\text{red}$ | chapter scripts | 4, 6, 12, 13, 17, 21, 24, 26, 32, 33, 39 |
| Logistic regression | $\operatorname{logit} p = \beta_0 + \beta_1 x$ | chapter scripts; Elo in golfkit.ratings |
16, 17, 32, 36 |
| Brier, log-loss, reliability | eqs. (E.20)–(E.23) | golfkit.predict, yardbook.forecast |
32, 34, 36 |
| Markov chain | $E = (I - Q)^{-1}c$ | golfkit.markov.MarkovHole |
16, 20, 34 |
| Monte Carlo | $\hat\theta = \frac1n\sum g(X_i)$, SE $s/\sqrt n$ | golfkit.shotsim, targeting, predict |
7, 8, 18–22, 24, 32–34, 39 |
| Kelly staking | $f^* = (pd-1)/(d-1)$ | golfkit.betting.kelly |
36 |
| Integer programming (MILP) | max $c^\top x$ s.t. $Ax \le b$, $x \in \{0,1\}$ | golfkit.dfs.optimize_lineups |
37 |
E.1 Standard deviation, standard error and confidence intervals
The sample standard deviation and the standard error of the mean are
$$ s = \sqrt{\frac{1}{n-1}\sum_{i=1}^{n}(x_i - \bar x)^2}, \qquad \text{SE}(\bar x) = \frac{s}{\sqrt n}. \tag{E.1} $$
In words: the SD measures how much single rounds bounce around; the SE measures how much the average of $n$ rounds would bounce if you played those $n$ rounds again. Averages settle down with the square root of the sample size, so four times the rounds halves the uncertainty.
A 95% confidence interval for a mean is
$$ \bar x \pm t_{0.975,\,n-1}\,\frac{s}{\sqrt n}, \tag{E.2} $$
In words: the true level is very likely within about two standard errors of what you measured. With 20 or more rounds, $t \approx 2.09$ or less, close to the normal 1.96.
Golf example (REAL). The pooled within-player round SD on the PGA TOUR is σ = 2.756 strokes (field-adjusted SG: Total, 408,603 rounds, player-years with at least 10 rounds). At that σ:
| Rounds | SE of the mean | 95% half-width |
|---|---|---|
| 4 (one event) | 1.378 | ±2.70 |
| 20 | 0.616 | ±1.21 |
| 30 | 0.503 | ±0.99 |
| 117 | 0.255 | ±0.50 |
Pinning a tour player's level to ±1 stroke takes 30 rounds; to ±0.5 stroke, 117 rounds. Inverting (E.2) with the normal quantile gives the sample size for a target half-width $h$:
$$ n = \left(\frac{1.96\,\sigma}{h}\right)^2. \tag{E.3} $$
In words: the rounds you need grow with the square of the precision you want. Halve the half-width and you need four times the rounds.
Golf example (SIMULATED). Rosa Delgado's representative 20-round sample (seed 154023; see cast.py) averages 93.40 with SD 5.81, so SE = 1.30 and the 95% CI is 90.68 to 96.12. Amateur rounds are noisier than tour rounds, so amateurs need more rounds for the same precision, not fewer. For SIMULATED golfers from scratch to 30, the 20-round SE of SG: Approach is 0.40 to 0.93 strokes per round (member course, 1,000 rounds per level, seed 2026).
Uncertainty in an SD. Dispersion work estimates SDs, not means. For normal data, $\text{SE}(s) \approx s/\sqrt{2(n-1)}$ (golfkit.dispersion.sd_standard_error). Knowing your 7-iron's lateral SD to within ±10% takes shots_needed(0.10) = 51 shots (Chapter 19).
⚠️ Common Pitfall Using
rounds_for_cito plan a before/after test. A CI half-width is not a detection threshold. To detect a change you need power (§E.7): at the tour σ, ±1-stroke precision on a change needs 59 rounds per period, but an 80% chance of detecting a true 1-stroke change needs 120 per period.
E.2 Wilson intervals for proportions
Win rates, make percentages and conversion rates are proportions $\hat p = k/n$. The textbook (Wald) interval $\hat p \pm 1.96\sqrt{\hat p(1-\hat p)/n}$ fails badly when $k$ is small or $\hat p$ is near 0 or 1. The Wilson score interval does not:
$$ \frac{\hat p + \dfrac{z^2}{2n}}{1 + \dfrac{z^2}{n}} \;\pm\; \frac{z}{1 + \dfrac{z^2}{n}}\sqrt{\frac{\hat p(1-\hat p)}{n} + \frac{z^2}{4n^2}}, \qquad z = 1.96. \tag{E.4} $$
In words: Wilson pulls the centre slightly toward one-half and widens the interval when the sample is small. It is the interval you get by asking which true rates would make your observed count unsurprising.
Golf examples (REAL; Wald computed for comparison).
| Quantity | k / n | Rate | Wilson 95% | Wald 95% |
|---|---|---|---|---|
| Pre-event #1 won, 2005–2026 | 67 / 358 | 18.7% | 15.0–23.1% | 14.7–22.8% |
| Solo 54-hole leader won | 330 / 715 | 46.2% | 42.5–49.8% | 42.5–49.8% |
| Jordan Spieth's wins while #1 | 0 / 13 | 0.0% | 0.0–22.8% | 0.0–0.0% |
| Luke Donald's wins while #1 | 1 / 4 | 25.0% | 4.6–69.9% | −17.4–67.4% |
With hundreds of trials and a rate near the middle, the two agree. With 13 trials and no wins, Wald claims certainty that the true rate is zero; Wilson says it could be as high as 23%. With 4 trials, Wald produces a negative probability. Use Wilson for every rate in golf.
Where it appears. Winning and conversion rates (Chapter 31, Chapter 34, Chapter 35); observed birdie rates by yardage (Chapter 16). yardbook.forecast.wilson(k, n) returns $(\hat p, \text{lo}, \text{hi})$.
E.3 The bootstrap
The bootstrap estimates the sampling distribution of any statistic by resampling the data you have:
- From your $n$ observations, draw $n$ with replacement.
- Compute the statistic on the resample.
- Repeat $B$ times (this book usually uses 2,000–4,000).
- The percentile interval is the 2.5th and 97.5th percentiles of the $B$ values.
$$ \hat\theta^{*}_b = \theta\bigl(x^{*}_{b,1}, \dots, x^{*}_{b,n}\bigr),\quad b = 1..B; \qquad \text{CI}_{95} = \bigl[\hat\theta^{*}_{(0.025)},\ \hat\theta^{*}_{(0.975)}\bigr]. \tag{E.5} $$
In words: treat your sample as a stand-in for the population, replay the sampling many times, and see how much the answer moves.
Resample the right unit. Shots within a round are not independent: a bad day affects them all. So the book resamples rounds for a golfer's strokes gained, years for a hole's scoring average, and whole events for tournament-model skill scores (the walk-forward Brier skill score's CI uses 200 event-block resamples, seed 7). Resampling at too fine a level makes intervals too narrow.
Golf example (SIMULATED). Rosa's SG: Approach against the SIMULATED 15.4 baseline over her 20 rounds is −1.55 per round (SD 4.64, SE 1.04). With 4,000 round resamples (seed 7), the percentile CI is −3.53 to +0.37. The t-interval from (E.2) is −3.72 to +0.62. Both cross zero: the direction of Rosa's leak is consistent across seeds, but 20 rounds can't pin its size.
⚠️ Common Pitfall The percentile bootstrap is somewhat over-confident with very small samples. Chapter 13 shows that with 20 rounds it flags false "weaknesses" more often than its nominal 5% rate, which is why that chapter combines it with a Holm correction (§E.8) and Chapter 14 adds shrinkage (§E.5).
E.4 Variance components, ICC and reliability
A golfer's round score is skill plus noise: $x_{ij} = \theta_i + \varepsilon_{ij}$, with $\text{Var}(\theta) = \tau^2$ across players and $\text{Var}(\varepsilon) = \sigma^2$ within a player. The intraclass correlation
$$ \text{ICC} = \frac{\tau^2}{\tau^2 + \sigma^2} \tag{E.6} $$
In words: the share of one round's variance that is skill.
The Spearman–Brown formula gives the reliability of an $n$-round average:
$$ \rho_n = \frac{n\,\text{ICC}}{1 + (n-1)\,\text{ICC}}, \qquad n_{\text{needed}} = \frac{\rho^{*}(1-\text{ICC})}{\text{ICC}\,(1-\rho^{*})}. \tag{E.7} $$
In words: reliability is the share of an average's spread across players that reflects real differences. It climbs toward 1 as rounds accumulate, quickly at first and then slowly. The second form tells you how many rounds give a target reliability $\rho^*$.
Golf example (REAL). Among PGA TOUR regulars (player-years with at least 40 rounds), the median skill SD is τ = 0.750 and the round SD σ = 2.751, so ICC = 0.070. Over all players, including one-start invitees, ICC = 0.132. From (E.7):
| Rounds | 1 | 8 | 20 | 40 | 100 |
|---|---|---|---|---|---|
| Reliability (ICC 0.070) | 0.070 | 0.376 | 0.601 | 0.751 | 0.883 |
Reliability 0.70 / 0.80 / 0.90 needs 31 / 53 / 120 rounds (the formula gives 53.1 for 0.80). The data agree: the within-season odd-vs-even split-half correlation among regulars is 0.756, which Spearman–Brown steps up to 0.861 for a full season, while the within-event split (rounds 1–2 vs 3–4) correlates only 0.0954 across 71,816 player-events.
Where it appears. Swing-speed tracking (Chapter 7), the variance chapter (Chapter 14), statistic stability (Chapter 17), dispersion (Chapter 19), ratings (Chapter 32), the major-gene split-half test (Chapter 35) and hole difficulty (Chapter 39).
E.5 Shrinkage and empirical Bayes
If true skill $\theta$ has a prior $N(\mu, \tau^2)$ and you observe an $n$-round mean $\bar x$ with noise variance $\sigma^2/n$, the posterior mean is
$$ \hat\theta = \mu + B\,(\bar x - \mu), \qquad B = \frac{\tau^2}{\tau^2 + \sigma^2/n}, \qquad \text{SD}_{\text{post}} = \sqrt{B\,\sigma^2/n}. \tag{E.8} $$
In words: believe your data in proportion to how informative they are. With few rounds, $B$ is small and the estimate stays near the prior; with many, $B$ approaches 1 and the data win. $B$ equals the reliability $\rho_n$ of (E.7) when the prior is the population.
Empirical Bayes estimates the prior from the group itself. With $m$ players each measured over $n$ rounds, the method-of-moments estimates are
$$ \hat\mu = \frac{1}{m}\sum_i \bar x_i, \qquad \hat\tau^2 = \max\Bigl(0,\ \operatorname{Var}(\bar x_i) - \sigma^2/n\Bigr). \tag{E.9} $$
In words: the spread of observed averages is true spread plus noise; subtract the noise to find the true spread (signal.shrink_group).
Golf example (SIMULATED, 🧪 prior). Shrink Rosa's SG: Approach of −1.55 (20 rounds, SD 4.64) toward 0 with a 🧪 prior SD of 1.0 stroke (a judgment about how far a golfer's category is likely to sit from her level). $B = 0.482$, so the estimate is −0.75 with posterior SD 0.72. Half her measured leak is likely noise.
Golf examples (REAL).
- Player ratings.
golfkit.ratings.bayes_skilluses a prior $\theta \sim N(m_0, \tau^2)$ with $m_0 = \alpha + \beta\ln(1 + n_{\text{prior rounds}})$ and data $\bar x \sim N(\theta, \sigma^2/(\kappa\,n_{\text{eff}}))$. The predictive prior fitted on 2010–2017 is α = −2.223, β = 0.247, τ = 2.043, κ = 0.282 and σ = 2.756. κ ≈ 0.28 means a past round counts about 0.28 as much as a fresh one (Chapter 32). - Early-season form. Shrinking early-season rounds cuts season prediction error by 31.2% (Chapter 14).
- The "major gene". Brooks Koepka's raw major effect among pre-LIV PGA TOUR regulars is +1.51 strokes per round; shrunk with $\bar d + (d - \bar d)\,\tau^2/(\tau^2 + \text{SE}^2)$, it is +0.98 (Chapter 35).
⚠️ Common Pitfall Shrinkage assumes the prior describes the player. A player who has stopped playing PGA TOUR events keeps a narrow posterior while his true form drifts. Chapter 34 fitted an explicit correction (2024–25, tested 2026): players with few recent rounds get +0.93 skill variance and a −0.74 strokes-per-round shift. Widening alone made forecasts worse.
E.6 Regression to the mean
When two measurements share a skill component and have independent noise, the best linear prediction of the second from the first is
$$ \mathbb{E}[x_2 \mid x_1] = \mu + r\,(x_1 - \mu), \tag{E.10} $$
where $r$ is the reliability of $x_1$ as a measure of the skill behind $x_2$. In words: extreme performances are partly luck, and luck doesn't repeat, so the next performance is expected to sit closer to the average, by a fraction $1 - r$ of the distance.
Golf examples (REAL).
- Across 113,421 player-events, the slope of round-2 SG on round-1 SG is 0.184: about 82% of a round's deviation from average disappears by the next round. With the pre-event rating in the model, $\text{R2} = 0.005 + 0.088\,\text{R1} + 0.917\,\text{rating}$.
- 18-hole leaders average +6.53 SG in round 1 and +0.69 in round 2, close to their pre-event rating of +0.44. This is the book's cleanest real demonstration.
- Season to next season, among regulars, the correlation is 0.714 and the slope 0.786.
Arithmetic from (E.10): a player who beats the field by 5.0 strokes in round 1 is expected to beat it by $0.184 \times 5.0 = 0.92$ in round 2, ignoring his rating.
Where it appears. Chapter 14 (leaders, "Sunday players"), Chapter 23 (the fitting-session winner's curse), Chapter 32 (ratings) and Chapter 39 (hole difficulty).
🔍 Why Does This Work? Selection on an extreme value selects on extreme luck. The leader after 18 holes is, almost by definition, a player whose noise term was large and positive. His skill comes with him to round 2; his noise term does not.
E.7 Power and sample size
To detect a true change $\delta$ in a golfer's mean (before vs after, $n$ rounds in each period) with a test at level $\alpha$ and power $1 - \beta$:
$$ n = 2\left(\frac{(z_{1-\alpha/k} + z_{1-\beta})\,\sigma}{\delta}\right)^2, \qquad k = 2 \text{ (two-sided) or } 1 \text{ (one-sided)}. \tag{E.11} $$
The power of a design with $n$ rounds per period is
$$ 1 - \beta = \Phi\!\left(\frac{\delta}{\sigma\sqrt{2/n}} - z_{1-\alpha/k}\right). \tag{E.12} $$
In words: the change has to stand out against the noise in two averages. The factor 2 is there because both the before and the after mean are uncertain. Halving the effect you want to see quadruples the rounds.
yardbook.signal.rounds_needed(effect, sd, power=0.80, alpha=0.05, sided=2) implements (E.11) and signal.power(effect, sd, n, sided=1) implements (E.12). This is the function to use for detecting a change; rounds_for_ci sizes a CI half-width only.
Golf examples (REAL σ = 2.756).
| Question | Answer |
|---|---|
| Rounds per period to detect a true 1-stroke change (80% power, two-sided 0.05) | 120 |
| …a 0.5-stroke change | 477 |
| Power to detect a 1-stroke change with 20 + 20 rounds (one-sided) | 0.31 |
| …with 60 + 60 | 0.63 |
| …with 120 + 120 | 0.88 |
Golf example (SIMULATED, Anchor A). Rosa's 🧪 practice plan lowers her long-run mean score by 1.54 strokes (round SD 4.75). Detecting that with 80% power, one-sided, needs 118 rounds before and 118 after. With 20 + 20 the power is 0.27, and in simulation the drop was detected 26% of the time. Her actual 20-vs-20 comparison gave a 1.20-stroke drop with one-sided Welch p = 0.237: the right fix, not yet provable.
Amateurs need more rounds. Using the SIMULATED preset score SDs on the member course (seed 1), a true 1-stroke change needs this many rounds per period (80% power, two-sided):
| Handicap preset | 0 | 10 | 20 | 30 |
|---|---|---|---|---|
| Score SD (SIMULATED) | 3.00 | 4.26 | 5.17 | 5.97 |
| Rounds per period | 142 | 285 | 420 | 560 |
That is why Chapter 28 recommends tracking a category (lower SD, bigger effect) rather than score, and why Chapter 36 finds that proving a betting edge takes thousands of bets.
Where it appears. Speed training (Ch 7), weakness detection (Ch 13), the variance chapter (Ch 14), aim bias (Ch 19), putting (Ch 22), fitting (Ch 23, Ch 24), practice (Ch 27, Ch 28), course fit (Ch 33) and betting (Ch 36).
E.8 Multiple comparisons: Bonferroni, Holm and Benjamini–Hochberg
Run 20 tests at α = 0.05 on pure noise and you expect one "significant" result. Golf analysis runs many tests at once: every player's "major effect", every putting band, every course's fit. Three corrections are used in this book. Sort the $m$ p-values so that $p_{(1)} \le \dots \le p_{(m)}$.
Bonferroni rejects $H_{(i)}$ if $p_{(i)} \le \alpha/m$.
Holm (step-down) rejects $H_{(1)}, \dots, H_{(k)}$, where $k$ is the largest index such that
$$ p_{(j)} \le \frac{\alpha}{m - j + 1} \quad \text{for every } j \le k. \tag{E.13} $$
In words: test the smallest p-value at the strict Bonferroni threshold, the next at a slightly looser one, and stop at the first failure. Holm controls the family-wise error rate (the chance of any false discovery) like Bonferroni, but never rejects fewer hypotheses than Bonferroni does.
Benjamini–Hochberg (BH) rejects $H_{(1)}, \dots, H_{(k)}$, where
$$ k = \max\Bigl\{\,i : p_{(i)} \le \frac{i}{m}\,q\Bigr\}. \tag{E.14} $$
In words: BH controls the false discovery rate, the expected share of false positives among your discoveries, at $q$. It is the right tool when you are screening many candidates and can tolerate a few false leads. The book uses q = 0.10.
Worked example (SIMULATED, seed 13). Twenty one-sample t-tests of 20 observations each; 17 have no effect and 3 have a true effect of 1 SD. Raw p < 0.05: 4 results, one of them false. Bonferroni: 3. Holm: 3. BH (q 0.10): 3, none false. The smallest null p-value was 0.0299, which survives no correction.
Golf examples (REAL).
- "Sunday players." A fair test of round 4 against round 3 for every regular yields 0 discoveries after correction (Chapter 14); naive lists of "closers" are cut-selection bias.
- The major gene (123 pre-LIV PGA TOUR regulars): 29 players have nominal p < 0.05 where chance alone gives about 6, and 12 survive BH at q < 0.10 (Chapter 35).
signal.bh_adjust(pvalues, q) returns BH discoveries, q-values and the Bonferroni decisions. yardbook.sg_deep.flag_weaknesses(..., method="holm") (Chapter 13) applies Holm to a golfer's strokes-gained bands.
E.9 Permutation tests
A permutation test builds the null distribution by shuffling the labels that the null hypothesis says don't matter:
- Compute the statistic $T_{\text{obs}}$ on the real labels.
- Shuffle the labels (before/after, major/regular) $B$ times, recomputing $T$ each time.
- The one-sided p-value is
$$ p = \frac{1 + \#\{b : T^{*}_b \ge T_{\text{obs}}\}}{1 + B}. \tag{E.15} $$
In words: if the labels really don't matter, the real arrangement is just one of many equally likely shuffles; the p-value is how often a shuffle looks at least as extreme. The +1 terms count the real arrangement as one of the shuffles, so p is never exactly zero.
The test makes no normality assumption, and the shuffle can respect structure: shuffle within a player and you preserve each player's skill.
Golf example (SIMULATED). Rosa's 20 rounds before (seed 154023) and 20 after her 🧪 practice change (seed 154100) differ by 1.20 strokes. With 10,000 shuffles (seed 2026), the one-sided permutation p is 0.247, close to Welch's 0.237. The two tests agree when the data are well behaved.
Golf example (REAL). The major-gene test shuffles each player's major and regular-event labels 1,000 times (seed 2026) and recomputes a heterogeneity statistic $Q$ across players. For pre-LIV regulars (the cleanest specification), $Q$ = 351 against a null mean of 192, permutation p = 0.001. The placebo, elite-field non-majors vs other non-majors, gives p = 0.504. The effect is real but modest: τ = 0.32 and split-half r = 0.26, and once damped it adds almost nothing to walk-forward forecasts (+0.0003 strokes per round) (Chapter 35).
E.10 Linear regression and partial R²
Ordinary least squares fits $y = X\beta + \varepsilon$ by
$$ \hat\beta = (X^\top X)^{-1}X^\top y, \qquad R^2 = 1 - \frac{\text{SSE}}{\text{SST}}. \tag{E.16} $$
In words: find the weights that make the predictions' squared errors as small as possible; $R^2$ is the share of the outcome's variance the predictors explain.
Standardized coefficients z-score every variable first, so a coefficient reads "SDs of outcome per SD of predictor" and predictors on different scales can be compared. Cluster-robust SEs allow observations from the same player to be correlated; they are wider than ordinary SEs and are the honest choice for player-event data.
The partial R² of a predictor is the share of the remaining unexplained variance that it explains when added last:
$$ R^2_{\text{partial}}(x_j) = \frac{\text{SSE}_{\text{without } x_j} - \text{SSE}_{\text{with } x_j}}{\text{SSE}_{\text{without } x_j}}. \tag{E.17} $$
In words: how much better the model gets from this variable, given everything else.
Golf example (REAL, ESPN player statistics 2015–2026; 2,106 player-seasons, every stat centred within its event). Explaining field-adjusted SG: Total:
| Model | Predictor | Std. coef | Partial R² | Model R² |
|---|---|---|---|---|
| A: driving only | distance | +0.489 | 0.190 | 0.254 |
| A: driving only | accuracy | +0.535 | 0.219 | 0.254 |
| B: + GIR | distance | +0.074 | 0.006 | 0.519 |
| B: + GIR | GIR | +0.674 | 0.355 | 0.519 |
| C: full | GIR | +0.627 | 0.558 | 0.819 |
| C: full | putts per GIR | −0.496 | 0.563 | 0.819 |
| C: full | sand saves | +0.154 | 0.109 | 0.819 |
Driving's coefficients collapse once GIR enters, because GIR is downstream of driving: long, straight drives produce greens hit. Model A measures driving's total effect, model C its direct effect holding GIR fixed. Neither is "the" effect; they answer different questions.
In raw units (model A, season level), each yard of distance is worth +0.0390 SG per round and each percentage point of accuracy +0.0721, so 1.85 yards of distance trade for one point of accuracy.
Where it appears. Chapter 17 (traditional statistics), Chapter 21 (distance vs accuracy), Chapter 33 (course-fit regressions), plus trend and calibration fits in Chapters 4, 6, 12, 13, 24, 26, 32 and 39.
⚠️ Common Pitfall Reading a regression coefficient as a causal effect. ESPN's statistics come from players who chose how to play; a long hitter's accuracy reflects his strategy as well as his skill. Treat these as descriptions of the tour, not as what you would gain from 10 more yards.
E.11 Logistic regression
For a yes/no outcome (birdie or not, win or not), logistic regression models the log-odds as linear:
$$ \log\frac{p}{1-p} = \beta_0 + \beta_1 x, \qquad p = \frac{1}{1 + e^{-(\beta_0 + \beta_1 x)}}. \tag{E.18} $$
In words: each unit of $x$ multiplies the odds $p/(1-p)$ by $e^{\beta_1}$, the odds ratio. Probabilities stay between 0 and 1, and the effect on the probability scale is largest near 50%.
Golf example (REAL). Birdie-or-better on par 4s against card yardage, 2004–2026 (12,193 event-holes, 4,266,651 hole scores), with $x$ = (yards − 425)/100: intercept −1.623, slope −0.879 (SE 0.007). From (E.18):
| Par-4 yardage | 350 | 425 | 450 |
|---|---|---|---|
| Fitted P(birdie or better) | 27.6% | 16.5% | 13.7% |
The odds ratio per 25 yards is $e^{-0.879 \times 0.25} = 0.803$: every 25 yards multiplies the odds of birdie by about 0.8. Because scores on one hole in one week share conditions, the SEs are quasi-binomial, scaled by the Pearson dispersion φ = 6.20 (Chapter 16).
Elo is a logistic model. golfkit's Elo gives player $i$'s expected head-to-head score against $j$ as
$$ E_{ij} = \frac{1}{1 + 10^{(R_j - R_i)/400}}, \tag{E.19} $$
a logistic curve in the rating difference with base 10 (Chapter 32). Chapter 36 uses a logistic recalibration, regressing outcomes on the log-odds of predicted probabilities, to test whether a model's matchup probabilities are too timid or too bold; a slope above 1 means the model should be more confident. Chapter 17 discusses logistic putt-make models in the history of golf statistics.
E.12 Scoring probability forecasts: Brier score, log-loss and reliability diagrams
A forecast $p_i$ for a binary outcome $y_i \in \{0, 1\}$ is scored by
$$ \text{Brier} = \frac{1}{N}\sum_{i=1}^{N}(p_i - y_i)^2, \tag{E.20} $$
$$ \text{Log-loss} = -\frac{1}{N}\sum_{i=1}^{N}\bigl[y_i\ln p_i + (1-y_i)\ln(1-p_i)\bigr]. \tag{E.21} $$
In words: Brier is the mean squared error of the probabilities. Log-loss is the average surprise; it punishes confident misses severely and is infinite for a forecast of 0 that happens.
Both are proper: you minimise your expected score by reporting your true belief. A skill score compares a model with a reference forecast (here, the base rate within each event, such as 1/field for winning):
$$ \text{BSS} = 1 - \frac{\text{Brier}_{\text{model}}}{\text{Brier}_{\text{ref}}}, \qquad \text{LLS} = 1 - \frac{\text{LL}_{\text{model}}}{\text{LL}_{\text{ref}}}. \tag{E.22} $$
In words: the fraction of the reference's error that the model removes. 0 means no better than the base rate; 1 is perfect.
Single forecasts (REAL, 2025 Masters walk-forward). Scottie Scheffler was given P(win) = 0.125 and finished 4th: Brier $(0.125 - 0)^2 = 0.0156$, log-loss 0.1335. Rory McIlroy was given 0.052 and won: Brier $(0.052 - 1)^2 = 0.8987$, log-loss 2.9565. One event says little; the scores mean something only when averaged over many.
The walk-forward tournament model (REAL, 2024–2026, 133 events, 15,899 player-events).
| Market | Brier | Brier (base rate) | BSS (95% CI) | Log-loss | Log-loss (base rate) |
|---|---|---|---|---|---|
| Win | 0.00802 | 0.00828 | 0.031 (0.016 to 0.048) | 0.04319 | 0.04771 |
| Top 10 | 0.07935 | 0.08505 | 0.067 (0.058 to 0.075) | 0.28032 | 0.30843 |
| Make cut | 0.19984 | 0.21790 | 0.083 (0.073 to 0.092) | 0.56956 | 0.60783 |
Check the win row: $1 - 0.00802/0.00828 = 0.031$, and the log-loss skill is $1 - 0.04319/0.04771 = 0.095$. The skill is small but real; the CI excludes zero (Chapter 34).
Reliability diagrams. Sort forecasts into bins of predicted probability. In each bin, plot the mean predicted $\bar p_k$ against the observed rate $\bar y_k$. A calibrated model lies on the diagonal. Scale each gap by its binomial SE:
$$ z_k = \frac{\bar y_k - \bar p_k}{\sqrt{\bar p_k(1 - \bar p_k)/n_k}}. \tag{E.23} $$
In words: is the bin's miss larger than chance would produce? $|z| > 2$ in one bin of ten is not alarming; a run of same-signed $z$ is.
Win forecasts, fixed bins (REAL walk-forward):
| Predicted P(win) | n | Mean predicted | Observed | Observed / expected | z |
|---|---|---|---|---|---|
| 0.00–0.01 | 11,966 | 0.0038 | 0.0048 | 1.26 | +1.76 |
| 0.01–0.02 | 2,598 | 0.0137 | 0.0108 | 0.79 | −1.27 |
| 0.02–0.05 | 1,141 | 0.0287 | 0.0193 | 0.67 | −1.90 |
| 0.05–0.10 | 124 | 0.0624 | 0.0726 | 1.16 | +0.47 |
| 0.10–0.20 | 51 | 0.1433 | 0.2353 | 1.64 | +1.88 |
| 0.20–1.00 | 19 | 0.2391 | 0.2632 | 1.10 | +0.25 |
Every |z| is at most 1.90. The model is statistically indistinguishable from calibrated, yet its observed/expected ratio wanders from 0.67 to 1.64. That wander is as large as the edge a 20–40% bookmaker margin would demand (§E.15).
The same scoring rules choose model settings. In Chapter 32, the Elo K-factor scan on 2016–2026 head-to-head pairs gives log-loss 0.65178 (K 16), 0.64330 (K 32), 0.64059 (K 48) and 0.64008 (K 64), against 0.6931 for a coin flip. Chapter 36 scores matchup probabilities the same way.
E.13 Markov chains
A golf hole is an absorbing Markov chain. The states are (lie, distance bucket), and "holed" is the absorbing state. Each shot moves the ball from one state to the state the next shot is played from, at a cost of 1 + penalty strokes. Let $Q$ be the transition matrix among non-absorbing states and $c_s = 1 + \mathbb{E}[\text{penalty} \mid s]$. Then the expected strokes to hole out from every state solve
$$ E = Q\,E + c \quad\Longrightarrow\quad E = (I - Q)^{-1}c. \tag{E.24} $$
In words: your expected strokes from here are the cost of this shot plus the expected strokes from wherever it sends you, averaged over where it might send you. Solving that for every state at once is one matrix inversion.
The full stroke distribution comes from dynamic programming: the probability of holing out in exactly $k$ strokes from state $s$ is the probability of reaching "holed" on this shot (when $k = 1 + \text{penalty}$) plus the sum, over next states $s'$, of $P(s \to s') \times P(\text{exactly } k - 1 - \text{penalty from } s')$. Summing these by score relative to par gives birdie, par and bogey probabilities.
Golf example (SIMULATED). The 15-handicap preset on the demo hole water_right_approach_par4 (410 yards, water right of the green), chain estimated from 20,000 simulated plays (seed 0):
| Eagle or better | Birdie | Par | Bogey | Double bogey or worse |
|---|---|---|---|---|
| 0.000 | 0.011 | 0.174 | 0.377 | 0.437 |
Expected strokes from the tee: 5.576. Against direct simulation on the four demo holes, the chain's mean strokes differ by −0.002 to +0.014 and every score-class probability is within 0.6 percentage points.
The Markov assumption (🧪): within a bucket all balls are alike, and the next shot depends only on the current state, not on how the ball got there. That ignores, for example, a golfer who is rattled after a penalty. markov.check_against_simulation measures the error.
Where it appears. Scoring probabilities (Chapter 16), risk–reward (Chapter 20) and as a contrast to full simulation in tournament prediction (Chapter 34).
E.14 Monte Carlo simulation
Monte Carlo estimates a quantity by simulating it many times and averaging:
$$ \hat\theta = \frac{1}{n}\sum_{i=1}^{n} g(X_i), \qquad \text{SE}(\hat\theta) = \frac{s_g}{\sqrt n}; \qquad \text{for a probability: } \text{SE}(\hat p) = \sqrt{\frac{\hat p(1-\hat p)}{n}}. \tag{E.25} $$
In words: the simulation's own error shrinks with the square root of the number of runs, just like a sample mean. Always report it, so readers can tell model differences from simulation noise.
Golf examples.
- Tournament probabilities (REAL model, simulated outcomes). Each walk-forward event is simulated 10,000 times. A favourite at P(win) = 0.125 carries a Monte Carlo SE of 0.0033; a 1% longshot, 0.0010.
- Aim optimisation (SIMULATED). Marcus Bell's expected strokes from 160 yards aiming at the pin are 4.132 ± 0.007 (n = 20,000); P(water) = 0.383 carries an SE of 0.0034. The 0.39-stroke saving from the optimal aim (3.738 ± 0.005) is more than 40 standard errors of the difference.
- Bankroll paths (SIMULATED). 20,000 paths of 1,000 bets each (§E.15).
Good practice used throughout the book:
- Fix and state the seed (
np.random.default_rng(seed)), so every SIMULATED number can be reproduced. - Common random numbers: when comparing two options (two aim points, two paces on a putt), use the same random draws for both. The difference then has far less noise than either estimate.
putting.optimal_target_pastdoes this. - Representative samples: the cast's default 20-round seeds were chosen from 60 candidates as the sample closest to each golfer's 600-round profile. Chapter 14 and Chapter 28 show what other seeds look like.
Where it appears. Speed training and putting (Ch 7, Ch 8), course management (Ch 18–22), driver fitting (Ch 24), ratings, course fit and tournaments (Ch 32–34) and course design (Ch 39).
E.15 Kelly staking
For a binary bet at decimal odds $d$ (a winning 1-unit stake returns $d$), with your true win probability $p$, the stake fraction that maximises the long-run growth rate of your bankroll is
$$ f^{*} = \max\!\left(0,\ \frac{p\,d - 1}{d - 1}\right), \qquad g(f) = p\ln\bigl(1 + f(d-1)\bigr) + (1-p)\ln(1 - f). \tag{E.26} $$
In words: stake your edge ($pd - 1$, the expected profit per unit) divided by the net odds. $g(f)$ is the expected log growth per bet; full Kelly maximises it, and staking about twice Kelly drives it to zero.
The edge must be real first. With a proportional bookmaker margin (overround) $O$, a price implies $p_{\text{imp}} = p_{\text{fair}}(1 + O)$. A bet has positive expected value only if
$$ p_{\text{true}} > (1 + O)\,p_{\text{fair}}. \tag{E.27} $$
In words: you must believe the player is $(1+O)$ times as likely to win as the de-vigged market says: 1.2 times at a 🧪 20% margin.
Worked examples (HYPOTHETICAL prices, 🧪 true edge +5% EV).
| Price (decimal) | True p | Full Kelly stake | Log growth per bet |
|---|---|---|---|
| 6.0 (5/1) | 0.1750 | 1.00% of bankroll | 0.000247 |
| 21.0 (20/1) | 0.0500 | 0.25% | 0.000062 |
Bankroll paths (SIMULATED, 20,000 paths × 1,000 bets, rng 2026; start 100):
| Price | Staking | Median final | P(ever ≤ 50%) | Median max drawdown |
|---|---|---|---|---|
| 6.0 | Full Kelly | 128.0 | 0.218 | 0.50 |
| 6.0 | Quarter Kelly | 111.5 | 0.000 | 0.15 |
| 6.0 | "Full Kelly" on an edge believed to be +10% (≈ 2× Kelly) | 101.2 | 0.609 | 0.79 |
| 21.0 | Full Kelly | 106.3 | 0.025 | 0.30 |
| 21.0 | Quarter Kelly | 102.8 | 0.000 | 0.08 |
Fractional Kelly gives up some growth for far smaller drawdowns, and it protects you against the most common mistake: overestimating your edge. Overestimate it twofold and full Kelly's growth all but vanishes: at 5/1, the log growth over 1,000 bets falls from 0.247 to 0.012 (Chapter 36).
E.16 Integer programming for DFS lineups (MILP)
A daily-fantasy lineup is a choice of golfers under a salary cap. With $x_j \in \{0, 1\}$ indicating whether golfer $j$ is in the lineup, $\pi_j$ his projected points and $s_j$ his salary:
$$ \max_{x}\ \sum_j \pi_j x_j \quad \text{s.t.} \quad \sum_j s_j x_j \le C, \quad \sum_j x_j = K, \quad x_j \in \{0, 1\}. \tag{E.28} $$
In words: pick exactly $K$ golfers whose salaries fit under the cap and whose projections add up to the most points. For DraftKings Classic, $K = 6$ and $C = \$50{,}000$ (checked 2026-11-26).
Because the $x_j$ must be whole numbers, this is a mixed-integer linear program (MILP). Greedy rules, such as picking the best points per dollar, are not guaranteed to find the optimum. golfkit.dfs.optimize_lineups solves it exactly with scipy.optimize.milp; its tests check optimality by brute force on a 12-player pool. Multiple lineups add two kinds of constraint:
$$ \sum_{j \in L_k} x_j \le K - u \quad \text{for each earlier lineup } L_k, \qquad \sum_k x_{jk} \le \lfloor e\,N \rfloor. \tag{E.29} $$
In words: each new lineup must differ from every earlier one in at least $u$ golfers, and no golfer may appear in more than a share $e$ of the $N$ lineups (exposure).
Worked example (SIMULATED pool, seed 37). Thirty golfers with skills drawn from N(0, 1), 🧪 teaching salaries $6,000 + $5,000·u^1.6 rounded to $100 (u = skill rescaled to 0–1), and projections from the book's fitted DraftKings curve, 56.16 + 11.26·skill + 0.551·skill². The six highest projections cost $59,300 and total 425.3 points: over the cap. The MILP's best legal lineup uses exactly $50,000 for 351.6 points. With $u = 2$, the second and third lineups score 351.4 and 351.3: many near-optimal lineups exist, which is why exposure and uniqueness rules matter more than the last decimal of projection. The pool, salaries and projections here are teaching values, not real prices (Chapter 37).
E.17 Chapter-by-chapter index
| Chapter | Methods |
|---|---|
| 1, 2 | Model-vs-reference RMSE, SE of a mean, simulator calibration |
| 3–6 | Bootstrap CIs of fitted slopes and differences; trend regressions |
| 7 | Power for speed-training logs, Monte Carlo, reliability |
| 8 | Monte Carlo make probabilities |
| 9 | Bootstrap, empirical-Bayes shrinkage of sand-save rates |
| 10, 11 | Round-bootstrap CIs for strokes gained |
| 13 | Bootstrap by band, Holm correction, detection power |
| 14 | SE, ICC, Spearman–Brown, shrinkage, regression to the mean, power, BH, permutation |
| 16 | Logistic regression (quasi-binomial), Wilson, Markov chains |
| 17 | Correlation, standardized regression, partial R² |
| 18–22 | Monte Carlo targeting, Markov chains, dispersion SEs, power for bias |
| 23, 24 | Power and shots-to-detect, regression to the mean, Welch tests |
| 26 | Multiple comparisons (BH) for ball tests |
| 27, 28 | Power, Welch and bootstrap tests on before/after rounds |
| 31 | Wilson intervals, rank correlation |
| 32 | Empirical Bayes ratings, Elo (logistic), log-loss and Brier |
| 33 | Out-of-sample regression, event-block bootstrap, BH, power |
| 34 | Monte Carlo tournaments, Brier/log-loss skill, reliability, Wilson |
| 35 | Permutation test, DerSimonian–Laird τ, split-half, BH, shrinkage |
| 36 | Kelly, required edge, power for betting records, logistic recalibration |
| 37 | MILP lineups, projection regression |
| 39 | Regression, reliability, Monte Carlo |
Further reading. Efron, B. and Tibshirani, R. J. (1993), An Introduction to the Bootstrap · Wilson, E. B. (1927), "Probable inference, the law of succession, and statistical inference," JASA 22:209–212 · Holm, S. (1979), "A simple sequentially rejective multiple test procedure," Scandinavian Journal of Statistics 6:65–70 · Benjamini, Y. and Hochberg, Y. (1995), "Controlling the false discovery rate," JRSS B 57:289–300 · Efron, B. and Morris, C. (1975), "Data analysis using Stein's estimator and its generalizations," JASA 70:311–319 · Brier, G. W. (1950), "Verification of forecasts expressed in terms of probability," Monthly Weather Review 78:1–3 · Kelly, J. L. (1956), "A new interpretation of information rate," Bell System Technical Journal 35:917–926. See also the bibliography.