Statistical tests: Continuous data

This page contains general information for choosing commonly used statistical tests. The examples linked provide general guidance which should be used alongside the conventions of your subject area. Where possible, a brief explanation of the test is given with links to performing this test using Excel, SPSS and R. It is worth noting that the examples often contain information about interpreting the output and results so can act as a guide to interpreting statistical results too.

To navigate this table, consider the following questions:

  • Is your outcome variable continuous?
  • Does the data meet the requirements for a parametric test (e.g. normality)? Notice, that for each parametric test, where possible, a corresponding nonparametric test is presented.
  • How many samples (or groups) do you have?
  • Are the outcomes paired (or dependent)?

Parametric

1 SampleOne sample t test

If sigma is unknown, use a one sample t test to determine if the sample is likely to have come from a given population with a defined mean.

Example of one sample t test

Excel of one sample t test

SPSS one sample t test

R code of one sample t test

2 Samples

Paired

(or dependent, repeated measures)

Paired t test

The paired-samples t test is used when the data is from related, paired or longitudinal samples.

Example of Paired t test

Excel of Paired t test

SPSS of Paired t test

R of Paired t test

2 Samples

Unpaired

(or independent)

Unpaired t test.

An unpaired t test is used to assess if the mean values of two independent samples are equal. Firstly, you need to assess equality of variances using an F-test, details of which are given within the examples below.

Example of Unpaired t test

Excel (σ12)

Excel (σ1≠σ2)

SPSS of Unpaired t test

R of Unpaired t test

3+ Samples

Related (or dependent)

One-way repeated measures (within groups) ANOVA

One-way repeated measures analysis of variance (ANOVA) is a method for detecting differences between related mean values, it is an extension of the paired t test. A post-hoc test is needed to investigate where these differences might occur.

Example of One-way repeated measures

Excel of One-way repeated measures

SPSS of One-way repeated measures

R of One-way repeated measures

3+ Samples

Unrelated (or independent)

One-way (between groups) ANOVA

One-way analysis of variance (ANOVA) is a method for testing whether three or more populations have the same mean value and is an extension of the unpaired t test. A post-hoc test is needed to investigate where these differences might occur.

Example of One-way measures

Excel of One-way measures

SPSS of One-way measures

R of One-way measures

3+ Samples

Unrelated (or independent)

Two-way (between-groups) ANOVA

Two-way (or three-way analysis of variance) is used to explore if two or more factors can influence the dependent variable.

Example of Two-way measures

Excel of Two-way measures

SPSS of Two-way measures

R of Two-way measures

RelationshipPearson's Correlation

Pearson’s Product-Moment Correlation (r) is used to measure the strength and direction of the association between two variables. The value of Pearson’s r is between +1 and –1: where r = +1 is a perfect positive correlation, r = -1 a perfect negative correlation and r=0 indicates no correlation between the variables.

Example of Pearson's Correlation

Excel of Pearson's Correlation

SPSS of Pearson's Correlation

R of Pearson's Correlation


Nonparametric

1 SampleOne sample sign (or median) test

A one sample sign test is used to explore if the median of the sample data is equal to a given value.

Example of One sample sign test

Excel of One sample sign test

SPSS of One sample sign test

R of One sample sign test

2 Samples

Paired

(or dependent)

Wilcoxon signed rank test

The Wilcoxon signed ranks test is used to compare the medians of two related samples.

Example of Wilcoxon signed rank test

Excel of Wilcoxon signed rank test

SPSS of Wilcoxon signed rank test

R of Wilcoxon signed rank test

2 Samples

Unpaired

(or independent)

Mann-Whitney U test

The Mann-Whitney U test is used to compare the medians of two independent samples.


Example of Mann-Whitney U test

Excel of Mann-Whitney U test

 

SPSS of Mann-Whitney U test

R of Mann-Whitney U test

3+ Samples

Related (or dependent)

Friedman test

The Friedman test is designed to test whether three or more populations have the same median values, using data collected from related samples. It is the nonparametric equivalent of a simple repeated measures analysis of variance (ANOVA).


Example of Friedman test

Excel

SPSS of Friedman test

R of Friedman test

3+ Samples

Unrelated (or independent)

Kruskal-Wallis test (independent observations)

The Kruskal Wallis test tests whether three or more populations have the same median values. It is the nonparametric equivalent of a one-way analysis of variance (ANOVA).

Example of Kruskal-Wallis test

Excel of Kruskal-Wallis test

SPSS of Kruskal-Wallis test

R of Kruskal-Wallis test

 

 

 

 

 

 

 

RelationshipSpearman's Rank test

Spearman’s correlation coefficient rho (ρ) is calculated from the ranked data and is used to measure the correlation between two variables The value of Spearman’s rho is between +1 and –1: and the sign and value of ρ are interpreted in the same way as the more conventional correlation coefficient, r.

Example of Spearman's Rank test

Excel of Spearman's Rank test

SPSS of Spearman's Rank test

R of Spearman's Rank test