/linear-regression

Linear regression

Primary LanguageRubyMIT LicenseMIT

#Linear regression

##Install

gem install linear-regression

Intro

My goal is to simplify the understanding to enable programmers and play around with all these definitions using your favorite programming language (I realized it using Ruby).

On this subject, you can find a lot of material (both online and in books), but yet I did not meet version, depending on which you can easily to implement algorithm in a programming language.

I add links to all the definitions (wikipedia) where you can read more detail (more theoretical form).

A bit of theory

The model is described by the equation:

lm

where:
yi - dependent variable
kxi - known value (constant)
beta, k - model parameters (y-intercept and slope)
epsilon - error term, (disturbance term, or noise)

covariance

or

covariance

variance

Standard deviation

Model parameters (slope and y-intercept)

slope

slope

y-intercept

y-intercept