apopt.comCBE 493R Data-Driven Athletics

Course / Tutorials / Week 11 / CS-15

Case study CS-15 · Week 11 · about 70 min · Core

Is the change real? One test, twelve weeks

Read twelve weeks of a simulated jump record with a typical error, a smallest worthwhile change, a band, a run rule and the decision rule of Chapter 11, through a learning effect, a bad Monday and a new phone; then repeat the method on two and a half years of an athlete's real runs, where pace and heart rate tell different stories.

  1. 1Gather (used)
  2. 2Statistics (used)
  3. 3Visualize (used)
  4. 4Cleanse (used)
  5. 5Features
  6. 6Balance
  7. 7Scale
  8. 8Split
  9. 9Deploy
  1. Ask
  2. Collect
  3. Check (this week)
  4. Interpret (this week)
  5. Coach
  6. Reassess (this week)

Every cell runs in this page; the first run downloads Python (about 30 s). Nothing you load leaves your browser. Helpful first: Q-33 A rolling mean and a band.

The decision

An athlete has filmed three countermovement jumps every Monday for twelve weeks, with a four-week jump-training block in weeks 7 to 10. The coach must say one of three things: improved, no clear change, or retest. If the jump has improved, the block stays in the plan; if not, the time goes elsewhere. The answer has to survive a learning effect, a bad night's sleep, and a change of phone halfway through.

Predict first

On this test a Monday's mean wobbles by about a centimeter from week to week. At the end of the block, the last two Mondays average 1.2 cm above the four baseline Mondays, and the smallest change worth having is 0.65 cm. Improved, no clear change, or retest?

The raw data

Data dictionary
FieldMeaningUnitRangeMissing
datesession datelocal date2027-01-04 to 2027-03-22none
timesession time with the UTC offsethh:mm±hh:mm07:05-07:00 to 07:12-06:00none
testthe protocoltextcmj, resting-hrnone
metricwhat the value istext with unit at the endjump_height_cm, resting_hr_bpmnone
valueone numbercm or bpm29.9–36.0 cm; 49–55 bpmblank
unitunit of the valuetextcm, bpmnone
trialrepeat within the sessioncount1–3none
devicewhat measured ittextphone-120fps, phone-60fps, chest-strapnone
appapp that computed the valuetextjump, heartnone
app_versionapp build datedate2026-11-20 or 2026-11-26none
protocol_versioncamera position and frame ratetextv1-side-3m-waist-120fps, v2-side-3m-knee-60fps, v1-supine-1minnone
conditionssleep the night beforetextslept 5–8 hnone
noteanything unusualtextfree textblank

What is wrong with it: one jump has no value (the app could not find the takeoff); the first two weeks are practice, lower because the athlete was still learning the test; week 4 followed a five-hour night; and from week 11 a new phone filmed from knee height at 60 frames per second, which reads higher on the same jump. The clock offset changes from −07:00 to −06:00 in week 11 because of daylight saving time. None of this is hidden: the record's own columns say all of it, which is why they are there. The watch archive mixes sports (runs, swims, rides, elliptical, walks) and treadmill runs with outdoor ones; its clock is UTC with the local offset in a separate column; its cadence counts one foot; and some "runs" are a few hundred meters long. Its first three months of runs are a minute per kilometer slower, with a lower step rate, than everything after, and December 2024 and September 2026 have fewer than five steady runs. Wrist heart rate is weak on swims and can lock onto the step rate on runs.

Step by step

Part 1: a simulated twelve-week record

The athlete record (Appendix J) holds one number per row: every jump, every resting pulse, with the device, the protocol and the conditions beside it. This record is simulated. No student has a full term of weekly tests yet, so the course made one with a program, and planted in it the things that happen to real records: a learning effect in the first weeks, a bad Monday, a real training gain, and a new phone. Because the truth is known, you can check at the end how close each method came. Part 2 repeats the method on a real record: an athlete's runs from 2024 to 2026.

Step 1 · Gather

Open the record and list what changed from week to week before looking at any jump height.

PythonStep 1 · Open the record and list the changes

Type a prediction to enable Run.

Show the expected result without running
(51, 13)
test        metric        
cmj         jump_height_cm    39
resting-hr  resting_hr_bpm    12
            date                      device conditions
