<!-- Generated by book/tools/make-index.py from the book source. -->

> Hedengren, J. (Ed.) (2027). Chapter 1: Questions Before Dashboards. In *Data-Driven Athletics: Measuring, Modeling and Coaching Human Performance with Video and Wearable Data* (pp. 2–19). IRSRI Sports Research Institute. CC BY 4.0.

**Question.** What do you want to decide, and what would you need to measure to decide it?

**Objectives.**
- State a performance question as a decision someone will make.
- Tell a measured quantity from a derived one and a modeled one.
- Define accuracy, precision, validity and reliability, with an example of each.
- Make a first measurement two ways and compare them.
- Describe the rules for handling another person's data.
- Describe a working method for using an AI assistant.

# 1 Questions Before Dashboards

A volleyball coach watches a middle blocker go up at the net and thinks,
“she is late and low.” A phone on a tripod could put a number on “low”:
0.35 m, perhaps. The number is useful only if three things are true.
Somebody has to want it for a reason, the number has to be close enough to the
truth for that reason, and somebody has to turn it into something the blocker
does differently. This book is about all three. It starts with the first,
because a dashboard full of numbers that no one asked for is the most common
way data fails athletes.

## 1.1 What a Coach Sees and What a Sensor Sees

Coaches measured athletes long before anyone said “data”. The stopwatch gave
a time to a hundredth of a second. The tape measure gave the long jump its
result. Film let a coach stop a movement and look at one frame. For most of the
twentieth century, measuring a movement in detail meant a laboratory: a force
platform under the feet, markers stuck to the skin, cameras on fixed mounts and
hours of processing . The athletes who were
measured were few, and the conditions were nothing like a game.

Two changes moved measurement out of the laboratory. The first is the sensor
an athlete wears: a chest strap that reads the heart's electrical signal, a
watch that reads satellite positions, a phone that reads its own motion. The
second is the camera in every pocket together with *pose estimation*, a
trained model that finds the joints of a body in a video frame without markers.
Chapters 5 to 10 cover both. Each puts a stream of numbers in a student's hands
that a decade ago only a laboratory could produce.

What does the data add? Three things a coach's eye does poorly.

- **Time.** An eye cannot judge 0.05 s. A camera at
  60 fps sees a new frame every 0.017 s.

- **Memory.** A coach remembers last month's jump as “about the
  same”. A file remembers it as 0.34 m.

- **Comparison.** Two athletes, two sessions, two sides of the body,
  set beside each other on the same scale.

What can it not replace? The coach still knows that the blocker slept badly,
that her knee was sore last season, that she freezes when watched, and that she
responds to a joke better than to a chart. The sensor sees a movement. The
coach sees a person. Neither is enough alone.

> **Key idea.**
> 
> A measurement earns its place when it changes a decision. Start from the
> decision, then choose the measurement, never the other way round.

## 1.2 The Pathway

Every chapter of this book follows one method with six steps. They are drawn as
a ring at the start of each chapter, with the steps that chapter works on set
dark (Figure 1.1).

*Figure 1.1. The pathway, with the vertical-jump case of this chapter written into each step. The last step leads back to the first: a reassessment raises the next question.*

\paragraph{Ask.} Write the question as a decision someone will make. “How
high does Maya jump?” is not yet a question; nobody acts on the answer.
“Should Maya, a volleyball player, add two short jump-training sessions a
week for six weeks, and how will we know in six weeks whether they helped?” is
one. It names the person, the decision, the time and the test. A good question
also says what would change your mind: if her jump rises by less than the
measurement can resolve, the extra sessions have not shown their worth.

\paragraph{Collect.} Choose a measurement that answers the question and that
you can repeat in six weeks under the same conditions: the same shoes, the same
warm-up, the same camera place, the same time of day. Section 1.3
does this for the jump three ways.

\paragraph{Check.} Before you believe a number, test it. Does a second
method agree? Do three trials agree with each other? Is the value possible at
all? A jump of 2.6 m is not.

\paragraph{Interpret.} Say what the number means for the question, with its
uncertainty. “Maya's jump is 0.35 m; trials scatter by about
2 cm, so a change of less than about 4 cm at
the retest will not be clear.”

\paragraph{Coach.} Turn the finding into one thing the athlete does. Not
eight. Section 1.9 shows a good and a poor
version.

\paragraph{Reassess.} Repeat the same protocol at the date you set. Compare
the new number with the old one and with the scatter. The result is the start
of the next question.

In one line: begin with a decision or a coaching question, not a dashboard.
That is the title of this chapter.

## 1.3 A First Measurement

{\sffamily Generated wall and tape illustration.

}

A *countermovement jump* starts standing still. You dip by bending hips,
knees and ankles, reverse, and drive up. It is the most studied jump in sport
science, and coaches use it to track how an athlete is responding to
training . You can measure its height three
ways with a phone and a wall.

### 1.3.1 Reach marks on a wall

Stand side-on to a wall, chalk on your fingertips. Reach up flat-footed and
mark the wall: that is your *standing reach*. Then jump and touch the wall
as high as you can. The jump height is the top mark minus the standing reach.
It needs nothing but chalk and a tape. It also measures something a little
different from the other two methods, as you will see.

### 1.3.2 Flight time counted by hand

Film the jump from the side, phone still, whole body in frame, at
60 fps or more. Step through the video one frame at a time. Note the
last frame with a foot on the ground before the jump and the first frame with
a foot on the ground after it. The frames in between are in the air. Their
number divided by the frame rate is the *flight time* $t$.

Once the feet leave the ground, nothing but gravity acts on the body (air
resistance is far too small to matter here). The body rises for half the
flight and falls for the other half, so the rise is

$$h = \frac{g\,t^2}{8},$$

