Please enable JavaScript to view this site.

Difference between means

The unpaired t test compares the means of two groups. Note that this test is often called independent samples t test.

The most useful result is the confidence interval for the difference between the means. The point of the experiment was to see how far apart the two means are. The confidence interval tells you how precisely you know that difference. If the assumptions of the analysis are true, you can be 95% confident that the 95% confidence interval contains the true difference between the means.

For many purposes, this confidence interval is all you need. Note that you can change the sign of the differences in the Options tab of the t test dialog, where you can tell Prism to subtract column B from A, or A from B.

Prism also reports the difference between the two means with the standard error of that difference.

P value

The P value is used to ask whether the difference between the mean of two groups is likely to be due to chance. It answers this question:

If the two populations really had the same mean, what is the chance that random sampling would result in means as far apart (or more so) than observed in this experiment?

It is traditional, but not necessary and often not useful, to use the P value to make a simple statement about whether or not the difference is “statistically significant”.

You will interpret the results differently depending on whether the P value is small or large.

t ratio

To calculate a P value for an unpaired t test, Prism first computes a t ratio. The t ratio is the difference between sample means divided by the standard error of the difference, calculated by combining the SEMs of the two groups. If the difference is large compared to the SE of the difference, then the t ratio will be large (or a large negative number), and the P value is small. The sign of the t ratio indicates only which group had the larger mean. The P value is derived from the absolute value of t. Prism reports the t ratio so you can compare with other programs, or examples in text books. In most cases, you'll want to focus on the confidence interval and P value, and can safely ignore the value of the t ratio.

For the unpaired t test, the number of degrees of freedom (df) equals the total sample size minus 2. Welch's t test (a modification of the t test which doesn't assume equal variances) calculates df from a complicated equation.

F test for unequal variance

The unpaired t test depends on the assumption that the two samples come from populations that have identical standard deviations (and thus identical variances). Prism tests this assumption using an F test.

First compute the standard deviations of both groups, and square them both to obtain variances. The F ratio equals the larger variance divided by the smaller variance. So F is always greater than (or possibly equal to) 1.0.

The P value then asks:

If the two populations really had identical variances, what is the chance of obtaining an F ratio this big or bigger?

Don't mix up the P value testing for equality of the variances (standard deviations) of the groups with the P value testing for equality of the means. That latter P value is the one that answers the question you most likely were thinking about when you chose the t test.

What to do when the groups have different standard deviations?

R squared from unpaired t test

Prism, unlike most statistics programs, reports a R2 value as part of the unpaired t test results. It quantifies the fraction of all the variation in the samples that is accounted for by a difference between the group means. If R2=0.36, that means that 36% of all the variation among values is attributed to differences between the two group means, leaving 64% of the variation that comes from scatter among values within the groups.

If the two groups have the same mean, then none of the variation between values would be due to differences in group means so R2 would equal zero. If the difference between group means is huge compared to the scatter within the group, then almost all the variation among values would be due to group differences, and the R2 would be close to 1.0.

© 1995-2019 GraphPad Software, LLC. All rights reserved.