31
loading...
This website collects cookies to deliver better user experience
x
and y
. y=c(100,94,150,160,180)
x =c(23,21,32,40,45)
cor(x,y)
> y=c(100,94,150,160,180)
> x =c(23,21,32,40,45)
> cor(x,y)
[1] 0.978522
y=c(100,94,150,160,180,80)
x =c(23,21,32,40,45, 10)
cor(x,y)
> y=c(100,94,150,160,180,80)
> x =c(23,21,32,40,45, 10)
> cor(x,y)
[1] 0.972529
lm()
function.y=c(100,94,150,160,180,80)
x =c(23,21,32,40,45, 10)
lm(y ~ x)
> y=c(100,94,150,160,180,80)
> x =c(23,21,32,40,45, 10)
> lm(y ~ x)
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
39.693 3.075
y=c(100,94,150,160,180)
x =c(23,21,32,40,45)
lm(y ~ x)
> y=c(100,94,150,160,180)
> x =c(23,21,32,40,45)
> lm(y ~ x)
Call:
lm(formula = y ~ x)
Coefficients:
(Intercept) x
22.071 3.563
x=20
Y=3.075*x+39.693
print(Y)
> x=20
> Y=3.075*x+39.693
> print(Y)
[1] 101.193
Y=200
x=(Y-39.693)/3.075
print(x)
> Y=200
> x=(Y-39.693)/3.075
> print(x)
[1] 52.13236
07045225718
or 09153036869
it is still your guy Maxwizard. Enjoy coding!31