17.3.2 Two-Sample T-Test


The independent two-sample t-test analysis tests whether or not the means of two independent samples from a normal distribution are equal or whether they differ by a given value, and creates a confidence interval for the difference of the sample means. The two samples are assumed to be independent and variances between two samples can be equal or unequal. Note that if the two samples are not independent and the sample sizes are equal, the two-sample t-test is inappropriate and you should use the paired-sample t-test instead.

The test can be either one-tailed or two-tailed. You can test if the sample mean difference is 1) greater than, 2) less than, or 3) different from the hypothetical value. The test statistic and p-value are calculated for determining whether to reject the null hypothesis. A p-value less than the significance level\alpha\,\!, indicates that you can reject the null hypothesis.

To estimate the difference between two population means, the sample mean difference with confidence intervals can be computed for each confidence level.

Power is the probability of correctly rejecting the null hypothesis. A power that is too low suggests that rejecting the null hypothesis is risky. Note, however, that an excessively high power would lead to a rejection of the hypothesis even with small differences between samples.

Handling Missing Values

The missing values in the data range will be excluded in the analysis

From Origin 2015, missing values in the grouping range and the corresponding data values will be excluded in analysis. In the previous version, missing values in the grouping range will be considered as a group.

Performing Two-Sample t-test

To perform a two-sample t-test:

  1. Select Statistics: Hypothesis Testing: Two-Sample t-Test. This opens the TwoSampletTest dialog, in which you first specify the Input Data Form (Indexed or Raw), then specify Input Data, the Test Mean and the Alternate Hypothesis.
  2. Upon clicking OK, an analysis report sheet is generated showing the degrees of freedom, t statistics, the associated p-value, and the test conclusion. In addition, you can produce confidence intervals for the sample means, histograms and box charts, and perform power analysis.

Topics covered in this section: