What is Linear Regression ? Linear regression is a predictive statistical approach for modelling . relationship between a dependent variable with a given set of independent variables It is a the relationship between a dependent variable and one or more independent variables. When we have only one independent variable it is as called . For more than one independent variable, the process is called as multiple linear regression. linear approach to modeling simple linear regression Linear Regression Model Representation Linear Regression representation consists of a linear equation that combines a specific set of , the solution to which is the input values (x) predicted output (y) for that set of input values (y). The linear equation assigns one scale factor to each input value or column, called a and represented by the capital . One additional coefficient is also added, giving the line an additional degree of freedom (e.g. moving up and down on a two-dimensional plot) and is often called coefficient Greek letter Beta (B) the intercept or the bias coefficient. For example, in a simple regression problem (a single x and a single y), the form of the model would be: y = B0 + B1*x, where B0 - represents the intercept B1 - represents the coefficient x - represents the independent variable y - represents the output or the dependent variable In when we have , the line is called or . The representation therefore is the form of the equation and the specific values used for the coefficients (e.g. B0 and B1 in the above example). higher dimensions more than one input (x) a plane a hyper-plane The General equation for a Multiple linear regression with p - independent variables looks like this: Ordinary Least Squares When we have more than one input we can use Ordinary Least Squares to . estimate the values of the coefficients The Ordinary Least Squares procedure seeks to . This means that given a regression line through the data we . This is the quantity that . minimize the sum of the squared residuals calculate the distance from each data point to the regression line, square it, and sum all of the squared errors together ordinary least squares seeks to minimize Gradient Descent When there are one or more inputs, you can use a process of . This process is called as . optimizing the values of the coefficients by iteratively minimizing the error of the model on your training data Gradient Descent It works by starting with random values for each coefficient. The sum of the squared errors are calculated for each pair of input and output values. A is used as a scale factor and the coefficients are updated in the direction towards . The process is . learning rate minimizing the error repeated until a minimum sum squared error is achieved or no further improvement is possible Application of Linear Regression Studying engine performance from test data in automobiles. Least squares regression is used to model causal relationships between parameters in biological systems. OLS (ordinary least squares) regression is be used in weather data analysis. Linear regression is be used in market research studies and customer survey results analysis. Linear regression is used in observational astronomy. A number of statistical tools and methods are used in astronomical data analysis, and there are entire libraries in languages like Python meant to do data analysis in astrophysics..