Watch signed errors cancel
Use signed errors to see direction.
Use signed errors to see direction. Use their absolute values when you need the size of a typical miss. Two large misses can cancel in a signed average.
Work through the example
A two-second overshoot and a two-second undershoot average to zero. Their mean absolute error is 2 seconds.
Run the example as a separate Python file. The inputs are synthetic so you can change them and see exactly which assumption affects the result.
Run the example
from statistics import mean
errors = [2, -2]
print(mean(errors), mean(map(abs, errors)))
Expected output
0 2
Reference: https://docs.python.org/3/library/statistics.html
The team guide · My original notes on testing coding agents · Working with Lightbulb Partners