Two-Sample t-Test

The two-sample t-test compares the means of two independent groups. It is the standard parametric alternative to a randomization test when normal-based modeling assumptions are acceptable.

The test statistic compares the observed difference in sample means to its estimated standard error.

R

t.test(yA, yB)

If equal variances are assumed, use

t.test(yA, yB, var.equal = TRUE)