summaryrefslogtreecommitdiffstats
path: root/Lib/statistics.py
diff options
context:
space:
mode:
authorRaymond Hettinger <rhettinger@users.noreply.github.com>2021-05-17 02:21:14 (GMT)
committerGitHub <noreply@github.com>2021-05-17 02:21:14 (GMT)
commitb3f65e819f552561294a66e350a9f5a3131f7df2 (patch)
tree406616b909c355daff709910584973dc946d4373 /Lib/statistics.py
parentfdc7e52f5f1853e350407c472ae031339ac7f60c (diff)
downloadcpython-b3f65e819f552561294a66e350a9f5a3131f7df2.zip
cpython-b3f65e819f552561294a66e350a9f5a3131f7df2.tar.gz
cpython-b3f65e819f552561294a66e350a9f5a3131f7df2.tar.bz2
Apply edits from Allen Downey's review of the linear_regression docs. (GH-26176)
Diffstat (limited to 'Lib/statistics.py')
-rw-r--r--Lib/statistics.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/statistics.py b/Lib/statistics.py
index 507a5b2..5d38f85 100644
--- a/Lib/statistics.py
+++ b/Lib/statistics.py
@@ -930,15 +930,15 @@ def linear_regression(regressor, dependent_variable, /):
Return the intercept and slope of simple linear regression
parameters estimated using ordinary least squares. Simple linear
regression describes relationship between *regressor* and
- *dependent variable* in terms of linear function::
+ *dependent variable* in terms of linear function:
dependent_variable = intercept + slope * regressor + noise
- where ``intercept`` and ``slope`` are the regression parameters that are
- estimated, and noise term is an unobserved random variable, for the
- variability of the data that was not explained by the linear regression
- (it is equal to the difference between prediction and the actual values
- of dependent variable).
+ where *intercept* and *slope* are the regression parameters that are
+ estimated, and noise represents the variability of the data that was
+ not explained by the linear regression (it is equal to the
+ difference between predicted and actual values of dependent
+ variable).
The parameters are returned as a named tuple.