Hypothesis Tests
t.test compares means and returns a p value.
Example
a <- c(5.1, 4.9, 5.6, 5.8, 6.0, 5.5)
b <- c(4.5, 4.7, 5.0, 4.8, 5.1, 4.6)
r <- t.test(a, b)
print(round(r$statistic, 2))
print(r$p.value < 0.05)Exercise
Compare means.
.test(a, b)Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.