apopt.comCBE 493R Data-Driven Athletics

Course / Tutorials / Week 7 / Q-19

Quick tutorial Q-19 · Week 7 · about 15 min · Foundation

Interpolate a threshold from four points

Find where a step test's lactate curve crosses a level by straight-line interpolation, apply a fixed and an individual threshold rule, and check the arithmetic against a smooth fit.

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

Every cell runs in this page; the first run downloads Python (about 30 s). Nothing you load leaves your browser.

The decision

A coach has a step test and wants one speed to call "threshold" for training. Which speed, by which rule, and how much does the rule matter?

The raw data

Try it

In a step test the athlete runs a few minutes at each of several rising speeds, and a drop of blood at the end of each stage gives a lactate value. A threshold is a rule applied to those points (Section 7.4). The table here is the book's illustrative step test, not a real athlete: the four stages of the book's example, 12 to 15 km/h, and two easy stages before them, with heart rate.

The step test

PythonSix stages, lactate and heart rate

Type a prediction to enable Run.

Show the expected result without running
 speed_kmh  lactate_mmol  hr_bpm
        10           1.3     138
        11           1.4     147
        12           1.6     155
        13           2.2     163
        14           3.4     171
        15           5.6     179

A straight line between two stages

Find the first stage at or above the level, and draw a straight line from the stage before it: speed = v₁ + (level − L₁) × (v₂ − v₁) / (L₂ − L₁).

PythonTwo rules, one interpolation

Show the expected result without running
fixed 4.0 mmol/L:          14.27 km/h
lowest + 1.0 mmol/L (2.3): 13.08 km/h
heart rate at the 4.0 crossing: 173 beats/min

The two rules are 1.2 km/h apart on the same six points. Neither is wrong; they are different definitions. Whichever you use, name it and compare an athlete only with numbers made by the same rule.

A second opinion: a smooth curve

PythonStraight segments against an exponential fit

Show the expected result without running
fixed 4.0 mmol/L from the exponential fit: 14.37 km/h (+0.09 against the straight line)
Lactate in mmol/L against speed in km/h. The six stages joined by straight lines, a smooth dashed exponential curve through them, and dotted horizontal lines at 4.0 and 2.3 mmol/L, with squares where the straight lines cross them.

A straight line between two points of an upward-bending curve lies above the curve, so the straight-line crossing comes a little early; the smooth fit puts it 0.1 km/h later. The choice of rule moved the answer more than ten times as far as the choice of arithmetic.

For the athlete: "On this test your lactate reached 4.0 at about 14.3 km/h, at a heart rate near 173; that is one definition of threshold, and we will use the same one next time."

Action card

Action card
Finding
Lactate crossed 4.0 mmol/L at 14.27 km/h; the lowest-plus-1.0 rule gives 13.08 km/h.
Evidence
Straight-line interpolation between stages; an exponential fit moves the 4.0 crossing by 0.1 km/h.
How sure
The arithmetic is sure to 0.1 km/h; the rule is a choice, worth 1.2 km/h here.
Action
Name the rule with every threshold, and use the same rule on every retest.
Test again
Repeat the step test with the same stages and rule after a training block.

With your own data

If your coach or lab gives you a step-test table, type it as three columns (speed, lactate, heart rate) in place of this file. Nobody in this course is required to give blood; the case study CS-8 simulates step tests instead.

Check yourself

  1. Lactate is 3.4 mmol/L at 14 km/h and 5.6 at 15 km/h. Where does it cross 4.0, in km/h?

    km/h

  2. Why does straight-line interpolation put the crossing a little early on a lactate curve?

0 of 2 answered · 0 right the first time

References

Built 2026-11-30 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.