where $g$ is the acceleration of gravity, 9.81 m/s².
The jump app uses 9.80665 m/s², the standard value;
for a 0.50 s flight the two differ by 0.1 mm, far
below anything you can measure.

> **Engineer's note: Where the 8 comes from.**
> 
> A body thrown up at speed $v$ stops rising after $v/g$ seconds, having risen
> $v^2/(2g)$. It takes the same time to fall back, so the flight is $t=2v/g$
> and $v=gt/2$. Then $h = v^2/(2g) = (gt/2)^2/(2g) = g t^2/8$. The formula
> assumes the body is in the same posture at takeoff and landing. If you tuck
> your legs before landing, you stay in the air longer and the height comes out
> too large .

**Example 1.1: Height from a frame count.**

Maya films her jump at 60 fps and counts 32 frames in the air. Her
flight time is $t = 32/60 = \SI{0.533}{\second}$, and
Equation \eqref{ch01-questions:eq:flight} gives
$h = 9.80665 \times 0.533^2 / 8 = \SI{0.349}{\metre}$.
Listing 1.1 confirms it. Had she miscounted by one
frame either way, 31 or 33 frames give 0.327 m and
0.371 m: one frame at 60 fps is worth about
2 cm of height.

**Listing 1.1.** Jump height from a frame count. Output: `t = 0.533 s, h = 0.349 m` (`code/height.py`)

```python
# Jump height from flight time (Section 1.3).
g = 9.80665            # m/s^2, the value the jump app uses
frames = 32            # frames counted in the air
fps = 60               # the rate the camera recorded at
t = frames / fps       # flight time, s
h = g * t**2 / 8       # rise of the body from takeoff to peak, m
print(f"t = {t:.3f} s, h = {h:.3f} m")
```

> **Limits and cautions: Slow motion stores a different frame rate.**
> 
> Divide by the rate the camera *recorded* at. A slow-motion clip recorded
> at 120 fps is usually saved as a file that says 30 fps, and a
> frame count divided by the file's rate is four times too long. The height,
> which squares the time, is then sixteen times too large. Chapter 8
> explains why and how to catch it. Until then, film at normal speed, or tell
> the app the rate you recorded at.

### 1.3.3 The jump app

The jump app at https://apopt.com/jump/jump.php does the counting for you. It runs a
pose model on every frame in your browser (the video never leaves the phone),
finds the feet and an estimate of the body's center, and reports two heights:

- **Jump height**: how far the body's center (the app uses the middle
  of the hips) rose from standing to the top of the jump. To turn pixels into
  meters it needs your stature, which you type in; it then takes the
  eye-to-ankle distance in upright frames as a known fraction of that stature.

- **Flight time**, with the height that flight time works out to by
  Equation \eqref{ch01-questions:eq:flight}.

Its capture instruction reads: film one jump from the side, with the whole
body in frame from the start to the landing; keep the phone still, on a tripod
at about waist height, at 60 fps or more.

How the app finds takeoff and landing depends on what the pose model calls the
foot. The default model has 17 keypoints and no toes, so its lowest foot point
is the ankle, which rises as the heel lifts before the toes leave the ground.
With such a model the app takes takeoff where the ankle's upward acceleration
is sharpest and landing where its fall stops most sharply: the same contact
instants a hand count looks for. A model with toe points gets a threshold
instead, and with it one correction a hand count does not need. The app counts
a toe as off the ground only once it is 0.04 m above the ground
line, so that the jitter of the pose model does not register as a jump. That
threshold trims the start and the end of the flight, so the observed time
$t_\text{obs}$ is short. The app corrects it with

$$t = \sqrt{t_\text{obs}^2 + \frac{8c}{g}}, \qquad c = \SI{0.04}{\metre}.$$

Put this $t$ into Equation \eqref{ch01-questions:eq:flight} and the algebra
collapses to $h = g t_\text{obs}^2/8 + c$: the correction adds exactly the
4 cm the threshold took away.

> **Check it by hand: The clearance correction.**
> 
> An observed flight of 0.50 s gives $9.80665\times0.25/8 =
> 0.306 m$ uncorrected. Corrected,
> $t=\sqrt{0.25+8(0.04)/9.80665}=0.532 s$, and
> $h=0.346 m$, which is $0.306+0.040$. With $g=9.81$ the same steps
> give 0.307 m and 0.347 m.

### 1.3.4 Three numbers for one jump

Table 1.1 shows a session like the one you will run
this week. The numbers are an illustration of a typical result, not a
measurement of a real person; Exercise 1.17 has you
produce your own. Maya's standing reach is 2.21 m, and she jumps
three times while a teammate films from the side at 60 fps.

*Table 1.1. One illustrative session: three jumps, two methods. Reach height is the jump mark minus a standing reach of 2.21 m. Video height is Equation ch01-questions:eq:flight applied to a hand count at 60 fps.*

|  | Jump 1 | Jump 2 | Jump 3 |
|---|---|---|---|
| Reach mark (m) | 2.60 | 2.64 | 2.62 |
| Reach height (m) | 0.39 | 0.43 | 0.41 |
| Frames in the air | 31 | 33 | 32 |
| Flight time (s) | 0.517 | 0.550 | 0.533 |
| Video height (m) | 0.327 | 0.371 | 0.349 |

*Figure 1.2. The three trials of Table 1.1 by each method (circles: wall reach; squares: video). Vertical lines mark the means, 0.41 m (solid) and 0.349 m (dashed). The methods disagree by more than the scatter within either one.*

The reach method averages 0.41 m and the video method
0.349 m (Figure 1.2). The difference,
0.061 m, is larger than the spread of three trials in either
method, which is about 0.04 m. So the gap is not bad luck. The two
methods measure different things.

