However, many real-world phenomena require multiple explanatory variables. ? Simple linear regression is, well, simpler to understand and compute than multiple regression. If there are multiple explanatory variables, we call the model multiple linear regression. We call such a model simple linear regression. ⚠ Bear in mind that in this article we restrict our attention to the case with only one explanatory variable.
Linear regression equation calculator how to#
In the next section, we will explain how to interpret these parameters, and then we will show you how to calculate them efficiently. We are going to find a straight non-vertical line with a slope a, and an intercept b, i.e., the line of the best fit has the formula:Īs you can see, it is really easy to write down the linear regression equation! When calculating linear regression, we need to work out the values of the parameters a and b. We assume that x is an independent variable, and that y is a dependent variable. Assume we are given a set of points in the Cartesian plane: It's time for a more formal definition of linear regression. A simple example is when we want to predict the weights of students based on their heights, or in chemistry, where linear regression is used in the calculation of the concentration of an unknown sample.īe careful, as in some situations simple linear regression may not be the right model! If your data seem to follow a parabola rather than a straight line, then you should try using quadratic regression, if they rather resemble a cubic (degree three) curve, think of cubic regression, while if your data come from a process characterized by exponential growth, try exponential regression instead.
In other words, when we have a set of two-dimensional data points, linear regression describes the (non-vertical) straight line that best fits these points.
Linear regression is a statistical technique that aims to model the relationship between two variables (one variable is called explanatory/independent and the other is dependent) by determining a linear equation that best predicts the values of the dependent variable based on the values of the independent variable.