Bai 1: Thuc hanh hoi quy don

Nhap du lieu (nhan to hop command + option + I)

ct <- c(1,2,3,4,5)
tn <- c(3,4,5,6,7)
reg <- lm(ct ~ tn)
summary(reg)
## Warning in summary.lm(reg): essentially perfect fit: summary may be unreliable
## 
## Call:
## lm(formula = ct ~ tn)
## 
## Residuals:
##          1          2          3          4          5 
##  1.842e-16 -3.291e-16  1.420e-16 -3.347e-17  3.639e-17 
## 
## Coefficients:
##               Estimate Std. Error    t value Pr(>|t|)    
## (Intercept) -2.000e+00  3.852e-16 -5.193e+15   <2e-16 ***
## tn           1.000e+00  7.412e-17  1.349e+16   <2e-16 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.344e-16 on 3 degrees of freedom
## Multiple R-squared:      1,  Adjusted R-squared:      1 
## F-statistic: 1.82e+32 on 1 and 3 DF,  p-value: < 2.2e-16