@@ -631,25 +631,25 @@ However, for reading convenience, most of the examples show sorted sequences.
631631 Return the intercept and slope of `simple linear regression
632632 <https://en.wikipedia.org/wiki/Simple_linear_regression> `_
633633 parameters estimated using ordinary least squares. Simple linear
634- regression describes relationship between *regressor * and
635- *dependent variable * in terms of linear function:
634+ regression describes the relationship between *regressor * and
635+ *dependent variable * in terms of this linear function:
636636
637637 *dependent_variable = intercept + slope \* regressor + noise *
638638
639639 where ``intercept `` and ``slope `` are the regression parameters that are
640- estimated, and noise term is an unobserved random variable, for the
640+ estimated, and noise represents the
641641 variability of the data that was not explained by the linear regression
642- (it is equal to the difference between prediction and the actual values
642+ (it is equal to the difference between predicted and actual values
643643 of dependent variable).
644644
645645 Both inputs must be of the same length (no less than two), and regressor
646- needs not to be constant, otherwise :exc: `StatisticsError ` is raised.
646+ needs not to be constant; otherwise :exc: `StatisticsError ` is raised.
647647
648- For example, if we took the data on the data on `release dates of the Monty
648+ For example, we can use the `release dates of the Monty
649649 Python films <https://en.wikipedia.org/wiki/Monty_Python#Films> `_, and used
650- it to predict the cumulative number of Monty Python films produced, we could
651- predict what would be the number of films they could have made till year
652- 2019, assuming that they kept the pace.
650+ it to predict the cumulative number of Monty Python films
651+ that would have been produced by 2019
652+ assuming that they kept the pace.
653653
654654 .. doctest ::
655655
@@ -659,14 +659,6 @@ However, for reading convenience, most of the examples show sorted sequences.
659659 >>> round (intercept + slope * 2019 )
660660 16
661661
662- We could also use it to "predict" how many Monty Python films existed when
663- Brian Cohen was born.
664-
665- .. doctest ::
666-
667- >>> round (intercept + slope * 1 )
668- -610
669-
670662 .. versionadded :: 3.10
671663
672664
0 commit comments