The Linear Regression Analyzer turns paired x and y data into the least-squares line of best fit, correlation r and R², with the scatter plot and trend line.
Enter matching lists of x and y values. The analyzer fits a straight line by least squares, reports how strong the relationship is, and plots the points with the trend line.
Start with the average of the x values and the average of the y values. The least-squares line always passes through this center point.
The slope is m = Σ(x − x̄)(y − ȳ) / Σ(x − x̄)², which is how much y changes on average for each one-unit step in x. The intercept is b = ȳ − m·x̄, giving the line y = mx + b with the smallest possible sum of squared vertical errors.
The correlation r runs from −1 to 1: its sign gives the direction and its size gives the strength of the straight-line relationship. R² = r² is the share of the variation in y that the line explains, so R² = 0.81 means 81%.