Fit a least-squares line y = mx + b to paired data and report slope, intercept and R².
Simple linear regression finds the best-fit line y = mx + b that minimises the sum of squared residuals. The slope m is the change in y per unit change in x, and R² indicates what fraction of y's variance is explained by x.
Slope
m = Σ(xᵢ−x̄)(yᵢ−ȳ) / Σ(xᵢ−x̄)²
Intercept
b = ȳ − m×x̄
It means all data points lie exactly on the line — x perfectly predicts y with no residual error.
Yes. A negative slope means y decreases as x increases, indicating a negative linear relationship.