week                                                   
1     2027-01-04                phone-120fps  slept 7 h
2     2027-01-11                phone-120fps  slept 7 h
3     2027-01-18                phone-120fps  slept 8 h
4     2027-01-25                phone-120fps  slept 5 h
5     2027-02-01                phone-120fps  slept 7 h
6     2027-02-08                phone-120fps  slept 8 h
7     2027-02-15                phone-120fps  slept 7 h
8     2027-02-22                phone-120fps  slept 7 h
9     2027-03-01                phone-120fps  slept 8 h
10    2027-03-08                phone-120fps  slept 7 h
11    2027-03-15                 phone-60fps  slept 7 h
12    2027-03-22  phone-120fps + phone-60fps  slept 8 h
 week       device  trial  value                                        note
    6 phone-120fps      2    NaN   app warning: takeoff not found; no height
   12  phone-60fps      1   36.0 bridge: the same jump filmed by both phones
   12  phone-60fps      2   35.8 bridge: the same jump filmed by both phones
   12  phone-60fps      3   35.2 bridge: the same jump filmed by both phones
   12 phone-120fps      1   35.1 bridge: the same jump filmed by both phones
   12 phone-120fps      2   35.1 bridge: the same jump filmed by both phones
   12 phone-120fps      3   33.9 bridge: the same jump filmed by both phones

Fifty-one rows, not 48: in week 12 the same three jumps were filmed by two phones. The record says three things before any number is read. Week 4 followed a short night. From week 11 a new phone filmed at 60 frames per second from knee height (protocol_version v2), where the old one filmed at 120 from waist height. And one jump in week 6 has no height, because the app could not find the takeoff.

Step 2 · Statistics

Profile each session: how many jumps, their mean and their spread.

PythonStep 2 · A profile of every session

Type a prediction to enable Run.

Show the expected result without running
                   count   mean   std
week device                          
1    phone-120fps      3  31.30  0.53
2    phone-120fps      3  32.37  0.61
3    phone-120fps      3  33.03  0.15
4    phone-120fps      3  30.93  0.93
5    phone-120fps      3  33.40  0.70
6    phone-120fps      2  32.25  0.07
7    phone-120fps      3  32.27  0.32
8    phone-120fps      3  33.37  0.58
9    phone-120fps      3  33.43  0.38
10   phone-120fps      3  33.77  0.65
11   phone-60fps       3  35.60  0.20
12   phone-120fps      3  34.70  0.69
     phone-60fps       3  35.67  0.42
jump-to-jump SD within a morning: 0.55 cm

Jumps on one morning agree to about half a centimeter. Keep that number; Step 2 again compares it with how much a whole morning moves from week to week.

Step 3 · Visualize

Plot every jump, not only the means, and mark the device change before reading a trend.

PythonStep 3 · Every jump, by device

Show the expected result without runningJump height against week. Small circles are single jumps with the old phone, triangles with the new phone; a line joins the old phone's weekly means; a dashed line marks the change of phone before week 11.

Three things to notice. Week 1 is low. Week 4 dips and week 5 comes straight back. And the new phone reads more than a centimeter above the old one on the very same jumps of week 12.

Step 4 · Cleanse

The rules are written before the analysis, and none of them changes a number in the record:

  1. A row with no value is dropped from the analysis and logged.
  2. Weeks 1 and 2 are practice. They stay in the record but not in the baseline.
  3. The baseline is weeks 3 to 6, the four Mondays before the jump-training block began in week 7.
  4. A session's value is the mean of its jumps. A different device or protocol starts a new segment, which is compared with the old one only through a bridge: the same jumps filmed by both.
PythonStep 4 · Rules, a change log and a clean record

Show the expected result without running
    rule  rows_removed
no value             1
old phone, weekly means: {1: 31.3, 2: 32.37, 3: 33.03, 4: 30.93, 5: 33.4, 6: 32.25, 7: 32.27, 8: 33.37, 9: 33.43, 10: 33.77, 12: 34.7}
new phone, weekly means: {11: 35.6, 12: 35.67}

The clean record keeps the record's columns, so any tool that reads the record format can read it. The chart below draws it.

Loading the record…

Step 2 again · Typical error and the smallest worthwhile change

