[issue45766] Add direct proportion option to statistics.linear_regression()

Raymond Hettinger report at bugs.python.org
Thu Nov 11 01:54:54 EST 2021


Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:

Sure, I’m happy to wait.

My thoughts:

* The first link you provided does give the same slope across packages.  Where they differ is in how they choose to report statistics for assessing goodness of fit or for informing hypothesis testing. Neither of those apply to us.

* The compared stats packages offer this functionality because some models don’t benefit from a non-zero constant. 

* The second link is of low quality and reads like hastily typed, stream of consciousness rant that roughly translates to “As a blanket statement applicable to all RTO, I don’t believe the underlying process is linear and I don’t believe that a person could have a priori knowledge of a directly proportional relationship.”  This is bunk — a cold caller makes sales in direct proportion to the number of calls they make, and zero calls means zero sales.

* The last point is a distractor.  Dealing with error analysis or input error models is beyond the scope of the package. Doing something I could easily do with my HP-12C is within scope. 

* We’re offering users something simple. If you have a need to fit a data to directly proportional model, set a flag.

* If we don’t offer the option, users have to do too much work to bridge from what we have to what they need:

   (covariance(x, y) + mean(x)*mean(y)) / (variance(x) + mean(x)**2)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45766>
_______________________________________


More information about the Python-bugs-list mailing list