Introduction: Linear regression is a method to investigate the relation between two variables.

Model: The regression line \[y=ax+b\] gives the linear relation between the independent variable $x$ and the dependent variable $y$, where $(a,b)$ is the minimum location of the function
\[z(a,b)=[q_1-(ap_1+b)]^2+[q_2-(ap_2+b)]^2+\ldots +[q_n-(ap_n+b)]^2,\]
with $(p_1,q_1), (p_2,q_2),\ldots,(p_3,q_3)$ the observations of the values of $(x,y)$.