\paragraph{Why they differ.} The wall measures from a flat-footed standing
reach to the fingertips at the top. Before the feet leave the ground, the
ankles extend and the body rises onto the toes; the reach also gains from a
shoulder that lifts and a body that tilts toward the wall. Flight time counts
only the rise after the toes leave the ground. Methods that measure from
standing therefore give larger heights than those that measure from
takeoff . On the other side of the ledger, a
landing with bent knees adds air time and inflates the flight-time height.
Neither method is wrong. They answer different questions, and for a
volleyball blocker, the fingertip height is arguably the one that matters.

\paragraph{Measured, derived, modeled.} The example also shows three kinds of
number. A *measured quantity* is read straight from an instrument: the
reach mark on the tape, the 32 frames. A *derived quantity* is computed
from measured ones with a formula whose assumptions hold well: flight time
from a frame count and a frame rate. A *modeled quantity* rests on a model
with assumptions that may not hold: the height from flight time assumes the
same posture at takeoff and landing; the app's center of the body is the
middle of the hips, which is not the true center of mass; its scale assumes
your eye-to-ankle length is a fixed share of your stature. Each step from
measured to modeled adds a way to be wrong. Know which kind of number you are
holding.

**Example 1.2: A hand count on the course's example clip.**

The course's example clip `jump2_120fps.mp4` shows a person jumping on
a grassy hill, filmed from behind in slow motion at 120 fps. Stepping
through it, the shoes first show above the grass at frame 80 and the first
shoe disappears into the grass again at frame 124: 44 frames in the air. The
flight time is $44/120 = \SI{0.367}{\second}$ and the height
$9.80665\times0.367^2/8 = \SI{0.165}{\metre}$. Grass hides the soles, so the
count could be off by two frames either way: 42 to 46 frames give
0.150  to 0.180 m.

This count did real work. An earlier version of the jump app timed the flight
from where the ankle crossed a clearance line, and on this clip it gave
0.469 s (0.270 m), 0.10 s longer than the
hand count. Checking it against the count exposed the cause: the ankle rises as
the heel lifts, so the window opened early. The app now times the flight from
the breaks in the ankle's motion. Run on the same clip with the capture rate
set to 120 fps, a stature of 1.70 m and YOLO pose keypoints,
it finds takeoff at frame 80 and landing at frame 124, a flight of
0.367 s (0.165 m), the same as the hand count.

Its standing-to-peak height, 0.430 m, still disagrees with the
flight-time height by far more than the app's own agreement limit of
0.08 m. Which height is right? The clip breaks the app's capture
instruction: it is filmed from behind, the camera is hand-held, and the feet
sink into grass, so the pixel scale and the standing level are both in doubt.
Here, trust the flight time, and refilm to the instruction before trusting the
other height. One caution applies to both counts: the file repeats every sixth
frame, so it is not a clean slow-motion copy. If the camera recorded at
120 fps, the 44 frames hold only about 37 distinct ones, and the true
flight may be nearer 0.31 s.

The app writes its results as a text file. Listing 1.2
is your first notebook: it opens that file for the example clip, finds the
flight time and repeats the app's arithmetic. The arithmetic checks
out (0.367 s gives 16.5 cm, as the app says). The
question was never the arithmetic. It was when the feet left the ground.

**Listing 1.2.** Open an app results file and print one number. Output: `flight 0.367 s -> 16.5 cm` (`code/first_results.py`)

```python
# Open a jump app results file and print one number (Section 1.3).
from pathlib import Path

text = Path("data/results_jump2_120fps.md").read_text()
for line in text.splitlines():
    if line.startswith("- Flight time:"):
        ms = float(line.split(":")[1].split("ms")[0])
        break
t = ms / 1000                         # seconds
h = 9.80665 * t**2 / 8                # the app's formula
print(f"flight {t:.3f} s -> {100*h:.1f} cm")
```

> **Try it in the app: Measure one jump.**
> 
> Film one countermovement jump from the side at 60 fps, whole body in
> frame, phone on a tripod at waist height. Type your stature. Read both heights
> and the flight time, and save the PDF and the text result.
> 
> 
> https://apopt.com/jump/jump.php

## 1.4 What a Number Is Worth

Four words describe how good a measurement is. They are used loosely in
conversation and precisely in this book .

*Figure 1.3. Accuracy and precision. The center of each target is the true value and each dot is one measurement. A tight group away from the center has a bias; a wide group around the center has scatter.*

\paragraph{Accuracy and precision.} A measurement is *accurate* when it
is close to the true value and *precise* when repeated measurements are
close to each other (Figure 1.3). The two errors
behind them have their own names. *Bias* is a consistent offset: a tape
hung 2 cm too low makes every reach height 2 cm
too large. *Scatter* (random error) is the trial-to-trial wobble: chalk
smudges, a miscounted frame, a slightly different jump. Bias is found by
comparing the mean of many trials with a better method; scatter is found by
repeating. Averaging trials shrinks scatter. It does nothing for bias.

\paragraph{Validity.} A measurement is *valid* when it measures what the
question needs. For a blocker, the height of the fingertips over the net
matters; the wall reach is closer to that than the rise of the hips. For a
sprinter's leg power, the hip rise from takeoff is closer. The same number can
be valid for one question and not for another.

\paragraph{Reliability.} A measurement is *reliable* when it gives the
same result each time nothing has changed .
Reliability is precision across days, people and testers, and it decides
whether you can see a change. Maya's three video heights span
0.327  to 0.371 m, a range of 4.4 cm. Some of
that is her, some is the frame count.

