How to make Linear Regression in Excel?

A linear regression line has an equation of the kind: Y= a + bX;

Where:

  • X is the explanatory variable,
  • Y is the dependent variable,
  • b is the slope of the line,
  • a is the y-intercept (i.e. the value of y when x=0).

Add the regression line by choosing the “Layout” tab in the “Chart Tools” menu. Then select “Trendline” and choose the “Linear Trendline” option, and the line will appear as shown above.

  • Linear regression models the relationship between a dependent and independent variable(s).
  • Also known as ordinary least squares (OLS), a linear regression essentially estimates a line of best fit among all variables in the model.
  • Regression analysis can be considered robust if the variables are independent, there is no heteroscedasticity, and the error terms of variables are not correlated.
  • Modeling linear regression in Excel is easier with the Data Analysis ToolPak.
  • Regression output can be interpreted for both the size and strength of a correlation among one or more variables on the dependent variable.