cara membuat data dalam bentuk vektor.
#create simple data
X <- c(15, 17, 19, 20, 22, 41, 25, 50)
Y <- c(150, 200, 235, 220, 300, 310, 400)
#ptint sample
X Y
# simple Linear Regression
Y = a + bx
Y = 170 + 17X
## scatter plot
``` r
plot(Y - X, ylab="Y" , pch=20 )
## Warning in Y - X: longer object length is not a multiple of shorter object
## length
#systematic Relationsihp to the plot
abline(a =310, b=-40)