\paragraph{Resolution.} *Resolution* is the smallest step the instrument
can show. A tape reads to a millimeter, but a chalk mark is a centimeter wide.
A camera's resolution in time is one frame: 33 ms at
30 fps, 17 ms at 60 fps. In height, near a
0.53 s flight, one frame is worth 4.5 cm at
30 fps, 2.2  at 60 , 1.1  at 120  and
0.5 cm at 240 fps (Figure 1.4).
A heart rate counted for 15 s and multiplied by four can only be a
multiple of four.

*Figure 1.4. A frame count can only give the heights marked. At 30 fps (circles) neighboring values are about 4 cm apart near 0.35 m; at 60 fps (crosses), about 2 cm.*

> **Check it by hand: Pulse count to heart rate.**
> 
> Find the pulse at your wrist and count beats for 15 s by a timer:
> 19 beats. Heart rate is $19\times4=76 bpm$. One beat more or less gives
> 72 or 80 bpm, so the resolution is 4 bpm. Counting
> 30 s (38 beats) gives the same 76 bpm with a resolution of
> 2 bpm. Longer counts resolve better, but a heart rate changing quickly,
> as after exercise, is smeared over the count.

\paragraph{Comparing two methods.} The simplest comparison is a difference,
and the simplest scaled form is the *percent difference*: the difference
divided by the mean of the two, times 100. For Maya, $(0.41-0.349)/0.380\times
100 = 16%$. When one method is a trusted reference, divide by the reference
instead. Chapter 11 shows how to compare many pairs at
once ; for now, one difference and one sentence
about why will do.

\paragraph{The smallest change worth noticing.} The last idea ties the others
to the question. A change matters when it is big enough to matter to
performance, and you can see it only when it is bigger than the scatter. For
tests in team sports, one widely used default for the
*smallest worthwhile change* is a fifth of the spread between
athletes . If jump heights in a squad
typically differ by 7 cm from the squad's average, a change of
about 1.4 cm is worth noticing. Maya's trials scatter by
several centimeters, so one jump before and one after cannot show a
1.4 cm gain. As Hopkins notes, the noise in most performance
tests is larger than the smallest worthwhile change. The remedies are better
resolution (a higher frame rate), more trials, and a stricter protocol.
Chapter 11 turns this into a decision rule.

> **Key idea.**
> 
> Bias moves every number the same way; scatter makes each one wobble. A change
> you want to detect must be bigger than the scatter and worth something to the
> athlete.

## 1.5 Who Is in the Room

This course is taken by people from different fields, on purpose. Each brings
something the others lack (Table 1.2).

*Table 1.2. Five roles around one measurement.*

| Role | Knows | Needs from the others |
|---|---|---|
| Engineer | Sensors, signals, error, building tools | Why the body does what it does; what a coach can use |
| Data scientist | Cleaning, statistics, models, code | Which questions matter; how the data was made |
| Exercise scientist | Physiology, biomechanics, testing protocols | Code, measurement error, tools that scale |
| Coach | The athlete, the sport, what changes behavior | Numbers they can trust, said in their words |
| Athlete | Their body, their goals, how a cue feels | Respect, privacy, a reason to care |

The engineer can make a camera time a jump to the millisecond and may not know
why the ankles matter. The exercise scientist knows the jump protocol and may
never have checked a formula in code. The data scientist can find a pattern in
a season of files and may not know that a pattern from twenty adult men need
not hold for a fifteen-year-old girl. The coach decides; the athlete does the
work and owns the body the data describes. Every one of them can be the person
who catches the mistake.

In week 2 the course forms lab teams of three across these backgrounds, who
share a chest strap and a tripod for the weekly collections. A team
with an engineer, an exercise scientist and an athlete covers more of the
pathway than three of any one kind. Throughout the book, *Body science*
boxes give the engineer the physiology, and *Engineer's note* boxes give
the exercise scientist the mathematics. Read the ones outside your field; skip
the ones inside it.

## 1.6 People's Data

A jump height, a heart rate and a video of a body are personal data. You will
collect your own first, then a teammate's, then an athlete's. The rules come
from the principles that govern research with people: respect for persons,
beneficence and justice . In practice they
come to five habits.

- **Consent before collection.** Tell the person what you will
  collect, why, who will see it, how long you will keep it, and that they may
  stop at any time without a reason. Get their agreement in writing for
  anything beyond your own data. A separate release is needed before any image
  of them is shown to others. Appendix E has the forms.

- **The minimum, kept close.** Collect what the question needs and no
  more. Process on the device where you can; the course apps do. Remove names
  and faces before sharing. Delete at the end of the term unless the person
  asks otherwise.

- **Minors need two yeses.** For anyone under 18, a parent or
  guardian gives permission and the young athlete gives their own
  agreement, the pattern the federal research rules set for
  children . No image of a minor leaves the team.

- **The athlete decides who sees it.** The athlete gets their own
  data and the report. The athlete, not the coach, decides who else sees it.

- **Class work is not research.** Exercises in this book are
  teaching. A team that wants to publish needs its institution's review board
  first, before collecting.

> **Limits and cautions: Not a diagnosis.**
> 
> Nothing in this course is a diagnosis, a medical clearance or a prediction of
> injury. If a measurement or a conversation turns up chest pain, an irregular
> heartbeat, pain that changes how someone moves, or signs of disordered eating,
> stop. Say what you saw, without interpreting it, and refer the athlete to a
> clinician. Your role ends there.

Personal health numbers (heart rhythm, body mass, glucose) are never graded or
compared in class. An exercise that uses your own data never asks you to share
a result you would rather keep.

## 1.7 Working with an AI Assistant

