custom_seed(123) X <- runif(100, 900, 1000) Y <- 3*X+rnorm(100, 0, 100) # compute the variance of X # compute the covariance of X and Y # compute the correlation between X and Y # compute the variance of X with cov() cov(X, X) # compute the covariance of X and Y cov(X, Y) # compute the correlation between X and Y cor(X, Y) test_function_result("cov", index = 1) test_output_contains("cov(X,Y)") test_output_contains("cov(X,Y)/(sd(X)*sd(Y))")