The SLOPE function calculates the slope of the linear regression line through the data points described by array_x (the independent or controlled variable) and array_y (the dependent variable).
The slope is the vertical distance between any two data points divided by the horizontal distance between the same two data points. It is a measure of the rate of change of the regression line, and is given by the formula:
where b is the slope of the regression line.
The x- and y-arrays or ranges must have the same number of data points.
For example, suppose the following y-values were observed for the supplied x-values:
Y |
4.7 |
6.0 |
11.2 |
10.6 |
8.2 |
7.3 |
15.8 |
11.7 |
X |
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
A linear regression through these points would look like this:
You calculate the slope of the line using:
SLOPE({4.7, 6, 11.2, 10.6, 8.2, 7.3, 15.8, 11.7}, {1, 2, 3, 4, 5, 6, 7, 8})
which returns 0.9988.
See also: