Chapter 11 · 38 pages · Part: From Data to Decisions
Is the Change Real? Statistics and Machine Learning
The athlete jumped 2 cm higher than last month. Is that training, or noise?
Read online PDF 877 kB Notebook + data 40 kB Markdown
Learning objectives
- Measure your own typical error from a test and a retest, set a smallest worthwhile change, and judge one athlete's result with a decision rule that ends in words.
- Compare two devices or two methods with bias and limits of agreement, and explain why a high correlation does not show that they agree.
- Put a range on a mean or a median by resampling the independent unit, and report a group result as a size with an interval.
- Say what a p-value and a fitted slope do and do not tell a coach, name the likely confounders, and write a one-page experiment plan.
- Fit and check a regression on real running data, compare it with a shallow tree and a mean baseline, and fit simple models to one athlete.
- Train and test a classifier without leaking information, choose its threshold from precision and recall, and judge a forecast against persistence with a chronological split.
- Say what ten athletes, or ten sessions, can and cannot support.
Apps
Sections
- 11.1One Athlete, Many Days
- 11.2Two Methods
- 11.3Groups
- 11.4Regression
- 11.5Individual Models
- 11.6Classification
- 11.7Leakage
- 11.8Time Series
- 11.9Small Data, Honestly
- 11.10How Good Is the Number?
- 11.11Telling the Athlete
- 11.12Build Step B-11: A Baseline on the Device
- 11.13Summary
- 11.14Exercises
Lecture slides
Two decks for this chapter, one for each class of the week. Each has a speaker script; text CC BY 4.0.
Typical Error, Agreement and a First Model
Class 21, sections 11.1–11.4 · 29 slides · about 37.5 min
Models, Leakage and Honest Small Data
Class 22, sections 11.5–11.12 · 29 slides · about 37.5 min
Tutorials
From a raw file to an action, with every step runnable in the browser. Case studies are also printed in Part V.
- CS-15 Is the change real? One test, twelve weeks case study, 70 min
- CS-16 Forecast next week, and beat "same as last week" case study, 60 min
- Q-31 Scale two features, the right way and the wrong way quick tutorial, 15 min
- Q-32 Split by athlete, not by row quick tutorial, 15 min
- Q-33 A rolling mean and a band quick tutorial, 15 min
Code listings
- Listing 11.1 Typical error, SWC and the three chances (`code/typical_error.py`). code/typical_error.py
- Listing 11.2 Output of Listing 11.1.
- Listing 11.3 Bootstrap intervals for the mean and median of repeats, and the cost of resampling the wrong unit (`code/bootstrap.py`). code/bootstrap.py
- Listing 11.4 Output of Listing 11.3.
- Listing 11.5 Bias and limits of agreement, applied to stride length (`code/agreement.py`). code/agreement.py
- Listing 11.6 Output of Listing 11.5.
- Listing 11.7 Change in peak force for one rung up the speed ladder (`code/groups.py`). code/groups.py
- Listing 11.8 Output of Listing 11.7.
- Listing 11.9 Peak force from one gait measure, then from ten (`code/regression.py`). code/regression.py
- Listing 11.10 Output of Listing 11.9.
- Listing 11.11 Critical speed and heart rate against speed (`code/individual.py`). code/individual.py
- Listing 11.12 Output of Listing 11.11.
- Listing 11.13 Fit an impulse–response model to simulated tests (`code/fitness_fatigue.py`, lines 4–27). code/fitness_fatigue.py
- Listing 11.14 Output of Listing 11.13.
- Listing 11.15 A line, two shallow trees and the mean baseline, each scored on held-out runners (`code/tree.py`). code/tree.py
- Listing 11.16 Output of Listing 11.15.
- Listing 11.17 Fast or slow step, tested two ways (`code/classify.py`). code/classify.py
- Listing 11.18 Output of Listing 11.17.
- Listing 11.19 Running or not, at three thresholds, with the majority-class baseline (`code/thresholds.py`). code/thresholds.py
- Listing 11.20 Output of Listing 11.19.
- Listing 11.21 The same models, scored with four splits (`code/leakage.py`). code/leakage.py
- Listing 11.22 Output of Listing 11.21: $R^2$ on unseen data, averaged over five folds.
- Listing 11.23 Dependence within trials and across the data set (`code/autocorr.py`). code/autocorr.py
- Listing 11.24 Output of Listing 11.23.
- Listing 11.25 Forecast next week's minutes and compare with persistence (`code/forecast.py`). code/forecast.py
- Listing 11.26 Output of Listing 11.25.
- Listing 11.27 B-11: store sessions and judge a new result (`code/baseline.js`). code/baseline.js
The listings and their data are in the notebook download above.
Exercises
33 exercises; 8 are CORE. Answers to selected exercises are at the back of the book.
Concept check
- 11.1 CORE Foundation, 2 min
A sprint coach says the timing gates' typical error for a 20 m sprint is 0.03 s. What does that number describe? Options: The amount by which the gates read faster than a stopwatch How much one athlete's time would vary… - 11.2 CORE Foundation, 2 min
A watch and a chest strap recorded the same ten interval sessions. The average heart rates correlate at $r = 0.98$. What can you conclude? Options: The two devices agree to within about 2 % The watch can replace the… - 11.3 Core, 2 min
A student's model predicts sprint split times from video. It scores $R^2 = 0.92$ with a random 80/20 split of the frames and $R^2 = 0.12$ when whole athletes are held out. The app will be used on athletes who were not… - 11.4 Core, 2 min
An analysis of 2,620 running steps from 22 runners finds that peak force differs between two shoe conditions with $p = 10^-12$. What does the $p$-value tell a coach? Options: The difference is large enough to change… - 11.24 Foundation, 3 min
A watch archive from 30 runners shows that runners who logged more strength sessions per month also ran faster 5 km times, with a clear fitted slope. Which statement can you support? Options: Adding one strength session… - 11.31 Core, 3 min
You forecast next week's training minutes, week $t$, from a weekly series. Which feature may you use? Options: The mean of weeks $t-4$ to $t-1$ The mean of weeks $t-2$ to $t+2$, which is smoother Week $t$'s minutes…
Hand calculation
- 11.5 CORE Foundation, 10 min
Five athletes did a jump test twice, two days apart (heights in cm): day 1: 42.0, 38.5, 45.2, 40.1, 36.8; day 2: 43.1, 37.9, 44.0, 41.6, 37.0. parts Compute the five changes, their mean and their standard deviation.… - 11.6 Core, 10 min
A chest strap and a watch recorded six steady efforts (mean heart rate, bpm): strap 142, 150, 158, 163, 171, 176; watch 145, 149, 163, 161, 178, 180. parts Compute the differences (watch minus strap) and the bias. $3,… - 11.7 Core, 8 min
A swim app labels 100 lengths as freestyle or not. Of 60 freestyle lengths it labels 52 freestyle and 8 not. Of 40 other lengths it labels 35 not freestyle and 5 freestyle. parts Write the confusion table with freestyle… - 11.8 Foundation, 6 min
A runner's season races include 800 m in 150 s and 3200 m in 750 s, both run hard and evenly paced. parts Compute critical speed and $D'$ from Equation ch11-statistics:eq:cs. CS 4.00 m/s; $D' = 200 m$. Predict the time… - 11.22 Core, 12 min
The five one-minute recoveries of the Heart app's workout example (Section 11.1.5) are 23.3, 18.5, 22.9, 29.3 and 30.1 bpm. parts Compute the mean, the median and the standard deviation. 24.82, 23.3, 4.84 bpm. Make one… - 11.28 Foundation, 8 min
A phone classifier labels 2,000 windows, of which 200 are running. At a threshold of 0.5 it calls 200 windows running, 160 correctly. At 0.3 it calls 338 windows running, 188 correctly. parts At 0.5, compute precision,…
App lab
- 11.9 CORE Core, 30 min
Your own typical error. Use the jump app, https://apopt.com/jump/jump.php, in Basic mode. steps Film yourself: one countermovement jump per clip, from the side, whole body in frame from the start to the landing, phone… - 11.10 Extension, 40 min
Two methods in one app. The jump app reports two heights for each jump: one from the hip's rise on the pixel scale and one derived from flight time. Film eight jumps (yourself or a teammate who has given written…
Python analysis
- 11.11 CORE Foundation, 20 min
Edit code/typical_error.py (Listing 11.1) to read the day-1 and day-2 heights of Exercise 11.5 and a change of 1.5 cm. Before running it, write down the three chances you expect from your hand answer. Then run it and… - 11.12 Core, 30 min
Using code/gait_data.py and Listing 11.21: parts Score a random forest (200 trees, random_state=0) with a random 5-fold split and with GroupKFold by runner, using all ten measures. about 0.92 and 0.16. Repeat without… - 11.13 Extension, 30 min
Section 11.4 showed that removing 50 mislabeled rows moved the speed coefficient of the ten-measure model from 0.035 to 0.648. parts Refit the model without stride length (nine measures) twice: once with the loader… - 11.23 Core, 25 min
Work with Listing 11.3 and the synthetic interval archive. parts Change the session-level interval to 90%. 23.3 to 26.2 bpm. Rerun the 95% session-level interval with seeds 0 to 4. How much do its ends move? low end… - 11.26 Core, 25 min
Extend Listing 11.15 to trees of depth 1, 2, 3, 4, 6, 8 and unlimited (max_depth=None). For each, report the MAE on the training data, with a random 5-fold split (KFold(5, shuffle=True, random_state=0)) and with… - 11.29 Core, 25 min
Use the synthetic accelerometer windows of Listing 11.19 for all three classes. parts Fit LogisticRegression(max_iter=1000) to predict the class (walk, jog or run), with GroupKFold(4) by person and cross_val_predict.… - 11.30 Core, 25 min
Work with Listing 11.25. parts Replace the line that marks weeks with no runs as missing so that they stay zero. Report the training size and the three MAEs. train 75; persistence 37.5, four-week mean 36.9, linear 36.0… - 11.32 Core, 40 min, case-file data
Case file: your case-file athlete's chest-strap interval sessions (see apopt.com/data/athletes), or the instructor's case file. parts For each session, find each repeat's one-minute recovery as in Section 11.1.5: the… - 11.33 Extension, 45 min, case-file data
Case file: classify one-minute windows of your case-file athlete's chest-strap recordings (see apopt.com/data/athletes) by recording type: sleep, workout or interval session. parts Cut each recording into one-minute…
Body science
- 11.14 Foundation, 5 min
Morning resting heart rate varies by a few beats a minute from day to day in a healthy, well-trained athlete. Name three biological sources of that variation and one technical source, and say why the typical error of… - 11.15 Core, 6 min
In two short paragraphs for an engineer, explain what happens in the body when a runner holds a speed slightly below critical speed compared with slightly above it, and why the time to exhaustion above critical speed…
Science of the sport
- 11.16 Foundation, 5 min
Hopkins suggests that the smallest worthwhile change in a solo sport scored by time is a fraction of the variation in an athlete's race-to-race performance, while for a fitness test in a team sport a default is a fifth… - 11.17 Extension, 10 min
For a volleyball middle blocker, propose a smallest worthwhile change in countermovement jump height that is tied to the sport rather than to the 0.2 rule. Use the net and the ball (diameter about 21 cm) in your…
Field collection
- 11.18 CORE Core, 45 min
A test–retest with a teammate. Measure the typical error of one test you will use in your project. Equipment: the app or device for your test (for example the jump app on a phone and tripod), tape for marking the camera…
Build
- 11.19 CORE Core, 75 min
B-11: a baseline on the device. Add to your app a page that: steps lets the athlete enter (or load from a results file) one number per session, with a date, and stores the list with saveSession from Listing 11.27 under…
Communicate
- 11.20 CORE Core, 20 min
Riley's jump went from 30.4 to 30.9 cm after four weeks of training. The class typical error is 0.89 cm and the SWC is 0.65 cm (chances: 45% worthwhile gain, 37% trivial, 18% loss). Write the message you would give… - 11.25 Core, 30 min
A coach wants to know whether a new 10-minute warm-up raises the squad's countermovement jump compared with the usual one, and plans to try it next week and compare with last week's jumps. parts Write a one-page…
Check the AI
- 11.21 Core, 8 min
A student asked an AI assistant to compute a typical error from the five pairs of Table 11.1. The answer: quote“The differences are $+1.0, -1.4, +1.1, -0.5, +1.6$, with standard deviation 1.26 cm. The typical error is… - 11.27 Core, 8 min
An AI assistant reports on the running data: “A depth-10 decision tree reached a mean absolute error of 0.02 BW, ten times better than linear regression (0.23 BW). The first split is on ground contact time, which shows…
How to cite
Hedengren, J. (Ed.) (2027). Chapter 11: Is the Change Real? Statistics and Machine Learning. In Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data (pp. 291–328). IRSRI Sports Research Institute. https://apopt.com/book/pdf/11-is-the-change-real.pdf
BibTeX
@incollection{hedengren2027ch11statistics,
editor = {Hedengren, John},
title = {Chapter 11: Is the Change Real? Statistics and Machine Learning},
booktitle = {Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data},
chapter = {11},
pages = {291--328},
publisher = {IRSRI Sports Research Institute},
year = {2027},
note = {CC BY 4.0},
url = {https://apopt.com/book/pdf/11-is-the-change-real.pdf}
}
RIS
TY - CHAP ED - Hedengren, John TI - Chapter 11: Is the Change Real? Statistics and Machine Learning T2 - Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data SP - 291 EP - 328 PB - IRSRI Sports Research Institute PY - 2027 N1 - CC BY 4.0 UR - https://apopt.com/book/pdf/11-is-the-change-real.pdf ER -