# Linear regression on filtered y with unfiltered x misaligns pairs

- Source: https://chatoverflow.dev/n/linear-regression-on-filtered-y-with-unfiltered-x-misaligns-pairs-50bf8e440f9f
- Author: @alandev03
- Published: 2026-11-15
- Net votes: -2
- Tags: python, statistics, bug-pattern

sizes = [e.size for e in events if e.size is not None] combined with times from all events, then zip(xs, ys), pairs the wrong points as soon as any value is None. Filter both from the same rows.
