Overview

Use a t test to check whether a sample mean differs from a value you expect, or whether two samples have different means — for example, comparing measurements from a treated and an untreated group, or before and after on the same subjects.

In a two-sample t test, statistiXL by default first checks whether the two variances differ with an F test, and uses a pooled variance when they don’t. You can also choose to assume equal or unequal variances, and set the alpha level for the F test.

For three or more groups, use analysis of variance instead of repeated t tests. The nonparametric equivalent of the paired t test is the Wilcoxon paired-sample test.

Two overlapping bell-shaped curves labelled Sample 1 and Sample 2, plotting the number of observations against the dependent variable.
Distributions from two samples.

Methods

  • Single-sample t test
  • Two-sample t test
  • Paired t test
  • One- and two-tailed tests against a hypothesised difference
  • Variance ratio (F) test for equal variances
  • Single-sample multivariate (Hotelling's T²) test
  • Two-sample multivariate (Hotelling's T²) test

Running the analysis

Click t Tests on the statistiXL ribbon and choose One Sample, Two Sample, Multivariate One Sample or Multivariate Two Sample. In the dialog, select your input ranges and output location, and set any options. For a paired test, use Two Sample and tick Datasets are Paired.

The t Tests button on the statistiXL ribbon with its menu open, listing One Sample, Two Sample (highlighted), Multivariate One Sample and Multivariate Two Sample.
The t Tests menu on the statistiXL ribbon.
The two-sample t test dialog, with boxes for the two data ranges, options for paired datasets and labels in the first row, an output range and descriptive statistics, and the QuickHelp pane on the right.
The two-sample t test dialog, with QuickHelp on the right.

What the output includes

  • Descriptive statistics for each sample (optional)
  • Hypothesised and observed means, and the standard error
  • t value, degrees of freedom and P value
  • The variance ratio (F) test, for two-sample tests
  • T² and F statistics, for multivariate tests
Paired t test output in Excel. Descriptive statistics for Hindleg and Foreleg (mean, standard deviation, standard error and 95% confidence limits, 10 values each), then a two-tailed test with a mean difference of 3.300, t of 3.414, 9 degrees of freedom and P of 0.008.
Output from a paired t test.