如何计算Linear Regression
learn.whatIsHeading
The slope and intercept of a linear regression line (ŷ = mx + b) describe the best-fit straight line through a scatter of data points, minimising the sum of squared vertical residuals (OLS).
分步指南
- 1m = Σ(xi−x̄)(yi−ȳ) / Σ(xi−x̄)²
- 2b = ȳ − m × x̄
- 3Slope m has units of y/x
- 4Use for prediction: plug x into equation to get ŷ
例题解析
输入
Height vs weight → slope = 0.65 kg/cm
结果
Each cm of height adds 0.65 kg to predicted weight
Slope interpretation depends on units
准备好计算了吗?尝试免费的 Linear Regression 计算器
自己尝试一下 →