CHAPTER 9

image

Performing t Tests

We use t tests to compare means. You have already seen that the t.test function can be used to display confidence intervals for means and differences between means. The t.test function in R is used for all three kinds of t tests: one-sample, paired-samples, and two-sample t tests.

In general, we calculate a mean difference and divide that by the standard error of the mean difference. Although we can conceivably perform one-sample, paired-samples, and two-sample z tests, and these are taught in some statistics classes and texts, for the reasons we have discussed repeatedly, the t tests work better than the z tests ...

Get Beginning R: An Introduction to Statistical Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.