Introduction to Linear Regression and Correlation
Linear regression is a statistical method used to model the relationship between a dependent variable $y$ (also called the response or outcome) and an independent variable $x$ (also called the predictor or explanatory variable). The goal is to find the best-fitting straight line that describes how $y$ changes as $x$ increases. This line is called the regression line. Linear regression is widely used in forecasting, trend analysis, machine learning, and experimental sciences to test hypotheses and predict future outcomes.
Correlation analysis is closely related to regression, but instead of finding a directional predictive line, it measures the strength and direction of the linear association between two variables. The standard metric for this is the Pearson Product-Moment Correlation Coefficient, denoted as $r$. The value of $r$ ranges from -1 to 1, where 1 indicates a perfect positive linear relationship, -1 indicates a perfect negative linear relationship, and 0 indicates no linear association.
This calculator performs a least-squares linear regression on your coordinates. By inputting comma-separated lists of X and Y values, the solver 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.