目录
3.2 Inference for linear regression
Slope的置信区间 Confidence interval
-
Module 3
-
3.1 Outliers
-
定义:
- Points that fall away from the cloud of points
-
两种类型:
- Leverage points: 这种是水平远离大部分点,所以不太影响slope
- influential points: 基本上都是在很高的地方,会影响斜率
-
-
3.2 Inference for linear regression
-
Slope的假设检验 hypotheses
- explanatory variable is not a significant predictor of response variable; no relationship; slope of the relationship is 0 (H0总是什么都不发生的情况)
- 与上面相反 (HA是发生了什么的情况)
-
假设检验用的系数是T statistic
-
- 为什么df=n-2?因为估算了两个参数β0和β1,每估算一个就要减去1。
-
-
Slope的置信区间 Confidence interval
-
置信区间的意义:
- 以95%为例解释(0.7,1.1)
- 我们有95%的把握,explanatory variable每增加1点,response variable会预计平均增加0.7到1.1点(expected on average to be higher)
- 以95%为例解释(0.7,1.1)
- Point estimate +- margin of error:
- 使用R求t*:我们求df=25时95%CI的t score,0.025是因为(1-0.95)/2
-
qt(0.025, df = 25)
-
-
-
-
3.3 Variability Partitioning
-
Analysis of Variance (ANOVA)
-
计算R^2的两种方法
- 直接算R^2
- SSreg / SStotal
-
-