24 votes
Accepted

Non-parametric test if two samples are drawn from the same distribution

The Kolmogorov-Smirnov test is the most common way to do this, but there are also some other options. The tests are based on the empirical cumulative distribution functions. The basic procedure is: ...
Will's user avatar
  • 1,068
14 votes
Accepted

When should I use `scipy.stats.wilcoxon` instead of `scipy.stats.ranksums`?

Frank Wilcoxon's 1945 paper [1] described two tests -- for "Unpaired Experiments" and "Paired Comparisons" which have come to be called the (Wilcoxon) rank sum test and the (Wilcoxon) signed rank test ...
Glen_b's user avatar
  • 278k
13 votes
Accepted

Paired t-test with multiple observations per pair

Averaging the data will result in a loss information and statistical power, so it is best avoided. Since you have repeated measures for websites, you can account the differences between websites (or ...
Robert Long's user avatar
  • 56.7k
13 votes
Accepted

If the difference of scores is normally distributed, the sample distributions don't matter in a paired t-test, right?

You are correct. A paired t-test is conducted on the differences of the paired scores. It doesn't look at the individual scores in any way. A paired t-test is precisely the same as a one-sample t-test ...
Sal Mangiafico's user avatar
11 votes

Wilcoxon signed rank test – critical value for n>50

The Wilcoxon signed rank test has a null distribution that rapidly approaches a normal distribution. The tables tend to stop by n=50 because the normal approximation is excellent well before that ...
Glen_b's user avatar
  • 278k
10 votes
Accepted

How to choose between sign test and Wilcoxon signed-rank test?

I am trying to pick one from these two tests to analyze paired data. Does anyone know any rules of thumb about which one to pick in general? The signed rank test carries an assumption about symmetry ...
Glen_b's user avatar
  • 278k
9 votes
Accepted

Wilcoxon Signed Rank Symmetry Assumption

Although on the surface the two statements above may appear contradictory, they aren't. The Wilcoxon Signed Rank test does require that the paired differences come from a continuous symmetric ...
jbowman's user avatar
  • 37.7k
9 votes
Accepted

Wilcoxon signed-rank test null hypothesis statement

This answer has been revised after being accepted, as I did not adequately appreciate Wilcoxon's critique of the sign test to extend the null hypothesis. I address the difference between the revised ...
Alexis's user avatar
  • 29.2k
8 votes

Same p-value. Is it normal?

Wilcoxon signed-rank test just takes in account the signs of the differences of values of every pair of data, and it doesn't take in account how large is such a difference. Therefore, the only thing ...
Pere's user avatar
  • 6,223
8 votes

Wilcoxon Signed Rank Symmetry Assumption

Note that the samples may tell you nothing about the suitability of the assumption that is required for the null. If the null is false, you don't necessarily require symmetry (and it's easy to ...
Glen_b's user avatar
  • 278k
8 votes

Questions about Wilcoxon signed rank test

An excellent question. As @Glen_b implied, the signed rank test, unlike the Wilcoxon unpaired 2-sample test, is metric-dependent. A better test is the Kornbrot rank difference test discussed here. ...
Frank Harrell's user avatar
7 votes

How to perform a Wilcoxon signed rank test for survival data in R?

To answer your question on how to calculate this in R, you can use the comp() function from the survMisc package. Example: <...
Karl Ove Hufthammer's user avatar
7 votes
Accepted

Wilcoxon signed-rank test in R

R reports the V-statistic, which is the sum of the positive ranks. The Wikipedia example computes it slightly differently, as the sum of all ranks, regardless of sign. In other words, both versions ...
jdobres's user avatar
  • 370
7 votes

Statistically Comparing the Similarity Between Lists (e.g Food Preferences)

Rearranging the data so the foods are in the same order (John's), I got the following vectors, each of 12-counts (you should proofread them): ...
BruceET's user avatar
  • 55.1k
7 votes

Creating a reference group to have equal sample sizes for Wilcoxon signed rank test

The Wilcoxon signed-rank test, made almost obsolete by the rank difference test is only for naturally paired data. You do not have paired data but rather data more suitable for the Wilcoxon Mann-...
Frank Harrell's user avatar
7 votes

Questions about Wilcoxon signed rank test

A signed rank test relies on taking pair differences. Consequently you're asserting that the difference between a 1 and a 3 on a corresponding pair of Likert item is the same as the difference ...
Glen_b's user avatar
  • 278k
6 votes

Effect size to Wilcoxon signed rank test?

If you don't have ties, I would report the proportion of after values that are less than the corresponding before values. If you do have ties, you could report the proportion of after values that ...
gung - Reinstate Monica's user avatar
6 votes
Accepted

normality for extremely small sample N=5

You can't make much of a distributional assessment at n=5 -- you can (sometimes) see non-normality at n=5 -- but at such small sample sizes the non-normality has to be quite strong to have a good ...
Glen_b's user avatar
  • 278k
6 votes
Accepted

Wilcoxon signed rank test fails for small sample size

The Wilcoxon sign-rank test is a nonparametric test for difference in ranked differences between two groups. Let's take that apart: Wilcoxon: He gets the credit for developing this test. sign-rank: ...
Alexis's user avatar
  • 29.2k
6 votes
Accepted

Variance of Wilcoxon Signed-Rank Statistic

Suppose we take two measurements for each of the $n$ subjects, where each subject is independent of one another. Let $X_i$ and $Y_i$ denote these measurements for $i=1, \cdots, n$. Let $Z_i = Y_i - ...
user277126's user avatar
  • 1,340
6 votes
Accepted

Why is the null hypothesis for Wilcoxon test not rejected if the sample size is 5?

I'll write "differences" when describing the observed values (as if it were a paired test), but for a one-sample test just read 'difference' as 'observation' or 'value'. The possible values ...
Glen_b's user avatar
  • 278k
6 votes
Accepted

What exactly does the “symmetric distribution” assumption of the Wilcoxon signed-rank test refer to?

What does a symmetric distribution here exactly refer A symmetric distribution has a probability density or mass distribution for which a reflection through a line leaves the distribution unchanged. ...
Sextus Empiricus's user avatar
6 votes
Accepted

Calculation of standard deviation of the mean changes from the p-value or z-value of the Wilcoxon test

Without additional information, it's not possible. Imagine a set of paired pre- and post- values with some particular $Z_S=\frac{S-\mu_S}{\sigma_S}$ where $S$ is whichever version of the signed rank ...
Glen_b's user avatar
  • 278k
5 votes

Wilcoxon test for sample n=3

Well, I can answer part of the question: The Wilcoxon rank sum test (Mann Whitney U) works for a comparison of $n_1=3$ vs $n_2=3$ just fine. However for a two-tailed test you can't reasonably set ...
Glen_b's user avatar
  • 278k
5 votes

Wilcoxon signed-rank test in R

Stumbled upon this and found it incredibly useful as well as the other CrossValidated post mentioned by @jdobres. Just to expand a little on the answer above which is correct but in hopes that it ...
Chuck P's user avatar
  • 206
5 votes
Accepted

What differentiates the wilcoxon test from t test regarding ordinal variables?

The short answer is that you can always use either test in place of the other--but typically they will produce different results. That demonstrates the issue is not one of applicability, but ...
whuber's user avatar
  • 316k
5 votes

What is the distribution of the Wilcoxon signed-ranked test statistic?

I'll give an outline of what's involved. Let's look at the original (no ties) case. Note that a specific rank either contributes $R_k$ or $-R_k$ to the sum (with sign chosen randomly under the null). ...
Glen_b's user avatar
  • 278k
5 votes

Effect size for Wilcoxon signed rank test that incorporates the possible range of the attribute

The effect size statistic Z/sqrt(N) --- sometimes called r --- in the paired observations case, is related to the probability that one group is larger than the other, or if you'd rather, that the ...
Sal Mangiafico's user avatar
5 votes

How to deal with ties when conducting Wilcoxon signed rank test?

There are two obstacles to doing a Wilcoxon signed-rank test: (a) You have only 13 non-zero differences among 21. The 0 differences provide no evidence that Q1 and Q2 differ. You may hate to 'discard' ...
BruceET's user avatar
  • 55.1k
5 votes

How to graph Wilcoxon test power R

In cases where you don't know a way to compute power algebraically, you can use simulation. (That's how the power curves were obtained in the plot you show.) To compute a single point on the power ...
Glen_b's user avatar
  • 278k

Only top scored, non community-wiki answers of a minimum length are eligible