AB or Hypothesis test comparing the mean of two samples (using R)
To compare means of two samples, we need to perform an independent samples t-test, more commonly called Student’s t-Test. To perform this test, we need to know some statistics about the samples: each sample’s mean (x̄), standard deviation (s), and sample size (n). Here is an example: There is data contained in a table of two columns. Column 1 is called ‘category’ and Column 2 is called ‘length.’ The category column contains two options, a and b, while the length column contains lengths in R type num. We want to find out if the mean length of the a values are different than the mean length of the b values. The data looks something like this. The hypothesis statements look like this: ...