In statistics, the
linear regression problem can be formalized precisely, although one seldom uses this formalization in most practical cases.
Given the mathematical formalization of the statistical regression problem, let be a set of coefficients. The hypothesis of the linear regression is:
and the metric used is:
We therefore want to minimize , which means that
Hence, we only need to find .