Skip to main content
25 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,078
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
  • 286k
14 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
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
  • 63.8k
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
  • 286k
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
  • 40.4k
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
  • 30.3k
9 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
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,643
8 votes

z score on Wilcoxon signed ranks test?

Given the number of elements in your samples (and the number of ties in them), you can transform one (the test stat, say in your case the $V$ stat though as I show below, this will also work for the $...
user603's user avatar
  • 22.9k
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
  • 286k
8 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
  • 286k
8 votes

Can Wilcoxon be used in large sample with non-normal distribution?

I would not call n=37 large (!). Yes, you can use a Wilcoxon signed rank test, but there are some substantial caveats. It's not suitable for all situations. Then again, the t-test might not be either. ...
Glen_b's user avatar
  • 286k
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
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
  • 30.3k
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
  • 57k
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
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
  • 286k
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
  • 286k
6 votes

z score on Wilcoxon signed ranks test?

See Section 7.2 of BBR which discusses a simple, accurate $z$ test statistic for the Wilcoxon signed-rank test. $z$ equals the sum of signed ranks divided by the square root of the sum of their ...
Frank Harrell's user avatar
6 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
  • 57k
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,350
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
  • 286k
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

what is the meaning of “One-sample test.”?The following is clearly a two-sample test for wilcox.test

I'm not entirely sure what led you to that conclusion. The $x$ and $y$ variables are supposed to represent scores for the same group tested multiple times (admittedly, the label should be something ...
Shawn Hemelstrand's user avatar
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
  • 328k
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
  • 286k
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

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