We can use the formula:
$$\text{slope} = \frac{n\sum xy - \sum x \sum y}{n\sum x^2 - (\sum x)^2}$$
where $n$ is the number of data points, $\sum xy$ is the sum of the products of x and y, $\sum x$ is the sum of x values, $\sum y$ is the sum of y values, and
Show more…