Formula for the slope least square

The formula for the slope of the least squares regression line is calculated as:

b = Σ((x - x̄)(y - ȳ)) / Σ((x - x̄)2)

Where:
- b is the slope of the regression line
- x and y are the individual data points
- x̄ and ȳ are the means of the x and y values, respectively
- Σ denotes summing up all the values in the parentheses

This formula calculates the slope that minimizes the sum of the squared differences between the observed y values and the predicted y values.