# Tutorial Q-5: Fit a straight line and read the slope's units

Fit heart rate against step-test workload with least squares, state the slope in beats a minute per watt and per step cycle, and see why the line's intercept is not the resting heart rate.

Address: https://apopt.com/data/tutorials/q05-straight-line/  
License: CC BY 4.0  
Prepared: 2026-12-03

## Description

Files for the tutorial *Fit a straight line and read the slope's units* (https://apopt.com/course/tutorials/q05-straight-line/). `raw/` holds the inputs as the device or app wrote them; `clean/` holds the cleaned copies the tutorial writes; `expected/` holds what a correct run prints and saves, so you can check your own run.

## Files

| file | size | rows | description |
|---|---|---|---|
| [expected/printed-output.txt](https://apopt.com/data/tutorials/q05-straight-line/expected/printed-output.txt) | 486 B |  | Everything the tutorial prints, cell by cell |
| [raw/steptest_counts.csv](https://apopt.com/data/tutorials/q05-straight-line/raw/steptest_counts.csv) | 338 B | 8 rows | pulse counts after three step-test stages and in recovery, with the lifting power of each stage (synthetic) |

Large files are stated with their size. A `preview.md` in this folder shows the first rows of each table.

## Provenance

- Source: Data-Driven Athletics tutorials (IRSRI, 2027)
- Removed: nothing; inputs are synthetic, published course data, or the instructor's own
- Permission basis: Published with the course under CC BY 4.0
- Prepared with: dda/tutorials/build.py

## Used in

- Book: [Chapter 2: The Athlete as a System](https://apopt.com/book/ch02-system/)
- Course: [Week 2 lesson](https://apopt.com/course/week/2/)
- Homework H04: [https://apopt.com/course/assess/h04/](https://apopt.com/course/assess/h04/)
- Homework H05: [https://apopt.com/course/assess/h05/](https://apopt.com/course/assess/h05/)

## How to cite

Tutorial Q-5: Fit a straight line and read the slope's units. IRSRI Sports Research Institute, 2026. Data-Driven Athletics data repository. https://apopt.com/data/tutorials/q05-straight-line/

## Load it

```python
import pandas as pd
df = pd.read_csv("https://apopt.com/data/tutorials/q05-straight-line/raw/steptest_counts.csv")
```
