sports<-read.csv('sports.csv', header=T)
head(sports)
plot(acceptance~academic, data=sports, pch=21, col='slateblue', bg='lightslateblue',cex=1.5)
model<-lm(acceptance~academic, data=sports)
abline(model, col='magenta')
> model
Call:
lm(formula = acceptance ~ academic, data = sports)
Coefficients:
(Intercept) academic
26.046643 0.176062
> summary(model)
Call:
lm(formula = acceptance ~ academic, data = sports)
Residuals:
Min 1Q Median 3Q Max
-31.059192 -7.238970 -0.708391 7.655959 26.712477
Coefficients:
Estimate Std. Error t value
(Intercept) 26.04664277 1.69571459 15.3603
academic 0.17606163 0.00996521 17.6676
Pr(>|t|)
(Intercept) < 0.000000000000000222 ***
academic < 0.000000000000000222 ***
---
Signif. codes:
0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 12.0691 on 198 degrees of freedom
Multiple R-squared: 0.611875, Adjusted R-squared: 0.609915
F-statistic: 312.145 on 1 and 198 DF, p-value: < 0.000000000000000222
학과점수가 1점 오를 때 승인점수가 0.176점 늘어난다.
p-value: < 0.000000000000000222 이므로 위의 그래프는 통계적으로 유의미하다.