Function welchTTest

Two-sample T-test for difference in means. Does not assume variances are equal. Alteratives are Alt.less, meaning mean(sample1) - mean(sample2) < testMean, Alt.greater, meaning mean(sample1) - mean(sample2) > testMean, and Alt.twoSided, meaning mean(sample1) - mean(sample2) != testMean.

ConfInt welchTTest(T, U) (
  T sample1,
  U sample2,
  double testMean = 0,
  Alt alt = Alt.twoSided,
  double confLevel = 0.95
)
if ((isSummary!T || doubleIterable!T) && (isSummary!U || doubleIterable!U));

sample1 and sample2 may be either iterables with elements implicitly convertible to double or summary structs (see isSummary).

Returns

A ConfInt containing the T statistic, the P-value, and the boundaries of the confidence interval for the difference between means of sample1 and sample2 at the specified level.

References

http://en.wikipedia.org/wiki/Student%27s_t-test