From the course: R Essential Training Part 2: Modeling Data

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Comparing paired means: Paired samples t-test

Comparing paired means: Paired samples t-test

From the course: R Essential Training Part 2: Modeling Data

Start my 1-month free trial

Comparing paired means: Paired samples t-test

- [Instructor] When you're trying to produce an effect in the real world, you have an intervention of some kind. It might involve creating an ad campaign for a company, it might involve having a special curriculum for a class, it might involve having a patient go on a particular medical regimen. Any one of these is designed to produce a change from how things were to beginning to how things were later on. A very common test in this situation is a paired samples t-test that looks at data for two paired samples, usually the same people at time one and time two. Let me show you how to do this in R. I'm going to load some packages, including one called GGally, because that gives me some extra plots that are done in a ggplot style fashion. Now what's a little unusual for this one, I'm not opening an existing data set, I'm creating some artificial data. But let's do this, let's assume that we are going to have company…

Contents