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

Unlock the full course today

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

Comparing two means: Independent samples t-test

Comparing two means: Independent samples t-test

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

Start my 1-month free trial

Comparing two means: Independent samples t-test

- [Instructor] Charles Baudelaire may have said that comparisons are odious, but comparisons are the stuff of science. And being able to compare the mean results between one group or condition and another group or condition is a staple of scientific research. The most common method for doing this is an independent samples t test. And this is a really simple thing to do here in R. What I'm going to do is I'm going to load a few packages, including the data sets package, 'cause that has a sample data set that I want to use. And we're going to get information on the sleep dataset. Now, the data set is called student's sleep date and student was the pen name of William Gosset, the developer of the t test. He worked for Guinness breweries, and they didn't want him publishing under his actual name, so he had to go to a pen name. And this is a very old article that looks at the effect of two different drugs on amount of sleep. In…

Contents