Quantcast

least-squares trend line

vCalc Reviewed
Last modified by
on
Jun 13, 2024, 11:44:36 AM
Created by
on
Feb 10, 2017, 3:21:13 PM
`y = a + bx`
`(XY)"Table of X,Y Pairs"`
`(OC)"Output Choice (Trend Line or DETAILS)"`

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 y = a + bx.

INSTRUCTIONS: Enter the following:

  • (X,Y)  Tabular Data of X,Y pairs (see Example right)
  • (OC) Output Choice (Trend Line, Details)

Least-squares Trend Line (Y = a + bX): The calculator computes the Least-square Trend Line, correlation coefficient (r) and supporting calculation details:

  • (n) Number of Pairs
  • (MX) Mean of X values
  • (MY) Mean of Y values
  • (ΣX) Sum of X values
  • (ΣY) Sum of  Y values
  • (ΣXY) Sum of X⋅Y values
  • (ΣX2) Sum of X2 values
  • (ΣY2) Sum of Y2 values

Example in Graphic

If you want the find the least squares trend line through 

INPUTS

1,5
2,4
3,6
4,8
5,7

The calculator will return "Y = 3.6 + 0.8X".

The Math / Science

The formula for the least-squared regression line is in the following form:

y = a + bx

             where:

                          `b = (  (sum(XY) - (sumX * sumY)"/n")) / (sum(X^2) - (sumX)^2"/n") `
             and
                            ` a = MY - b*MX`           MY is mean of Y.  MX is mean of X.

Correlation

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")`


Linear Equations


Statistics Calculators

References

  •  Dowdy, Shirley, and Stanley Wearden. Statistics for Research. N.p.: John Wiley & Sons, n.d. Print.(Chapter 9 Distributions of Paired Variables)

This equation, least-squares trend line, is used in 6 pages
  • Comments
  • Attachments
  • Stats
No comments
This site uses cookies to give you the best, most relevant experience. By continuing to browse the site you are agreeing to our use of cookies.