Introduction: What is Linear Regression
Linear regression is a statistical technique that is used to model the relationships between dependent variables and one or more independent variables.The linear relationship, which is built by linear regression, gives a brief explanation of the relation between the value of the dependent variable and the values of the independent variable.

- Ordinary Least Squares (OLS)
- Gradient Descent
The Ordinary Least Squares Method
The OLS method is a statistical technique that is used to estimate the parameters of a linear regression model. The method is based on the principle of least squares, which states that the best estimate of the parameters is obtained by minimizing the sum of squared residuals. In other words, OLS finds the line of best fit by minimizing the distance between the data points and the line itself. Linear Regression is utilized to build a connection among a dependent variable and one or many independent variables. Smallest Square Error is referred to by the term “least squares”. The other method, such as Generalized and Maximum likelihood, are considered other techniques of OLS.Mathematics of OLS
For a dataset with k examples, the OLS method approaches to find optimal coefficients to satisfy the follow equation.


