apopt.comCBE 493R Data-Driven Athletics

Course / Tutorials / Week 9 / Q-27

Quick tutorial Q-27 · Week 9 · about 15 min · Foundation

An asymmetry index, three definitions

Compute a left–right asymmetry three ways, as the walking app does for three measures, and see that the frame grid can matter more than the formula.

  1. 1Gather
  2. 2Statistics
  3. 3Visualize
  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. Helpful first: Q-25 Find foot contacts in an ankle trace.

The decision

A runner is told one leg spends longer on the ground than the other. Before anyone acts on it, decide whether the difference is larger than the measurement can resolve, and whether the number was computed the same way as the one it is being compared with.

The raw data

Try it

An asymmetry index compares a left value with a right value. Section 9.5 gives the common form, the difference as a percentage of the mean of the two sides:

A = 100 × |L − R| / ((L + R) / 2).

It is not the only one. The walking app uses three definitions for three of its measures (checked in walk/src/lib/metrics.ts): stance time uses the mean of the two sides as the denominator, arm swing uses the larger side, and knee bend uses the plain difference in degrees. Apply all three to one runner's contact times and see how much the definition and the frame rate decide the answer.

PythonContact time of every foot plant, left and right

Type a prediction to enable Run.

Show the expected result without running
left:  22 contacts, frames [0, 1, 13, 8] (counts of 4, 5, 6, ... frames)
right: 22 contacts, frames [0, 1, 13, 8]
mean contact: left 211 ms, right 211 ms

Every contact is a whole number of frames, mostly 6 or 7 (200 or 233 ms), and the two feet have exactly the same mix: 13 contacts of 6 frames and 8 of 7 on each side. Now the three definitions, on the runner's two means and on a pair of values that do differ, the median single-leg hop heights of Section 10.2's worked example (0.142 m left, 0.121 m right).

PythonThree definitions, two examples

Show the expected result without running
runner, contact time: mean denominator 0.0 %, larger denominator 0.0 %, plain difference 0.0 ms
hops, height (Section 10.2): mean denominator 16.0 %, larger denominator 14.8 %, plain difference 2.1 cm
one frame in a 6-frame contact: 15.4 % by the mean, 14.3 % by the larger
PythonAsymmetry step by step

Show the expected result without running
pairs: median 15.4 %, 9 of 22 exactly 0
The mean-denominator asymmetry of each pair of consecutive left and right contacts across the run, jumping between 0 and 15 percent (once 33), the asymmetry of the two means at 0, and dashed lines at 3 and 8 percent.

Three lessons, one per cell.

For the athlete: a left–right difference in contact time from a 30-frames-per-second clip means nothing unless it is larger than one frame and shows in the average over many steps.

With your own data

Run this page on your own two-ankle table, then film the same run at the highest frame rate your phone offers and compare the pair-by-pair spread.

Check yourself

  1. Left 0.142 m, right 0.121 m. What is the asymmetry with the mean of the two as the denominator?

    %

  2. Contacts of 6 and 7 frames at 30 frames per second give 15.4% asymmetry. What happens at 120 frames per second, for the same 0.2 s contact?

0 of 2 answered · 0 right the first time

The same method in another field

Comparing two channels that should match, two load cells under one beam or two temperature sensors on one pipe, needs the same care: state the formula, and compare the difference with the resolution of each channel before calling it real.

Acknowledgements

Ankle table from Chapter 9 of Data-Driven Athletics; the hop heights are the worked example of Chapter 10.

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.