SLOPE function
Description
SLOPE(rangeX,rangeY) returns the slope of the regression line of rangeY (dependent data, Y) on rangeX (independent data, X).
The arguments rangeX and rangeY can be a list of numbers, cell addresses, cell ranges (such as A1:A10).
RangeX and rangeY can also be vectors (column or row matrices) with the same number of elements.
The equation for SLOPE b is:
$$ b = \frac{ \sum_{}^{}{(x-\bar{x})(y-\bar{y})}} {\sum_{}^{}{(x-\bar{x})^2}} $$
Note that in comparison with the corresponding Excel function, the order of the X and Y arguments is reversed.