Sign test

This page offers all the basic information you need about the sign test. It is part of Statkat’s wiki module, containing similarly structured info pages for many different statistical methods. The info pages give information about null and alternative hypotheses, assumptions, test statistics and confidence intervals, how to find p values, SPSS how-to’s and more.

To compare the sign test with other statistical methods, go to Statkat's or practice with the sign test at Statkat's

Contents

When to use?

Deciding which statistical method to use to analyze your data can be a challenging task. Whether a statistical method is appropriate for your data is partly determined by the measurement level of your variables. The sign test requires the following variable types:

Variable types required for the sign test :
Independent variable:
2 paired groups
Dependent variable:
One of ordinal level

Note that theoretically, it is always possible to 'downgrade' the measurement level of a variable. For instance, a test that can be performed on a variable of ordinal measurement level can also be performed on a variable of interval measurement level, in which case the interval variable is downgraded to an ordinal variable. However, downgrading the measurement level of variables is generally a bad idea since it means you are throwing away important information in your data (an exception is the downgrade from ratio to interval level, which is generally irrelevant in data analysis).

If you are not sure which method you should use, you might like the assistance of our method selection tool or our method selection table.

Null hypothesis

The sign test tests the following null hypothesis (H0):

If the dependent variable is measured on a continuous scale, this can also be formulated as: A difference score is the difference between the first score of a pair and the second score of a pair.
Alternative hypothesis

The sign test tests the above null hypothesis against the following alternative hypothesis (H1 or Ha):

If the dependent variable is measured on a continuous scale, this can also be formulated as:
Assumptions

Statistical tests always make assumptions about the sampling procedure that was used to obtain the sample data. So called parametric tests also make assumptions about how data are distributed in the population. Non-parametric tests are more 'robust' and make no or less strict assumptions about population distributions, but are generally less powerful. Violation of assumptions may render the outcome of statistical tests useless, although violation of some assumptions (e.g. independence assumptions) are generally more problematic than violation of other assumptions (e.g. normality assumptions in combination with large samples).

The sign test makes the following assumptions:

Test statistic

The sign test is based on the following test statistic:

$W = $ number of difference scores that is larger than 0
Sampling distribution

Sampling distribution of $W$ if H0 were true:

The exact distribution of $W$ under the null hypothesis is the Binomial($n$, $P$) distribution, with $n =$ number of positive differences $+$ number of negative differences, and $P = 0.5$.

If $n$ is large, $W$ is approximately normally distributed under the null hypothesis, with mean $nP = n \times 0.5$ and standard deviation $\sqrt{nP(1-P)} = \sqrt{n \times 0.5(1 - 0.5)}$. Hence, if $n$ is large, the standardized test statistic $$z = \frac{W - n \times 0.5}{\sqrt{n \times 0.5(1 - 0.5)}}$$ follows approximately the standard normal distribution if the null hypothesis were true.
Significant?

This is how you find out if your test result is significant:

If $n$ is small, the table for the binomial distribution should be used:
Two sided: Right sided: Left sided:
If $n$ is large, the table for standard normal probabilities can be used:
Two sided: Right sided: Left sided:
Equivalent to

The sign test is equivalent to:

Two sided sign test is equivalent to
Example context

The sign test could for instance be used to answer the question:

Do people tend to score higher on mental health after a mindfulness course?
SPSS

How to perform the sign test in SPSS:

Analyze > Nonparametric Tests > Legacy Dialogs > 2 Related Samples...
Jamovi

How to perform the sign test in jamovi:

Jamovi does not have a specific option for the sign test. However, you can do the Friedman test instead. The $p$ value resulting from this Friedman test is equivalent to the two sided $p$ value that would have resulted from the sign test. Go to:

ANOVA > Repeated Measures ANOVA - Friedman