Chapter 3

Two-Sample Hypothesis Testing

IN THIS CHAPTER

Bullet Testing differences between means of two samples

Bullet Testing means of paired samples

Bullet Testing hypotheses about variances

Bullet Understanding F distributions

In a variety of fields, the need often arises to compare one sample with another. Sometimes the samples are independent and sometimes they’re matched in some way. Given that each sample comes from a separate population, the objective here is to decide whether these populations are different from one another.

Usually, this involves tests of hypotheses about population means. You can also test hypotheses about population variances. In this chapter, I show you how to carry out these tests, and how to use R to get the job done.

Hypotheses Built for Two

As in the one-sample case (see Chapter 2 of Book 3), hypothesis testing with two samples starts with a null hypothesis (H0) and an alternative hypothesis (H1). The null hypothesis specifies that any differences you see between the two samples are due strictly to chance. The alternative hypothesis says, in effect, that any differences ...

Get R All-in-One For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.