Session Ready
Exercise

The working memory dataset

In the following exercises, you will conduct a dependent (or paired) t-test on the "working memory" dataset. This dataset consists of the intelligence scores for subjects before and after training, as well as for a control group. Our goal is to assess whether intelligence training results in significantly different intelligence scores for the individuals.

The observations of individuals before and after training are two samples from the same group at different points in time, which calls for a dependent t-test. This will test whether or not the difference in mean intelligence scores before and after training are significant.

The working memory dataset has been loaded into your workspace as the object wm. It contains the data for both the group who received training and the group who did not.

Instructions
100 XP
  • Print wm to the console to get a feel for the data
  • Create a subset of wm that includes only the training group and store the result in wm_t. A value of 1 in the train column indicates that a subject received training, while a value of 0 indicates that they did not.
  • View summary statistics for wm_t with the describe() function.
  • Use the boxplot() function to create a boxplot of the pre and post column of wm_t. Give the x-axis the label "Pre- and Post-Training" and the y-axis the label "Intelligence Score".