You will write most of the code in this course with an AI assistant, and
draft some of your writing with one. The course expects it. It also holds you
accountable for every number you hand to an athlete, so it teaches a method
with four steps: specify, generate, verify, defend (also used in https://apmonitor.com/dde/index.php/Main/AgenticData).

- **Specify.**  Before you ask for code, write what it must do, its input and
  output, and one test with an answer you worked out by hand. “A function
  `jump_height(frames, fps)` returning meters; 32 frames at 60 gives
  0.349.”

- **Generate.**  Let the assistant write the code.

- **Verify.**  Run your test. Read the code. Check one result a second way: by
  hand, in an app, or with a library.

- **Defend.**  Be able to explain any line a grader points to, and say what
  the code does on bad input (zero frames, a negative rate, a missing file).

\paragraph{What to hand over and what to keep.} Hand over typing: boilerplate,
plotting commands, file parsing, a first draft of a paragraph. Keep the
question, the check, the judgment about whether a number is plausible, the
relationship with the athlete, and the decision. Four rules hold throughout
the book:

- De-identify before you paste. Names, faces, dates of birth and route
  start points stay out of any outside AI service.

- Never cite a source you have not opened. Assistants invent references
  that look real; one study found that a majority of the citations one widely
  used assistant produced were fabricated, and a newer version still invented
  about one in five .

- Keep your prompt log with the work.

- You, not the assistant, are accountable for every number you report.

> **Check the AI: A height that is too good.**
> 
> Asked “my flight time was 0.50 seconds, how high did I jump?”, an assistant
> answers: “Using $h=\tfrac12 g t^2$, your jump height is
> $0.5\times9.81\times0.50^2 = 1.23 m$, an exceptional result.”
> Find the flaw before reading on. The formula uses the whole flight as if it
> were the rise; the rise takes half the flight, so $t/2$ belongs in it, giving
> $g t^2/8 = 0.31 m$. A height of 1.23 m fails the
> plausibility check of Section 1.2 on sight.

## 1.8 How the Book Works

\paragraph{Parts.} The fourteen chapters follow the fourteen weeks of the
course in four parts (Table 1.3). Part I lays
foundations: the questions (this chapter), the body as a system, the
mechanics of movement, and data in Python. Part II covers wearable sensors:
heart, satellite positioning and motion, and the newer sensors. Part III
covers video and pose estimation, then cyclic sports and single skills.
Part IV turns data into decisions: statistics and machine learning, building
your own app, coaching with numbers, and a look ahead.

\paragraph{Strands.} The exercises at the end of each chapter come in ten
strands, each with its own icon: concept checks, hand calculations, app labs,
Python analysis, body science, science of the sport, field collection, build,
communicate, and check the AI. Every hand calculation has an app or a notebook
that confirms it, and every app result can be checked by hand.

\paragraph{Levels.} Each exercise has one, two or three bars: Foundation for a
reader new to the strand, Core for what every student completes, Extension
for a reader with more background. About eight exercises a week are marked
CORE; they are the week's set, about three hours of work.

\paragraph{The build thread.} Each week adds one small step to an app of your
own, a web page that runs on a phone: B-1 this week, an empty page online;
B-2 a form and a table; B-3 an angle from three clicks on an image; and so on
to B-12, a working app with a report, tested on real users, and B-14, the app
shown at the end of the term. The page uses plain JavaScript and Vite, the same
build tool as the course apps.

\paragraph{The project.} Project teams of three or four form in week 10 and
choose one decision for one athlete or coach. The weekly build steps before
then grow the skills and the app the project starts from. Teams scope the
project and set a baseline in weeks 10 and 11, test a prototype with their user
in week 12, deliver a report in week 13 and demonstrate their app at the
showcase in week 14 (8 minutes, then 4 minutes of questions). Appendix G
gives the checkpoints.

*Table 1.3. The fourteen weeks.*

| Wk | Ch. | Title | The question the chapter opens with | Apps | Data the student collects |
|---|---|---|---|---|---|
| 6@l**Part I. Foundations** |  |  |  |  |  |
| 1 | 1 | Questions Before Dashboards | What do you want to decide, and what would you need to measure to decide it? | Jump; any one app of the student's choice | A jump on video; a pulse counted by hand |
| 2 | 2 | The Athlete as a System | Why can a runner hold one pace for an hour and a slightly faster one for only ten minutes? | Heart (first look) | Resting pulse; a step test with pulse counts |
| 3 | 3 | Mechanics of Movement | How does a 70 kg athlete leave the ground, and what decides how high? | Jump, canvas | A jump from three camera rates; a tape-measured height |
| 4 | 4 | Athlete Data in Python | The file has gaps, spikes and two clocks. What is the real signal? | Process-a-folder page of any app | A phone sensor log; the results files of weeks 1 and 3 |
| 6@l**Part II. Wearable Sensors** |  |  |  |  |  |
| 5 | 5 | Heart Rate, ECG and Heart Rate Variability | Two devices disagree by 15 beats a minute. Which is right? | Heart | Chest-strap ECG at rest, standing and in intervals |
| 6 | 6 | GPS Watches and Motion Sensors | The watch says 10.14 km on a 10.00 km course. Who ran long? | Watch dashboard; running | Laps of a measured track; a time trial |
| 7 | 7 | Glucose, Lactate and Emerging Sensors | The glucose sensor shows a fall at 30 km. Should she take a gel? | None | Sweat rate; a shared or supplied sensor record |
| 6@l**Part III. Video and Pose** |  |  |  |  |  |
| 8 | 8 | Seeing Movement: Video and Pose Estimation | The app drew a skeleton. How far is each dot from the real joint? | Canvas, range of motion, hip drop | A joint angle filmed beside a printed protractor |
| 9 | 9 | Gait and Cyclic Sports | Is this runner overstriding, or is the camera angle making it look that way? | Running, walking, cycling, swimming | Running at three cadences set by a metronome |
| 10 | 10 | Power, Skill and Precision | Which frame is the release, and what does one frame of error cost? | Jump, squat, push-up, starts, throws, disc, pitching, golf, tennis, basketball, dribbling, kicking | Ten repeats of one skill in the student's chosen sport |
| 6@l**Part IV. From Data to Decisions** |  |  |  |  |  |
| 11 | 11 | Is the Change Real? Statistics and Machine Learning | The athlete improved by 2 cm. Is that training or noise? | All, through results files | Repeat of earlier protocols; first athlete sessions |
| 12 | 12 | Build Your Own Performance App | What is the smallest tool that answers one coach's question? | Heart and one form app as models | User test of the student's app |
| 13 | 13 | From Numbers to Coaching | What will the athlete do differently tomorrow because of your report? | All reports | Athlete sessions with a report delivered and a response recorded |
| 14 | 14 | Summary and Outlook | What can be trusted now, what is coming, and what is yours to decide? | — | Reassessment of the term's first measurements |

### 1.8.1 Build step B-1: an empty page, online

This week's step is small on purpose: get the tools working end to end, from
your computer to a phone in your hand. Ask your AI assistant to help with each
step, and verify each one yourself.

- Install a current Node.js (the Vite guide lists the versions it
  needs ).

- Create a project from the plain JavaScript template, then install and run it:

```text
npm create vite@latest my-athlete-app -- --template vanilla
cd my-athlete-app
npm install
npm run dev -- --host
```

- The last command prints a network address. Open it on a phone on the
  same wireless network and see the starter page.

- Replace the starter page with one line of your own,
  Listing 1.3, and watch the phone update.

- Run `npm run build`. Vite writes the finished site to a folder
  named `dist`. If the host will serve it from a subfolder,
  first create `vite.config.js` holding the one line
  \texttt{export default \{ base: './' \}} and build again.

- Upload `dist` to a free static host (your instructor names
  one), open the public link on your phone, and send the link with a
  screenshot.

**Listing 1.3.** `main.js` for step B-1. The page shows one line and today's date. (`code/b1-main.js`)

```javascript
// src/main.js for build step B-1: replace the starter page with your own line.
const today = new Date().toLocaleDateString();

document.querySelector('#app').innerHTML = `
  <h1>Hello from my athlete app</h1>
  <p>Opened on ${today}. Next week: a form and a table.</p>
`;
```

A page that only says hello is not an app, but every later step is a change to
this project. If the link works on a phone in week 1, the hard part of
week 12 is already done.

## 1.9 Telling the Athlete

The pathway ends with something an athlete can act on. Here are two messages
to Maya after her session.

> **Coach's translation: A poor version.**
> 
> “Your CMJ flight-time height was 0.349 m with a reach-derived height of 0.41 m,
> a 16.1% discrepancy, probably due to plantarflexion before takeoff and the
> non-equivalent landing posture. Your triple extension could be better. Keep
> training and we'll see.”

> **Coach's translation: A good version.**
> 
> “You jumped about 35 centimeters on video, and your fingertips went about
> 41 above your standing reach; the wall counts the rise onto your toes, so it
> reads higher, and both are normal. Your three jumps varied by about four
> centimeters, so we'll take the best of three each time. Add the two short jump
> sessions, and we'll test the same way in six weeks: a gain bigger than about
> four centimeters will be clear.”

The poor version is accurate and useless. It is full of terms Maya did not ask
for, gives a precision of four digits the method cannot support, names a
fault without a fix, and has no date. The good version gives one number per
method in plain words, says how sure we are, gives one action and sets the
retest. Chapter 13 turns this into a one-page report.

## Summary

- Start from a decision. A measurement earns its place when it could
  change what someone does.

- The pathway: ask, collect, check, interpret, coach, reassess. Every
  chapter works on some of its steps.

- Jump height can be measured with a wall, a hand count of video frames,
  or an app. The wall measures from standing, flight time from takeoff, so
  they differ by several centimeters, and that is expected.

- Measured, derived and modeled quantities carry more assumptions at each
  step. Know which you hold.

- Accuracy is closeness to the truth (bias); precision is closeness of
  repeats (scatter); validity is measuring what the question needs;
  reliability is the same answer when nothing changed; resolution is the
  smallest step. A change worth noticing must beat the scatter.

- Consent first, the minimum data, two yeses for minors, the athlete
  decides who sees it, and no diagnosis.

- With an AI assistant: specify, generate, verify, defend. De-identify
  before pasting; never cite what you have not opened.

*Table 1.4. Formulas of Chapter 1.*

| Quantity | Formula |
|---|---|
| Flight time from frames | $t = \text{frames in the air}/\text{capture rate}$ |
| Height from flight time | $h = g t^2/8$ , $g=\SI{9.81}{\metre\per\second\squared}$ |
| Clearance correction (jump app, toe models) | $t=\sqrt{t_\text{obs}^2+8c/g}$ , $c=\SI{0.04}{\metre}$ ; then $h = g t_\text{obs}^2/8 + c$ |
| Heart rate from a count | beats in 15 s $\times\,4$ (resolution 4 bpm) |
| Percent difference | $100\,(A-B)/\big((A+B)/2\big)$ |
| Smallest worthwhile change (team-sport default) | $0.2\times$ spread between athletes |

**New terms:** accurate, bias, countermovement jump, derived
quantity, flight time, measured quantity, modeled quantity, percent difference,
pose estimation, precise, reliable, resolution, scatter, smallest worthwhile
change, standing reach, valid.

**Track it:** three `cmj` jump heights and a resting pulse, your first rows (Appendix J).

## Exercises

> **Course use: Week 1.**
> 
> **H02** (due Class 2, *Measure*): 1.1, 1.2, 1.5, 1.8, 1.17; about 70 minutes.
> 
> **H03** (due Class 3, *Model and tell*): 1.10, 1.19, 1.20, 1.21, 1.22, 1.23; about 160 minutes. A case-file exercise may be done on your own data instead. The full map is in the Course Guide.

**Exercise 1.1** (Concept check · Foundation · 2 min · CORE)

A tape measure hangs 2 cm too low on the wall, and every reach
height you record comes out 2 cm too large. Which word describes
this error?

(a) Scatter
(b) Bias
(c) Resolution
(d) Validity

**Exercise 1.2** (Concept check · Foundation · 2 min · CORE)

A volleyball coach wants to know whether a blocker's hands get higher over the
net after six weeks of training. Which measurement is the most *valid* for
that question?

(a) Resting heart rate counted for 60 s
(b) Flight time from a
force platform
(c) The hip rise reported by a video app
(d) Fingertip height
reached on a wall in a jump

**Exercise 1.3** (Concept check · Core · 2 min)

The jump app reports a jump height from the rise of the middle of the hips,
scaled by a stature you type in. Which kind of quantity is this?

(a) Modeled: it rests on assumptions about the body that may not
hold
(b) Measured: it is read straight from the instrument
(c) Derived: a formula
with assumptions that always hold
(d) Neither; it is a rating

**Exercise 1.4** (Concept check · Core · 2 min)

Your three video jump heights today are 0.33 , 0.37  and
0.35 m. The squad's smallest worthwhile change is
1.4 cm. After six weeks you measure one jump at
0.37 m. What can you conclude?

(a) The training worked: 2 cm beats
1.4 cm
(b) The training failed
(c) The change is unclear: a single
jump lies inside today's scatter
(d) The method is invalid

**Exercise 1.5** (Hand calculation · Foundation · 8 min · CORE)

Jordan films a countermovement jump at 60 fps and counts 27 frames in
the air.

- Find the flight time. *Checkpoint:* {0.450 s.}

- Find the jump height with $g=\SI{9.81}{\metre\per\second\squared}$.
  *Checkpoint:* {0.248 m.}

- Find the heights for 26 and 28 frames, and state the resolution of this
  method near this jump. *Checkpoint:* {0.230  and 0.267 m;
  about 2 cm a frame.}

- Confirm (b) with Listing 1.1 by changing
  `frames` to 27.

**Exercise 1.6** (Hand calculation · Foundation · 6 min)

- You count 22 beats in 15 s. What is the heart rate, and its
  resolution? *Checkpoint:* {88 bpm; 4 bpm.}

- A teammate counts 41 beats in 30 s. Heart rate and
  resolution? *Checkpoint:* {82 bpm; 2 bpm.}

- Why might the 15 s count be the better choice right after a
  set of jumps, despite its coarser resolution?

**Exercise 1.7** (Hand calculation · Extension · 10 min)

Sam's reach height is 0.46 m; the jump app's flight-time height for
the same jump is 0.40 m.

- Compute the percent difference, using the mean of the two as the base.
  *Checkpoint:* {14.0%.}

- On a different jump, the app, run with a toe-tracking pose model,
  observed 0.45 s above its 0.04 m clearance line. Compute the corrected flight time and height with
  $g=\SI{9.80665}{\metre\per\second\squared}$.
  *Checkpoint:* {0.485 s; 0.288 m.}

- Show that the corrected height equals the uncorrected height plus
  0.04 m.

- Give two reasons the reach height is larger than the flight-time
  height.

**Exercise 1.8** (App lab · Core · 20 min · CORE)

**Analyze yourself.** Use the jump app, https://apopt.com/jump/jump.php, in Basic
mode.

- Film one countermovement jump from the side, phone still on a tripod at
  waist height, whole body in frame from the start to the landing, at
  60 fps (or the highest normal-speed rate your phone offers; not slow
  motion). Clip length about 5 s.

- Type your stature. Check that the frame rate shown matches the rate you
  recorded at. Run the analysis; save the PDF and the text result
  (`.md`).

- Pick the flight time. Confirm it by hand: step through the video, count
  the frames in the air, and divide by the capture rate. Compute the height
  with Equation \eqref{ch01-questions:eq:flight}.

- Open Advanced mode. Find one number Basic mode left out, and say whether
  it changes your reading.

- Write half a page: what you measured, what it shows, how sure you are,
  what you would change, and when you would retest.

**Exercise 1.9** (App lab · Extension · 20 min)

Open the course example clip `jump2_120fps.mp4` in the jump app,
Advanced mode, with the capture rate set to 120 fps and a stature of
1.70 m.

- Record the app's flight time and its two heights.

- Step through the clip and count the frames in the air yourself (see
  Example 1.2). Compute the height.

- The app's capture instruction asks for a side view on a tripod. List
  three ways this clip breaks the instruction, and say which number you trust
  and why.

- The file repeats every sixth frame. Find one repeated pair while you
  step through. If the camera recorded at 120 fps, how many distinct
  frames are in your count, and what flight time and height do they give?

**Exercise 1.10** (Python analysis · Foundation · 15 min · CORE)

Run Listing 1.2 on the results file in
`data/`. Then, with an AI assistant, extend it to also print the line
that starts with `- Jump height:`. Before you run it, write down what
you expect it to print.

**Exercise 1.11** (Python analysis · Core · 20 min)

**Write the test, not the code.** Specify a function
`percent_difference(a, b)` that returns the difference of two
measurements as a percentage of their mean. Write two tests with answers you
computed by hand, one of them with Maya's numbers (0.41  and
0.349 m). Then have an assistant write the function, run your
tests, and say what the function should do when $a=b=0$.

