决定系数 R² 计算器

Coefficient of Determination (R-squared) Calculator

Enter the correlation coefficient r to compute the coefficient of determination R-squared, the share of variance in the dependent variable explained by a regression model.

📐 计算公式
决定系数 R² = r × r(r 为相关系数);联动卡:未解释变异比例 = 1 − R²、决定优势比 = R² ÷ max(1−R², 10⁻⁹)、解释力 = R² × 100%、方差膨胀因子 VIF = 1 ÷ max(1 − min(R², 0.999999), 10⁻⁹)。校验:无强校验,非数输入按 0 参与计算。判据:|r| 越接近 1 解释力越强,未解释变异与 R² 之和恒为 1,VIF 随 R² 趋近 1 急剧增大。

输入相关系数 r,求决定系数 R²。

Formula & Standard References

Item Formula / Note Source / Standard
Coefficient of determination R-squared = r^2, the proportion of total variation explained (simple linear case) Wright S. (1921), Correlation and causation, J. Agricultural Research 20
Pearson correlation coefficient r = sum(x_i - xbar)(y_i - ybar) / sqrt( sum(x_i - xbar)^2 · sum(y_i - ybar)^2 ) Pearson K. (1895), Notes on regression and inheritance in the case of two parents
Range 0 <= R-squared <= 1; closer to 1 indicates a better fit NIST/SEMATECH e-Handbook of Statistical Methods §1.3.5.3
Adjusted R-squared R-squared_adj = 1 - (1 - R-squared)(n - 1)/(n - k - 1), k = number of predictors Draper NR, Smith H, Applied Regression Analysis (3rd ed.), Wiley
📌 计算说明
  • R² 表示被解释的变异比例。
  • 0.8² → 0.64。

📚 深度解析:决定系数 R²

💡 常见使用场景

回归解释力
r=0.757 → R²=0.757²≈0.573,即约 57.3% 的 y 变异可由 x 线性解释,余下为残差。
强拟合
r=0.95:R²=0.9025,90% 变异被解释,拟合优良。

❓ 常见问题(FAQ)

R² 越大越好?
训练集上 R² 随变量增多而增(即使无意义),需看调整 R² 或交叉验证防过拟合。
R² 为负?
模型比"均值预测"还差时 R² 可为负,说明模型无效。