对应视频教程:ISLP【EP013】
Residual Sum of Squares, RSS 残差平方和
可以理解为实际结果和拟合结果之间的总平方差异。The total square discrepancy between the actual outcome and the fit.
,
Residual 残差:the discrepancy between the actual outcome and the fit(the predicted outcome)
the Least Square Approach 最小二乘法
the least square line即为令最小的一条线
slope 斜率; intercept 截距
Accessing the Accuracy of the coefficient Estimates (Confidence Intervals)
Standard Error of the slope and intercept
variance of the errors, noice variance
若需减少SE, 则需增加,这意味着x spread out
*SE的用处一:可用于计算confident intervals
3 sigma rules:
Hypothesis tests 假设检验
*SE的用处二:可用于perform hypothesis tests
null hypothesis:
: : x and y no relationship
: : x and y have some relationship
为了验证,我们计算t-statistic t统计量
----------斜率/标准误差
查表得到t-distribution t分布, (n-2)degree of freedom, assuming 。
p-value: the probability of observing any value to |t| or larger.
**selflearning addition
1. t检验:本质上是用于比较两组数据之间的差异显著程度,差异显著程度用t统计量来反映
2. t-statistic:也就是t统计量,是一个数值,用于反映两组数据之间的差异大小。t-statistic 服从t分布。
3. t分布是一种概率分布,用于表示在两个组无显著差异时t统计量的值,不同的自由度(样本大小)决定不同的t分布形状,因此需要查表来确定t-distribution
4. 在简单线性回归中,
此时,t检验用于检验回归系数是否显著,也就是用于判断hypothesis testing。
HT比较的是,H0: 无模型,用均值;Ha:有模型。二者之间的组间差异。
5. t-test的使用场景:
1)比较两个独立样本的平均值,判断是否显著不同。
2)配对样本t检验:比较相同个体在不同条件下的平均值。用于判断条件变化是否显著影响结果。
3)单样本t检验
单样本平均值与已知总体平均值之间的差异。
4)回归分析中的系数显著性检验
Simple LR: t检验,H0;Ha
Multiple LR:Backward Selection, 使用t检验来确定remove对象
6. 延申问题:比较多组数据的组间差异时,用什么方法?
ANOVA方差分析
Accessing the Overall Accuracy of the Model
RSE, Residual Standard Error
: fit model error
R-Square/fraction of variance
TSS, total sum of squares
: no model error (a slope=0 model)
=
r: correlation 线性相关系数 between x and y
,又称决定系数。表达自变量对因变量的解释能力
,分母为一定值
两变量强正相关;反之 强负相关。
两变量弱正相关; 反之。
|r|越大,拟合效果越好。
取值在0和1之间,越趋近于一,拟合效果越好。
拟合效果越好,也就意味着模型精度越高,几种表现:
残差小; |r|大; 趋近于一