Fit a line through 0, y = slope * x, as in “Through the cloud”, but from only a few noisy points. Write careful_slope(xs, ys, caution): a slope that doesn’t trust thin evidence. caution ≥ 0 says how much you distrust a slope built on little evidence; 0 means no caution at all.
| xs | 1 | 2 |
|---|---|---|
| ys | 2 | 4 |