Regression Analysis in Excel
Regression Analysis in Excel
Where:
x is an independent variable.
y is a dependent variable.
a is the Y-intercept, which is the expected mean
value of y when all x variables are equal to 0.
On a regression graph, it's the point where the
line crosses the Y axis.
b is the slope of a regression line, which is the
rate of change for y as x changes.
ε is the random error term, which is the
difference between the actual value of a
dependent variable and its predicted value.
The linear regression equation always has an error
term because, in real life, predictors are never
perfectly precise. However, some programs,
including Excel, do the error term calculation behind
the scenes. So, in Excel, you do linear regression
using the least squares method and seek
coefficients a and b such that:
y = bx + a
How to do regression in
Excel using formulas
Microsoft Excel has a few statistical functions that
can help you to do linear regression analysis such as
LINEST, SLOPE, INTERCEPT, and CORREL.
The LINEST function uses the least squares
regression method to calculate a straight line that
best explains the relationship between your
variables and returns an array describing that line.
You can find the detailed explanation of the
function's syntax in this tutorial. For now, let's just
make a formula for our sample dataset:
=LINEST(C2:C25, B2:B25)