The OLS formula
Summary
- Given data and , we can add a linear trendline to the scatterplot of the points .
- The equation of a linear trendline is given by
- We say that we use the OLS (Ordinary Least Squares) formula if we calculate the intercept and the slope using the following formulas:
- The linear trendline calculated using the OLS formula is called the OLS trendline .
- OLS in Excel: Linest(ydata,xdata,constant,statistics)