Back to Course

0% Complete
0/0 Steps
In Progress
Lesson 3 of 20
In Progress

# Independent t-test

1. Perform an independent samples t-test to test whether there is a difference in `exam_1` by `athlete`. Use `var.equal = TRUE`. Is there a difference? What is the p-value?
2. Perform an independent samples t-test to test whether there is a difference in `act_english` by `gender`. Use `var.equal = TRUE`. Is there a difference? What is the p-value?
Notice what happens since gender has 3 levels. Try out using the `filter()` function from `dplyr` to only check the difference between Female and Male students. Alternatively, check out the page on `t_test()` to see how to use the `comparisons` argument to specify the groups to compare.
We are using the `rstatix` package for the `t_test()` function (and other functions in later lessons). We use this package because it is tidyverse-friendly while some base R functions for inferential statistics are not. If you did want to use the base R equivalent function for a t-test, it is `t.test()`.