library(MASS)
set.seed(1)
ds <- mvrnorm(n=50, mu = c(50,55),
Sigma = matrix(c(100,0,0,81),
ncol = 2),
empirical = TRUE) |>
data.frame() |>
setNames(c("x1","x2"))
t.test(ds$x1, ds$x2)
tTest(x = ds$x1,
y = 55,
sdy = 9,
ny = 50)
Run the code above in your browser using DataLab