REGR_SXX
Description
Syntax
double regr_sxx(y, x)
x, y 支持基本数字类型
计算所有输入数据点与其线性回归拟合直线之间的横向离差平方和
EXAMPLE
我们有如下数据
mysql> select * from t;
+------+------+------+
| id | x | y |
+------+------+------+
| 2 | 14 | 27 |
| 4 | 10 | 20 |
| 3 | 5 | 7 |
| 1 | 18 | 13 |
+------+------+------+
mysql> select regr_sxx(y,x) from t;
+----------------+
| regr_sxx(y, x) |
+----------------+
| 92.75 |
+----------------+
KEYWORDS
REGR_SXX