Chapter 11 measures the wobble of a test with a test–retest study. With one athlete, the baseline Mondays are the retests: nothing was meant to change across weeks 3 to 6, so the standard deviation of their four means is the typical error of one session (the rule of build step B-11). The smallest worthwhile change (SWC) comes from the sport, not the measurement; this athlete and coach agreed before the term to use the book's 0.65 cm (Section 11.1.2: a fifth of the spread between teammates).

PythonStep 2 again · Two kinds of wobble

Type a prediction to enable Run.

Show the expected result without running
baseline (weeks 3-6): mean 32.40 cm, typical error of a session 1.09 cm
expected from jump-to-jump scatter alone: 0.32 cm
SWC 0.65 cm; noise of one session against the 4-week mean: 1.22 cm
90% interval for the typical error: 0.68 to 3.19 cm

A whole morning moves more than three times as much as three jumps averaged together would suggest. The jumps of one morning share that morning: its sleep, its warm-up, its mood. So filming more jumps on one day does not remove the day-to-day wobble; only more days do. And the noise of one session is larger than the SWC, so a single Monday can never settle the question.

Step 3 again · A trend, a band and a run rule

Draw the weekly means against the baseline band (mean ± one typical error) and the SWC, with a three-week rolling mean. Then apply a run rule, written before looking: a change is flagged when three Mondays in a row sit above the top of the band. One high Monday is not enough. Weeks 11 and 12 are left out until Step 4 again deals with the new phone.

PythonStep 3 again · Band, SWC, rolling mean and run rule

Type a prediction to enable Run.

Show the expected result without running
above the band: [10]
run rule fires in week: none yet
Weekly means of the old phone against week with a gray band for the baseline mean plus or minus one typical error, dashed lines at the baseline mean plus and minus the SWC, a three-week rolling mean, and an arrow where the run rule fires.

The rolling mean climbs through the block, but only week 10 clears the top of the band, so by week 10 the run rule has not fired. The dashed lines show why one Monday never settles it: the band is wider than the SWC.

Step 2 again · The decision rule of Section 11.1.3

For a change Δ with noise σ, the chances that the true change is a worthwhile gain, trivial or a loss follow from the normal curve, and each chance gets a word (Table 11.2). The chances then give one of three statuses: improved when a worthwhile gain is at least likely (75% or more), no clear change when both a gain and a loss are unlikely (under 25%), and retest when the answer is "possibly". (A likely loss would read declined.)

PythonStep 2 again · Chances, a word and a status

Type a prediction to enable Run.

Show the expected result without running
week 5 vs week 4:        change +2.47 cm, noise 1.54: gain 88% (likely), trivial 10%, loss 2% -> improved
week 5 vs baseline:      change +1.00 cm, noise 1.22: gain 61% (possibly), trivial 30%, loss 9% -> retest
weeks 9-10 vs baseline:  change +1.20 cm, noise 0.95: gain 72% (possibly), trivial 26%, loss 3% -> retest
weeks 9-10 vs weeks 1-4: change +1.69 cm, noise 0.95: gain 86% (likely), trivial 13%, loss 1% -> improved

Read the four lines in order.

Step 4 again · A step that is not training

Week 11 is the first Monday with the new phone. Its mean is far above everything before it. Is that the block finally showing? The bridge in week 12 answers it: the same three jumps, filmed by both phones.

PythonStep 4 again · The new phone, measured with a bridge

Type a prediction to enable Run.

Show the expected result without running
week 11 (new phone) vs baseline: change +3.20 cm, noise 1.22: gain 98% (very likely), trivial 2%, loss 0% -> improved
device  phone-120fps  phone-60fps  difference
trial                                        
1               35.1         36.0         0.9
2               35.1         35.8         0.7
3               33.9         35.2         1.3
bridge: the new phone reads +0.97 cm (SD of the three differences 0.31)
corrected weekly means, weeks 9-12: {9: 33.43, 10: 33.77, 11: 34.63, 12: 34.7}
weeks 9-12 vs baseline: change +1.73 cm, noise 0.77: gain 92% (likely), trivial 8%, loss 0% -> improved
run rule on the corrected series fires in week: [12]

