This article introduces you to the SLOPE function, one of the statistical functions widely used in Excel.
Description: The function returns the slope of a linear regression line through data points. Slope is the vertical change divided by the horizontal change between any two points on that line, representing the rate of change along the regression line.
Syntax: SLOPE(known_y's, known_x's)
Here's what you need to know:
- known_y's: Array or range of independent data points.
- known_x's: Set of independent data points.
Note:
- The arguments must be numbers, names, arrays, or references containing numbers.
- If known_y's and known_x's are empty or contain a different number of data points -> the function returns the error value #N/A.
- If an argument is an array containing text or logical values -> these values are ignored, but the value 0 is still counted.
- If the arguments contain invalid data types -> the function returns the error value #VALUE!
- The slope equation for linear regression is:
b=∑(x−¯¯¯x
Where x and y represent the sample means AVERAGE(known_x’s) and AVERAGE(known_y’s) respectively.
Example:
Calculate the slope of the linear regression through the data points in the table below:
- In the cell where you want to calculate, enter the formula: =SLOPE(C6:C10,D6:D10)
- Press Enter -> the slope of the linear regression through the data points above is:
Here is a guide and some specific examples of using the SLOPE function in Excel.
Wishing you all the best of luck!