Univariate Regression using matrices