statistics-linreg-0.2.2: Linear regression between two samples, based on the 'statistics' package.

Safe HaskellNone

Statistics.LinearRegression

Synopsis

Documentation

linearRegression :: Sample -> Sample -> (Double, Double)Source

Simple linear regression between 2 samples. Takes two vectors Y={yi} and X={xi} and returns (alpha, beta) such that Y = alpha + beta*X

linearRegressionRSqr :: Sample -> Sample -> (Double, Double, Double)Source

Simple linear regression between 2 samples. Takes two vectors Y={yi} and X={xi} and returns (alpha, beta, r*r) such that Y = alpha + beta*X and where r is the Pearson product-moment correlation coefficient

linearRegressionTLS :: Sample -> Sample -> (Double, Double)Source

Total Least Squares (TLS) linear regression. Assumes x-axis values (and not just y-axis values) are random variables and that both variables have similar distributions. interface is the same as linearRegression.

correl :: Sample -> Sample -> DoubleSource

Pearson's product-moment correlation coefficient

covar :: Sample -> Sample -> DoubleSource

Covariance of two samples