The Least-squares Trend Line calculator computes the regression line, a linear equation, through a set of X and Y values. This is also known as simple linear regression. The Least-square Equation produces this linear equation in the form.
INSTRUCTIONS: Enter the following:
Least-squares Trend Line (Y = a + bX): The calculator computes the Least-square Trend Line, correlation coefficient (r) and supporting calculations:
If you want the find thethrough
The calculator will return "Y = 3.6 + 0.8X".
Theis in the following form:
y = a + bx
`b = ( (sum(XY) - (sumX * sumY)"/n")) / (sum(X^2) - (sumX)^2"/n") `
` a = MY - b*MX` MY is mean of Y. MX is mean of X.
To determine if there is a correlation between X and Y, the calculator computes the correlation coefficient (r). The range of r is -1 ≤ r ≤ 1, with the strongest correlations the further one gets from zero, either negative or positive. The formula for the correlation coefficient (r) is as follows:
`r = b * (sum(X^2)- sum(X)^2"/n")/(sum(Y^2)- sum(Y)^2"/n")`