Introduction to Linear Regression and Correlation
Linear regression is a statistical method used to model the relationship between a dependent variable y (the response) and an independent variable x (the predictor). The goal is to find the best-fitting straight line describing how y changes as x increases — the regression line. It's widely used in forecasting, trend analysis, and experimental sciences.
Correlation analysis is closely related but measures the strength and direction of the linear association between two variables rather than a directional predictive line. The standard metric is the Pearson product-moment correlation coefficient r, which ranges from -1 to 1: 1 indicates a perfect positive linear relationship, -1 a perfect negative one, and 0 no linear association.
This calculator performs least-squares linear regression on your coordinates. Enter comma-separated lists of X and Y values, and it calculates the regression slope m, the y-intercept b, Pearson's r, and the coefficient of determination R^2, alongside a scatter plot showing the data points and the fitted trendline.