Course / Tutorials / Week 7 / Q-21
Quick tutorial Q-21 · Week 7 · about 15 min · Foundation
Sweat rate from two weighings
Turn a log of weighings before and after runs into sweat rates and body-mass losses, catch a value typed in the wrong unit, and relate sweat rate to air temperature.
- 1Gather (used)
- 2Statistics (used)
- 3Visualize
- 4Cleanse (used)
- 5Features (used)
- 6Balance
- 7Scale
- 8Split
- 9Deploy
- Ask
- Collect (this week)
- Check (this week)
- Interpret (this week)
- Coach (this week)
- Reassess
Download notebook ·Python file ·Read as Markdown ·Data folder ·Chapter 7 (sections 2.7, 7.6)
Every cell runs in this page; the first run downloads Python (about 30 s). Nothing you load leaves your browser.
The decision
A runner has a hot 90-minute race coming. How much does she sweat, and how much should she plan to drink to keep her body-mass loss under 2%?
The raw data
raw/weighings_synthetic.csv: SYNTHETIC weighing log, ten runs by an invented 70 kg runner (date, minutes, air_temp_c, mass_before_kg, mass_after_kg, drink_l, urine_l); one after-weight is typed in pounds. Made by this tutorial'sprepare.py(seeded, reproducible); no real person.
Try it
You do not need a sweat patch to know how much you sweat. Weigh yourself before and after a run, note what you drank and any urine you passed, and almost all of the mass lost is water (Section 7.6):
sweat rate = (mass before − mass after + drink − urine) / time, with 1 L of water = 1 kg.
The log here is synthetic: ten runs by an invented 70 kg runner, made by prepare.py to look like a real log, including one mistake a real log would have.
Open the log and check it
Type a prediction to enable Run.
Show the expected result without running
date minutes air_temp_c mass_before_kg mass_after_kg drink_l urine_l 2027-03-01 60 8.0 69.9 69.9 0.49 0.0 2027-03-06 75 12.0 70.2 69.6 0.19 0.0 2027-03-11 60 15.0 69.7 69.1 0.13 0.0 2027-03-16 75 18.0 70.1 69.8 0.83 0.0 2027-03-21 60 20.0 69.8 68.7 0.24 0.2 2027-03-26 75 22.0 70.1 69.0 0.39 0.0 2027-03-31 60 24.0 70.4 153.0 0.46 0.2 2027-04-05 45 26.0 69.9 69.2 0.23 0.0 2027-04-10 60 28.0 70.3 69.0 0.00 0.0 2027-04-15 75 31.0 69.6 67.7 0.23 0.0 rows where the mass changed by more than 10%: [6]
Row 6 shows 153.0 kg after a one-hour run that started at 70.4 kg. Nobody gains 83 kg on a run: 153.0 is the after-weight typed in pounds (153.0 / 2.20462 = 69.4 kg). Fix it with a rule you can state, and keep a note of the change.
Sweat rate and mass loss
Show the expected result without running
date air_temp_c minutes sweat_l_per_h mass_loss_pct note 2027-03-01 8.0 60 0.49 0.00 2027-03-06 12.0 75 0.63 0.85 2027-03-11 15.0 60 0.73 0.86 2027-03-16 18.0 75 0.90 0.43 2027-03-21 20.0 60 1.14 1.58 2027-03-26 22.0 75 1.19 1.57 2027-03-31 24.0 60 1.26 1.42 after-weight was in lb; divided by 2.20462 2027-04-05 26.0 45 1.24 1.00 2027-04-10 28.0 60 1.30 1.85 2027-04-15 31.0 75 1.70 2.73
Only the hottest run, at 31 °C, lost more than 2% of body mass (2.7%), the level the American College of Sports Medicine advises drinking to stay under (Sawka and others, 2007). Sweat rate more than triples from the coolest run to the hottest.
Sweat rate against temperature
Show the expected result without running
sweat rate ≈ 0.06 + 0.049 × temperature (L/h, °C) at 30 °C: 1.53 L/h; scale resolution adds up to ±0.08 to ±0.13 L/h 90 min at 30 °C: drink at least 0.60 L/h to keep the loss under 2%

On a scale that reads to 0.1 kg, each weighing can be off by up to 0.05 kg, so the mass change can be off by up to 0.1 kg; over a one-hour run that is up to 0.1 L/h, and over 45 minutes up to 0.13 L/h. Longer runs and a finer scale give a better number. The line is this runner's own: sweat rates differ a great deal between people (Sawka and others, 2007).
For the athlete: "At 30 °C you sweat about 1.5 litres an hour; on a 90-minute run in that heat, drink at least 0.6 litres an hour to keep the loss under 2% of your weight."
Action card
- Finding
- Sweat rate rises from about 0.5 L/h at 8 °C to about 1.7 L/h at 31 °C for this runner.
- Evidence
- Ten weighed runs; a straight line through them predicts 1.53 L/h at 30 °C; only the hottest run lost more than 2% (2.7%).
- How sure
- Each rate is good to about 0.1 L/h on a one-hour run (scale resolution); the line rests on ten runs.
- Action
- For a 90-minute run at 30 °C, plan to drink at least 0.6 L an hour to keep the loss under 2%.
- Test again
- Weigh before and after every hot run for a month and refit the line.
With your own data
Weigh yourself in the same dry clothes before and after your next few runs, write down the minutes, what you drank and any urine, and the air temperature, and type the log in the same seven columns.
Check yourself
Before 70.0 kg, after 69.1 kg, drank 0.5 L, no urine, one hour. What was the sweat rate, in L/h?
An after-weight of 153.0 kg follows a before-weight of 70.4 kg. What is the right first step?
References
- Sawka, M. N., Burke, L. M., Eichner, E. R., Maughan, R. J., Montain, S. J., and Stachenfeld, N. S. (2007). American College of Sports Medicine position stand: exercise and fluid replacement. Medicine & Science in Sports & Exercise, 39(2), 377–390. doi:10.1249/mss.0b013e31802ca597
- Data-Driven Athletics, Chapter 7, Sweat rate with a scale (Section 7.6).
Built 2026-11-30 with Python packages numpy 2.5.5, pandas 3.1.1, matplotlib 3.11.2. In the browser the same code runs on Pyodide, so the last digit can differ.