**Exercise 1.12** (Python analysis · Extension · 25 min)

For a jump with a flight time near 0.50 s, write a short script
that prints the height change of one frame at 30, 60, 100, 120 and
240 fps. Find the lowest common phone frame rate that resolves the
height to 1 cm or better per frame, and confirm it with a
first-order estimate $\Delta h \approx (g t/4)\,\Delta t$.

**Exercise 1.13** (Body science · Foundation · 5 min)

Name the three joints that extend to drive a vertical jump, and explain in two
or three sentences, for a reader who has never studied anatomy, why the body
rises before the toes leave the ground.

**Exercise 1.14** (Body science · Core · 5 min)

Your pulse right after five hard jumps is higher than before them. In plain
words, explain why the heart beats faster during and after hard effort, and
why a pulse counted one minute later is lower than one counted at once.

**Exercise 1.15** (Science of the sport · Foundation · 5 min)

Choose a sport you know in which jumping matters. Write one performance
question about jumping in that sport as a decision: who decides, what they
decide, by when, and what result would change their mind.

**Exercise 1.16** (Science of the sport · Extension · 8 min)

In basketball and volleyball, players are often compared by their standing
reach and their jump reach rather than their jump height. Explain why a coach
selecting a blocker might prefer reach to flight-time height, and one reason
the flight-time height might still be the better number for tracking training.

