title: Efficient way to do a rolling linear regression
body: <p>I have two vectors x and y, and I want to compute a rolling regression for those, e.g a on <code>(x(1:4),y(1:4)), (x(2:5),y(2:5)), ...</code><br>
  Is there already a function for that? The best algorithm I have in mind for this is O(n), but applying separate linear regressions on every subarrays would be O(n^2).
  I'm working with Matlab and Python (numpy).</p>