Uncorrected, week 11 would have been reported as a very likely gain of more than three centimeters. About a centimeter of that is the phone. On the old phone's scale the last four weeks give a likely worthwhile gain, and in week 12 the run rule fires as well: three Mondays in a row above the band. "Improved" is the status to report. Without the bridge the step could not have been measured at all; a device change in a record needs one, or a fresh baseline.

Check against the truth

The simulation's planted values are in raw/simulation-truth.csv. Compare each with what the record let you estimate.

PythonWhat was planted, and what was found

Show the expected result without running
training gain, weeks 9-12: planted 1.38 cm, estimated 1.73
learning effect, week 1: planted -1.5 cm, seen -1.10 (includes that morning's day effect)
new phone: planted 1.2 cm, bridge 0.97
day effects in the baseline weeks: [-0.32, -2.4, -0.03, -0.2]

Every estimate landed within half a centimeter of the truth, and each miss has a cause you can name. The baseline weeks happened to include the bad Monday of week 4, which pulls the baseline mean down and the estimated gain up. Three jumps make a short bridge.

How good is the run rule? Autocorrelation

Mondays are not independent: a good week tends to follow a good week, because sleep, a cold or a heavy training week last longer than a day. In the simulation each week's day effect keeps half of the last one (a lag-1 autocorrelation of 0.5). That makes runs above the band more common by chance. Simulate many unchanged athletes and count false alarms.

PythonFalse alarms of the run rule, with and without memory

Type a prediction to enable Run.

Show the expected result without running
lag-1 autocorrelation 0.0: run rule fires by chance in 9% of unchanged records
lag-1 autocorrelation 0.5: run rule fires by chance in 20% of unchanged records

Even with no memory the rule fires by chance in about one unchanged record in eleven, because four baseline weeks give a rough mean and a rough band. With the planted memory it fires in one in five. Read a run of three as "look harder", and confirm it with the decision rule and a retest.

Part 2: a real record, 2024 to 2026

There is no real weekly jump record yet. There is a real long record: the activity history of an adult male athlete in his mid-40s, 693 activities from one watch, of which 475 are outdoor runs. Which number in it can be tracked like a test?

The file stores time in seconds and distance in meters. Its clock is UTC, with the local offset in its own column, so the local month comes from start_time plus utc_offset_h. It is still not a controlled test: route, weather, hills and intent change from run to run. That is the lesson of Part 2.

PythonStep 1 and Step 4 · Monthly median pace of 6-12 km runs

Type a prediction to enable Run.

Show the expected result without running
475 outdoor runs, 326 of 6-12 km; 27 months with 5 or more, 2 months missing
         runs   pace  climb     hr    spm
2024-07   8.0  415.9    7.8  153.0  167.0
2024-08   9.0  415.3    7.3  152.0  160.0
2024-09   6.0  363.1    7.0  158.0  165.0
2024-10  11.0  313.1    7.7  163.0  176.0
2024-11  11.0  325.4   10.9  160.0  176.0
2025-01  11.0  303.4    8.1  163.0  176.0
2025-02  11.0  313.4   10.4  162.0  176.0
2025-03  12.0  303.2    6.7  159.5  176.0
2025-04  14.0  304.7    7.0  160.5  177.0
2025-05  15.0  315.7    5.9  155.0  176.0
2025-06   5.0  328.8    7.7  151.0  178.0
2025-07  13.0  318.1    6.8  158.0  176.0
2025-08  14.0  307.1    5.0  154.0  176.0
2025-09  19.0  303.9    6.5  155.0  178.0
2025-10  17.0  309.7    7.6  156.0  178.0
2025-11  17.0  310.6    5.7  154.0  176.0
2025-12   7.0  312.2    6.4  159.0  176.0
2026-01  15.0  309.8    6.0  156.0  176.0
2026-02   5.0  298.5    6.9  165.0  178.0
2026-03  14.0  310.6    5.1  158.0  175.0
2026-04  14.0  306.2    5.7  157.0  174.0
2026-05   6.0  314.4    6.9  156.0  173.0
2026-06  14.0  298.9    4.6  161.0  176.0
2026-07  14.0  310.1    5.3  156.0  176.0
2026-08   7.0  324.1    4.1  150.0  174.0
2026-10  17.0  322.9    3.7  150.0  176.0
2026-11  14.0  307.8    3.5  158.0  177.0

Read the table before any statistics. The first three months, July to September 2024, are about a minute per kilometer slower than everything after, with a lower step rate and a lower heart rate. Walk breaks show up as a lower step rate. The file cannot say why; it can say these runs were not the same test. Like the practice weeks of Part 1, they stay in the record but not in the baseline. Two months (December 2024 and September 2026) had fewer than five steady runs. They are missing, not slow and not zero, and they stay missing. The slowest later months, June 2025 and August and October 2026, also have the lowest heart rates (150 to 151 bpm): easier runs, which is intent, not lost fitness. And the climb per kilometer falls by half over the two years: the routes changed too.

PythonStep 2 and Step 3 · Band, autocorrelation and the decision rule, on real data

Show the expected result without running
baseline 310.5 s/km, typical error of a month 8.6, SWC 3.1
lag-1 autocorrelation from Oct 2024 0.13; 5 months carry about 3.8 months' information
last 5 vs first 6 months: change +43.29 s/km, noise 30.52: gain 90% (likely), trivial 3%, loss 6% -> improved
last 5 months vs baseline: change -2.21 s/km, noise 5.23: gain 15% (unlikely), trivial 41%, loss 43% -> retest
Monthly median pace of 6 to 12 km runs from July 2024 to November 2026, faster up, with slow start-up months in 2024, a gray baseline band from October 2024 to April 2025, gaps in December 2024 and September 2026, and filled markers for the last five months.

The two baselines give opposite answers. Against the first six months, start-up included, the last five months are more than 40 s/km faster: "likely improved". That is the learning effect of Part 1 again; a baseline that holds the start-up flatters everything after it. Against the honest baseline, the last five months are about 2 s/km (under 1%) slower, which is possibly a small loss and possibly nothing, so the status is "retest". Once the start-up is left out, the months carry little memory from one to the next. With the start-up in, a long climb makes neighboring months look alike, and a run rule would fire on the trend.

Pace leaves out how hard the athlete worked. Heart rate puts that back.

PythonStep 2 again · Meters per heartbeat

Type a prediction to enable Run.

Show the expected result without running
baseline 1.193 m/beat, typical error 3.3%; last 5 months 1.238 m/beat
baseline months: {'2024-10': 1.172, '2024-11': 1.145, '2025-01': 1.177, '2025-02': 1.183, '2025-03': 1.249, '2025-04': 1.232}
lag-1 autocorrelation from Oct 2024 0.43; 5 months carry about 2.0 months' information
last 5 months vs baseline: change +3.76 %, noise 1.99: gain 92% (likely), trivial 7%, loss 1% -> improved

At about the same pace, the heart now beats less often. The last five months cover 3.8% more ground per beat than the baseline, a likely worthwhile gain (92%). Read the baseline months before you believe it. The rise happened inside the baseline, from 1.172 m/beat in October 2024 to 1.249 in March 2025, and the last five months average 1.238: the number rose in the first winter and has held since. A baseline that is still climbing is not a steady baseline. The memory from month to month is also larger here (0.43), so five months carry about two months' information. And heat, hills, easy days and a wrist sensor all move heart rate. The summer months sit in the last five and not in the baseline, and heat raises heart rate, so heat did not make this gain. The honest reading: the steady run got cheaper for the heart during the first winter and has stayed cheaper; pace has not changed. To track fitness rather than routes, use a fixed test, the same course or a treadmill at a fixed speed with heart rate, recorded the same way each time. That is exactly what the weekly record of Part 1 was designed to be.

How good is the number?

The typical error of one Monday, 1.09 cm, comes from only four baseline weeks; its 90% interval runs from 0.68 to 3.19 cm, so every chance computed from it is rough. The Mondays also carry memory from week to week: in simulation, the three-in-a-row run rule fires by chance in 9% of unchanged records with no memory and in 20% with the planted memory, so a run is a reason to look harder, not proof. The bridge used three jumps; its estimate of the phone offset (0.97 cm) missed the planted 1.2 cm by about a quarter of a centimeter. Against the planted truth, the estimated gain (1.73 cm) was 0.35 cm too high, because the baseline happened to include the bad Monday. In the watch archive, the typical error of a month's pace (8.6 s/km) comes from six baseline months, and the gain in distance per heartbeat happened inside those months, so the 92% chance there rests on a baseline that was still moving.

Action card

Action card
Finding
Your jump has likely improved by a worthwhile amount, about 1.7 cm, since the block began.
Evidence
The last four Mondays averaged 34.1 cm on the old phone's scale against 32.4 cm in weeks 3–6, and three Mondays in a row sat above your usual range.
How sure
Likely (92%), not certain: the baseline is only four weeks, and the new phone needed a correction of about 1 cm.
Action
Keep the jump work in the plan, and film every Monday with the same phone, from the same spot.
Test again
In four weeks, three jumps on the new phone, plus one more bridge week with both phones.

Track it

One row per jump: date, time, test=cmj, metric=jump_height_cm, value, unit=cm, trial, device, app=jump, app_version, protocol_version, conditions, note. When the phone or the camera position changes, change device or protocol_version, and film one bridge session with both, noted as such. Never edit a row; add one.

Open your athlete record

With your own data

Start your own record now: three jumps every Monday, filmed the same way, saved with the jump app's results file and added as rows in the record format. After six Mondays you have a baseline; after ten, a trend. Run this notebook with raw/athlete-record-simulated.csv replaced by your file, and set the baseline weeks and device names in Step 4 to yours.

Check the AI

Asked "Has the jump training worked?", an assistant read the record and wrote:

> The baseline (weeks 3–6) averages 32.4 cm with a typical error of 1.09 cm. In week 11 the > athlete jumped 35.6 cm, a gain of 3.2 cm. The chance of a worthwhile gain is 98%, so the > block very likely improved the jump by about 3 cm.

What is wrong with it?

Week 11 was filmed with the new phone from knee height (device phone-60fps, protocol_version v2). The week-12 bridge shows that phone reads about 1 cm higher on the same jumps, so about a third of the "gain" is the phone. Corrected, and using the last four weeks, the gain is about 1.7 cm and "likely", not 3 cm and "very likely". The arithmetic was right; the comparison was not.

Check yourself

  1. Week 5 is 2.5 cm above week 4, and week 4 followed a five-hour night. Why is "improved" the wrong reading?

  2. Why are weeks 1 and 2 left out of the baseline?

  3. The three jumps of one morning spread by about 0.55 cm, but the Monday means spread by 1.09 cm. What follows?

  4. Weeks 9 and 10 average 1.2 cm above the baseline mean; the typical error of a session is 1.09 cm and the baseline has four sessions. What is the noise of this change, in cm?

    cm

  5. How was the new phone's effect measured?

  6. In Part 2, the last five months are 43 s/km faster than the first six months but 2.21 s/km slower than October 2024 to April 2025. Why use the second baseline?

0 of 6 answered · 0 right the first time

Challenge: Another record, the same rule

Apply the method of this case study to a second record: your own weekly jumps if you have six or more Mondays, a classmate's under a written data-sharing agreement, or the resting pulse rows of this simulated record (metric=resting_hr_bpm), where a lower value is better.

  1. Write the cleaning rules, the baseline weeks and the SWC before you look at the later weeks, and keep them with your notebook.
  2. Compute the typical error of a session from the baseline weeks, with its 90% interval.
  3. Draw the record with the band, the SWC and a rolling mean, and mark every change of device or protocol.
  4. Apply the run rule and the decision rule, and give the status (improved, no clear change, retest) with its chance and word.
  5. For the watch archive: repeat Part 2 with a different distance band (for example 4–6 km) and say whether the status changes, or why it cannot be given.

Hand in

How it is judged

Hints

    The solution unlocks after you make an attempt. Comparing your own attempt with it is where the learning happens.

    The same method in another field

    A plant historian faces the same problem with a sensor: readings drift, and a replaced or recalibrated sensor shifts the whole trend by itself. Engineers run the old and new sensor side by side for a while (a bridge) and judge a change against a baseline band before calling it real. See the Data-Driven Engineering page on sensors, which covers calibration, drift and noise.

    Acknowledgements

    The simulated record was made for this course. The watch archive is a COROS Training Hub export of an adult male athlete in his mid-40s, published in the course case file.

    References

    Built 2026-12-02 with Python packages numpy 2.5.5, pandas 3.1.1, matplotlib 3.11.2, scipy 1.18.1. In the browser the same code runs on Pyodide, so the last digit can differ.