Professional Documents
Culture Documents
Lecture6 Simple and Regression
Lecture6 Simple and Regression
cor(mtcars$mpg, mtcars$disp)
plot(mtcars$mpg,mtcars$disp)
Regression1
Y=a+bX
Regression2
cor(women$height,women$weight)
plot(women$height,women$weight)
Regression3=lm(women$weight~women$height)
Regression3
y=a+bx
weight=-87.52+3.45(height)
summary(Regression3)
Regression4
Y=a+b1x1+b2x2+b3x3+b4x4.....bnXn
mpg=16.53357+0.00872*disp-0.02060*hp+2.01577*drat-4.38546*wt+0.64015*qsec
summary(Regression4)