# Fitting the Step Test, and Trusting It

Class 4, Chapter 2: The Athlete as a System. 25 slides, about 33.5 minutes.

## 1. Title

Slide up while people sit down. You ran a step test this week, and you have a page of counts. Today we turn those counts into a straight line and a curve, find out how far each one can be trusted, and practise telling the athlete what they mean. Have your record sheet out.

## 2. Maximal heart rate: a rule with a wide scatter  (2 min)

Every number on Tuesday was one person's, Sam's. Real athletes differ. Start with maximal heart rate. Everyone knows two hundred and twenty minus age. A meta-analysis of three hundred and fifty-one studies, over eighteen thousand people, found two hundred and eight minus zero point seven times age fits better. For a twenty-year-old, two hundred or one ninety-four. But the bigger point is the scatter: about ten beats either way, so any one person can sit ten or twenty beats from either line. The Heart app uses two twenty minus age, so treat its maximum as a guess.

## 3. The same plan, different results  (2 min)

The strongest reason in the book to compare an athlete with their own baseline. In the HERITAGE Family Study, four hundred and eighty-one sedentary adults from ninety-eight families did the same twenty-week program. Their gains in maximal oxygen uptake averaged about zero point four litres a minute, but ranged from nothing to more than one litre. And the gains clustered in families. The same plan gives different results in two people. Sex matters too: the best men's endurance performances are about ten to twelve percent faster than the best women's, and that gap says nothing about any one pair of athletes. So, the box.

## 4. Who is fittest?  (2 min)

[Ask the room; most will point at the top row.] Three athletes, the same three point five litres a minute at their maximum. Per kilogram, sixty-three point six, fifty, and forty-one point two. Who is fittest? [Click.] It depends on the task. A hill runner carries her own mass, so the per-kilogram number fits. A rower or a prop forward pushes something else, and the absolute number fits. Dividing by body mass is a modelling choice. Like every normalisation, it helps some comparisons and distorts others. Say which one you used.

## 5. Chain the relations: Sam's hour at 3.6  (2.5 min)

Now chain every relation from Tuesday, the way an engineer sizes a plant from its duty. Sam runs an hour at critical speed. Twelve point nine six kilometres. The running cost rule gives about one thousand and fifty watts of metabolic power. That is three litres of oxygen a minute. Run the Fick relation backwards: twenty litres of blood a minute, and with a stroke volume of zero point one two, a heart rate of one sixty-eight. Plausible, and well below the predicted maximum. But it rests on two assumed values, and ten percent off in stroke volume moves it fifteen to nineteen beats. The chain shows which numbers matter.

## 6. Where does a runner's energy go?  (2 min)

[Thirty seconds, hands up.] The answer is C, and it surprises the engineers. A cyclist turns about a fifth of the energy into work at the pedals, and that work leaves the body through the chain. A runner on the level at a steady speed does no net work on anything. Each stride lifts and speeds up the body and then lets it fall and slow down, and the mechanical energy ends as heat in muscles, tendons and shoes. So all of it must be shed. That is one reason a hot day costs a runner more than a rider, who also gets a ten metre a second breeze.

## 7. From step rate to lifting power  (2 min)

Get your record sheets out. First, turn step rate into work. The power spent lifting the body is m g h times the cycles per second. Sam: seventy kilograms, nine point eight one, a zero point three metre bench, fifteen cycles a minute: fifty-one and a half watts. [One minute.] Stage two at twenty? [Click.] Sixty-eight point seven, and stage three eighty-five point eight. Do yours with your own bench height. Remember this is an index: stepping down and swinging the legs cost energy too. And body mass stays private; seventy kilograms is fine for the homework.

## 8. Heart rate against lifting power: a straight line  (3 min)

Over the middle of its range, heart rate rises almost in a straight line with work. Here are Sam's three stages, the line that best fits them, and a dashed line that always guesses the average. That is your first linear regression, and three habits go with every fit. Give the slope its units: zero point eight one six beats a minute per watt. Without units it means nothing. Look at the residuals, measured minus fitted: small, no pattern. And beat the mean baseline: the line misses by under one beat on average, the baseline by nearly ten. R squared is that comparison in one number. [Pause.] Now the catch on the next slide.

## 9. Listing 2.3: slope, residuals, baseline  (2.5 min)

