statistics
statistics copied to clipboard
Documentation: example(s) of simple cases of linear regression
As a non-statistician, I need to run linear regression on a set of data points, such as:
measurements = [(1.0, 2.0), (2.0, 2.5), (3.0, 3.0)} :: [(Double, Double)] -- (X, Y) coordinates of points
and get a = 1.5 and b = 0.5 from the fromula
y = a + bx
While the function for the least squares algorithm exists (Statistics.Regression.ols, apparently), it is not clear for a non-statistician how to convert the data to the arguments of the ols function and how to interpret the results.
It would be helpful to have examples in the documentation for such common and simple use cases for ols (and maybe other common functions) to make it approachable for people without (much) background in statistics.