**Exercise 1.17** (Field collection · Foundation · 40 min · CORE)

**Three ways, one jump, and a pulse.** Equipment: a wall you may mark,
chalk or sticky notes, a tape measure, a phone and a tripod (or books), a
timer.

- Safety: warm up for five minutes (easy jogging, ten squats, five easy
  jumps). Jump on a flat, non-slip floor in athletic shoes. Stop if anything
  hurts. Skip the jumps if you have been told not to jump; do only the pulse.

- Consent: this exercise uses only your own data. If a teammate films you,
  agree with them that the video stays on your phone.

- Before jumping, sit for two minutes and count your pulse at the wrist
  for 15 s. Record beats and heart rate.

- Standing side-on to the wall, flat-footed, mark your standing reach.

- Set the phone at waist height, 3  to 4 m away, side
  view, whole body in frame, at 60 fps normal speed.

- Do three countermovement jumps, 30 s apart, touching the wall
  at the top of each. Land on both feet with legs straight at first contact
  as far as is comfortable.

- Measure each reach mark. Count the frames in the air for each jump.

- Immediately after the third jump, count your pulse for
  15 s.

Record: standing reach, three marks, three frame counts, the frame rate, two
pulse counts. Compute the reach heights, the video heights, the means, the
range of each method and the percent difference between the methods.