Here are the three habits in code. Polyfit with degree one is the least-squares line. Residuals are measured minus fitted. The baseline is a column of the mean. Then one print each. Run it on the class page with your own three stages in place of Sam's. [Point at the box.] Now the catch. The counts move in steps of four beats a minute, so residuals smaller than that are partly luck. And three points leave only one degree of freedom to judge the fit. A tiny residual here says the data are smooth, not that the model is proven. Chapter 11 tests fits honestly, on data they have not seen.

## 10. Extrapolate to the maximum, carefully  (1.5 min)

Listing 2.2 does one more thing with the line: it extends it to Sam's predicted maximal heart rate, one ninety-four, and reads off a lifting power of one hundred and seventy-two watts. That is how submaximal fitness tests estimate a maximal capacity without asking anyone for a maximal effort. And it shows their weakness. Remember the scatter of ten beats on the maximum. If Sam's real maximum is ten beats off, the estimate moves by about twelve watts, seven percent. The extrapolation is only as good as the guess at its end.

## 11. Recovery: a curve, fitted two ways  (2.5 min)

Recovery is a curve, not a line: a first-order fall toward a floor. Listing 2.4 fits it with curve fit, which adjusts the floor, the drop and tau together and returns a standard error for each. On the strap's second-by-second data it recovers the fifty-second time constant the data were built with, give or take one second. On the six hand counts, the squares, it gives forty-one, give or take nine. Six numbers, each rounded to four beats, cannot pin down three parameters. That is not a bug in your counting; it is the resolution of the method.

## 12. A time constant of 930 seconds  (2.5 min)

[Two minutes in pairs.] The code runs, prints a number, and the number is nine hundred and thirty seconds. Tau for heart-rate recovery is tens of seconds, so the plausibility check fires first. Now find the flaw. [Click.] An exponential fall toward a floor is a straight line only in the log of heart rate minus the floor. Taking the log of heart rate itself treats the floor as zero, so the big constant part swamps the decay. Subtract the floor and fit the first two minutes: fifty point six seconds. And notice what caught it: knowing what size the answer should be.

## 13. Four errors, measured where the truth is known  (2.5 min)

Sam's data are synthetic, so we can compare every measurement with the truth, which real data never allow. A fifteen-second count moves in steps of four. The count starts late: at the last stage the true rate was one twenty-nine point six, and the count window averaged one twenty point nine, nine beats low. A miscount by one beat is another four. And the method: an earlier Heart app version started recovery at the highest fifteen-second bin, which came forty-seven seconds before the stop, and reported sixty-eight seconds instead of fifty. Testing it on this file, where the answer is known, exposed it. Test any app on a known answer before you trust it.

## 14. What did the step test show?  (2.5 min)

Sam asks what the test showed. On the left, an answer that is accurate and useless: words Sam does not know, three decimal places that hand counts cannot support, a comparison with an unnamed range, and nothing to do. On the right: what was seen, in plain words. How sure we are: hand counts cannot see a difference smaller than about ten seconds. One action: repeat the same test, same bench, same time of day, in six weeks. And it compares Sam with Sam. That last part is the lesson of Part 1 again. [Ask: which line of the good answer carries the uncertainty?]

## 15. Build step B-2: a form and a table  (2.5 min)

Last week an empty page; this week the page takes input and keeps it. A form for a stage name and a fifteen-second count, and a table of every entry with its heart rate. The new idea is state: a list in memory that the page redraws from. Keep the arithmetic in its own module, like this, so you can test it without a browser. Write the specification first, with the hand answer: thirty-one beats is one twenty-four. Then ask your assistant for the page. Two checks: it rejects a count of three, and a stage typed with angle brackets shows as typed, not bold. Then enter your own counts on your phone.

## 16. Before Class 5  (1.5 min)

Homework five is due at the start of next class. Fit a straight line to your own step-test stages: slope with its units, residuals, and the mean baseline. Then fit a first-order response to the instructor's heart rate from the case file, and say in one paragraph what the fit cannot tell you. Finish build step B-2 and keep the link. Read Chapter 3, sections 3.1 to 3.7: the mechanics of a jump. Bring a tape measure and a phone that films at sixty frames a second; next week you jump at three frame rates.
