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
From the course: R Essential Training Part 2: Modeling Data
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…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
Comparing proportions8m 3s
-
Comparing one mean to a population: One-sample t-test6m 20s
-
Comparing paired means: Paired samples t-test9m 53s
-
Comparing two means: Independent samples t-test8m 30s
-
Comparing multiple means: One-factor analysis of variance11m 16s
-
Comparing means with multiple categorical predictors: Factorial analysis of variance8m 47s
-
-
-
-