**Exercise 1.18** (Field collection · Core · 30 min)

**Run one app on a movement you already do.** Pick any app at \apopt{}
other than the jump app that fits a movement you do (a run, a squat, a shot, a
serve). Read its capture instruction in the app and follow it exactly. Record
the clip at normal speed and note the frame rate. Save the PDF and text
result. In five sentences: what question could this app help you answer, which
one number would you use, how could you check that number by hand, and what
part of the instruction was hardest to follow?

**Exercise 1.19** (Build · Foundation · 60 min · CORE)

Complete build step B-1 (Section 1.8.1): create the Vite
project with an AI assistant, show your own line on a phone over your local
network, build it, put `dist` on a free static host, and submit the
public link, a phone screenshot, and your prompt log. Add two sentences: one
thing the assistant got wrong or left out, and how you found it.

**Exercise 1.20** (Communicate · Core · 20 min · CORE)

Explain your jump result from the field exercise to a friend who does not play
sport, in three sentences. Include how sure you are and one thing you would
change before measuring again.

**Exercise 1.21** (Check the AI · Core · 8 min)

An assistant is asked to summarize the evidence on phone-based jump
measurement. It writes: “Phone apps that time flight from slow-motion video
agree closely with force platforms, with a bias of about one centimeter
(Smith and Lee, 2019, *Journal of Jump Science*, 12:45–52). Therefore
any phone measurement of jump height is accurate to one centimeter.” Find two
problems.

**Exercise 1.22** (Python analysis · Core · 30 min)

Case file: open one running activity from the instructor's watch archive (the
first case file at apopt.com/data/athletes). Use the distance, elapsed time
and moving time from the archive's activity summary, or ask an AI assistant to
read them from the FIT file with the `fitdecode` library; either way,
write down where each number came from.

- Before writing code, compute speed (m/s) and pace
(minutes and seconds per kilometer) by hand for three known cases: 10 km
in 50:00, 5 km in 22:30, and one mile (1609.344 m) in
8:00. *Checkpoint:* {3.333 m/s and 5:00; 3.704 m/s
and 4:30; 3.353 m/s and 4:58.3 per kilometer.}

- Specify, then generate: a function `speed_pace(distance_m, seconds)`
that returns both. Put your three hand answers in `assert` lines and run
them before anything else. Say what the function must do when the distance or
the time is zero, and test that too. *Checkpoint:* {All three asserts pass; a zero
input stops with a clear error message instead of returning `inf` or
`nan`.}

- Apply the function to the activity twice, with elapsed time and with
moving time. *Checkpoint:* {Speed times time gives back the distance to rounding;
the moving-time pace is equal to or faster than the elapsed-time pace.}

- The watch also reports its own average pace. Which of your two paces does
it match, and what does that tell you about how the watch treats pauses?

**Exercise 1.23** (Communicate · Core · 25 min)

Case file: choose the athlete you will follow all term from the case files at
apopt.com/data/athletes and read the profile (sport, age band, season goal,
story). Write one decision question for this athlete in the form of
Section 1.2: the person, the decision, the time,
the test, and what result would change your mind. Then name the measurement you
would use and one check you would run on it. Finish with a paragraph of at
most 100 words to the athlete explaining what you would measure and why, in
plain words.
