Wilcoxon signed - rank test - wikipedia Wilcoxon signed - rank test The Wilcoxon signed - rank test is a non-parametric statistical hypothesis test used to compare two related samples, matched samples, or repeated measurements on a single sample to assess whether their population mean ranks differ ( i.e. it is a paired difference test ). It can be used as an alternative to the paired Student 's t - test, t - test for matched pairs, or the t - test for dependent samples when the population can not be assumed to be normally distributed. A Wilcoxon signed - rank test is a nonparametric test that can be used to determine whether two dependent samples were selected from populations having the same distribution. Contents 1 History 2 Assumptions 3 Test procedure 3.1 Original test 3.2 Example 4 Limitation 5 Effect size 6 Implementations 7 See also 8 References 9 External links History The test is named for Frank Wilcoxon ( 1892 -- 1965 ) who, in a single paper, proposed both it and the rank - sum test for two independent samples ( Wilcoxon, 1945 ). The test was popularized by Sidney Siegel ( 1956 ) in his influential textbook on non-parametric statistics. Siegel used the symbol T for a value related to, but not the same as, W ( displaystyle W ). In consequence, the test is sometimes referred to as the Wilcoxon T test, and the test statistic is reported as a value of T. Assumptions Data are paired and come from the same population. Each pair is chosen randomly and independently. The data are measured on at least an interval scale when, as is usual, within - pair differences are calculated to perform the test ( though it does suffice that within - pair comparisons are on an ordinal scale ). Test procedure Let N ( displaystyle N ) be the sample size, i.e., the number of pairs. Thus, there are a total of 2N data points. For pairs i = 1,..., N ( displaystyle i = 1,..., N ), let x 1, i ( displaystyle x_ ( 1, i ) ) and x 2, i ( displaystyle x_ ( 2, i ) ) denote the measurements. H : difference between the pairs follows a symmetric distribution around zero H : difference between the pairs does not follow a symmetric distribution around zero. For i = 1,..., N ( displaystyle i = 1,..., N ), calculate x 2, i − x 1, i ( displaystyle x_ ( 2, i ) - x_ ( 1, i ) ) and sgn ⁡ ( x 2, i − x 1, i ) ( displaystyle operatorname ( sgn ) ( x_ ( 2, i ) - x_ ( 1, i ) ) ), where sgn ( displaystyle operatorname ( sgn ) ) is the sign function. Exclude pairs with x 2, i − x 1, i = 0 ( displaystyle x_ ( 2, i ) - x_ ( 1, i ) = 0 ). Let N r ( displaystyle N_ ( r ) ) be the reduced sample size. Order the remaining N r ( displaystyle N_ ( r ) ) pairs from smallest absolute difference to largest absolute difference, x 2, i − x 1, i ( displaystyle x_ ( 2, i ) - x_ ( 1, i ) ). Rank the pairs, starting with the smallest as 1. Ties receive a rank equal to the average of the ranks they span. Let R i ( displaystyle R_ ( i ) ) denote the rank. Calculate the test statistic W ( displaystyle W ) W = ∑ i = 1 N r ( sgn ⁡ ( x 2, i − x 1, i ) ⋅ R i ) ( displaystyle W = sum _ ( i = 1 ) ^ ( N_ ( r ) ) ( operatorname ( sgn ) ( x_ ( 2, i ) - x_ ( 1, i ) ) cdot R_ ( i ) ) ), the sum of the signed ranks. Under null hypothesis, W ( displaystyle W ) follows a specific distribution with no simple expression. This distribution has an expected value of 0 and a variance of N r ( N r + 1 ) ( 2 N r + 1 ) 6 ( displaystyle ( \frac ( N_ ( r ) ( N_ ( r ) + 1 ) ( 2N_ ( r ) + 1 ) ) ( 6 ) ) ). W ( displaystyle W ) can be compared to a critical value from a reference table. The two - sided test consists in rejecting H 0 ( displaystyle H_ ( 0 ) ) if W > W c r i t i c a l, N r ( displaystyle W > W_ ( critical, N_ ( r ) ) ). As N r ( displaystyle N_ ( r ) ) increases, the sampling distribution of W ( displaystyle W ) converges to a normal distribution. Thus, For N r ≥ 10 ( displaystyle N_ ( r ) geq 10 ), a z - score can be calculated as z = W σ W, σ W = N r ( N r + 1 ) ( 2 N r + 1 ) 6 ( displaystyle z = ( \frac ( W ) ( sigma _ ( W ) ) ), sigma _ ( W ) = ( sqrt ( \frac ( N_ ( r ) ( N_ ( r ) + 1 ) ( 2N_ ( r ) + 1 ) ) ( 6 ) ) ) ). To perform a two - sided test, reject H 0 ( displaystyle H_ ( 0 ) ) if z > z c r i t i c a l ( displaystyle z > z_ ( critical ) ). Alternatively, one - sided tests can be performed with either the exact or the approximative distribution. p - values can also be calculated. Original test The original Wilcoxon 's proposal used a different statistic. Denoted by Siegel as the T statistic, it is the smaller of the two sums of ranks of given sign ; in the example given below, therefore, T would equal 3 + 4 + 5 + 6 = 18. Low values of T are required for significance. As will be obvious from the example below, T is easier to calculate by hand than W and the test is equivalent to the two - sided test described above ; however, the distribution of the statistic under H 0 ( displaystyle H_ ( 0 ) ) has to be adjusted. Example i ( displaystyle i ) x 2, i ( displaystyle x_ ( 2, i ) ) x 1, i ( displaystyle x_ ( 1, i ) ) x 2, i − x 1, i ( displaystyle x_ ( 2, i ) - x_ ( 1, i ) ) sgn ( displaystyle operatorname ( sgn ) ) abs ( displaystyle ( \text ( abs ) ) ) 125 110 15 115 122 -- 1 7 130 125 5 140 120 20 5 140 140 0 6 115 124 -- 1 9 7 140 123 17 8 125 137 -- 1 12 9 140 135 5 10 135 145 -- 1 10 order by absolute difference i ( displaystyle i ) x 2, i ( displaystyle x_ ( 2, i ) ) x 1, i ( displaystyle x_ ( 1, i ) ) x 2, i − x 1, i ( displaystyle x_ ( 2, i ) - x_ ( 1, i ) ) sgn ( displaystyle operatorname ( sgn ) ) abs ( displaystyle ( \text ( abs ) ) ) R i ( displaystyle R_ ( i ) ) sgn ⋅ R i ( displaystyle operatorname ( sgn ) cdot R_ ( i ) ) 5 140 140 0 130 125 5 1.5 1.5 9 140 135 5 1.5 1.5 115 122 -- 1 7 -- 3 6 115 124 -- 1 9 -- 4 10 135 145 -- 1 10 5 -- 5 8 125 137 -- 1 12 6 -- 6 125 110 15 7 7 7 140 123 17 8 8 140 120 20 9 9 sgn ( displaystyle operatorname ( sgn ) ) is the sign function, abs ( displaystyle ( \text ( abs ) ) ) is the absolute value, and R i ( displaystyle R_ ( i ) ) is the rank. Notice that pairs 3 and 9 are tied in absolute value. They would be ranked 1 and 2, so each gets the average of those ranks, 1.5. N r = 10 − 1 = 9, W = 1.5 + 1.5 − 3 − 4 − 5 − 6 + 7 + 8 + 9 = 9. ( displaystyle N_ ( r ) = 10 - 1 = 9, W = 1.5 + 1.5 - 3 - 4 - 5 - 6 + 7 + 8 + 9 = 9. ) W > W α = 0.05, 9, two - sided = 6 ( displaystyle W > W_ ( alpha = 0.05, 9 ( \text (, two - sided ) ) ) = 6 ) ∴ reject H 0. ( displaystyle \therefore ( \text ( reject ) ) H_ ( 0 ). ) Limitation As demonstrated in the example, when the difference between the groups is zero, the observations are discarded. This is of particular concern if the samples are taken from a discrete distribution. In these scenarios the modification to the Wilcoxon test by Pratt 1959, provides an alternative which incorporates the zero differences. This modification is more robust for data on an ordinal scale. Effect size To compute an effect size for the signed - rank test, one can use the rank correlation. If the test statistic W is reported, the rank correlation r is equal to the test statistic W divided by the total rank sum S, or r = W / S. Using the above example, the test statistic is W = 9. The sample size of 9 has a total rank sum of S = ( 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 ) = 45. Hence, the rank correlation is 9 / 45, so r = 0.20. If the test statistic T is reported, an equivalent way to compute the rank correlation is with the difference in proportion between the two rank sums, which is the Kerby ( 2014 ) simple difference formula. To continue with the current example, the sample size is 9, so the total rank sum is 45. T is the smaller of the two rank sums, so T is 3 + 4 + 5 + 6 = 18. From this information alone, the remaining rank sum can be computed, because it is the total sum S minus T, or in this case 45 - 18 = 27. Next, the two rank - sum proportions are 27 / 45 = 60 % and 18 / 45 = 40 %. Finally, the rank correlation is the difference between the two proportions (. 60 minus. 40 ), hence r =. 20. Implementations ALGLIB includes implementation of the Wilcoxon signed - rank test in C++, C#, Delphi, Visual Basic, etc. The free statistical software R includes an implementation of the test as wilcox. test ( x, y, paired = TRUE ), where x and y are vectors of equal length. GNU Octave implements various one - tailed and two - tailed versions of the test in the wilcoxon_test function. SciPy includes an implementation of the Wilcoxon signed - rank test in Python Accord.NET includes an implementation of the Wilcoxon signed - rank test in C# for. NET applications See also Mann -- Whitney -- Wilcoxon test ( the variant for two independent samples ) Sign test ( Like Wilcoxon test, but without the assumption of symmetric distribution of the differences around the median, and without using the magnitude of the difference ) References ^ Jump up to : Lowry, Richard. `` Concepts & Applications of Inferential Statistics ''. Retrieved 24 March 2011. Jump up ^ Wilcoxon, Frank ( Dec 1945 ). `` Individual comparisons by ranking methods '' ( PDF ). Biometrics Bulletin. 1 ( 6 ) : 80 -- 83. doi : 10.2307 / 3001968. Jump up ^ Siegel, Sidney ( 1956 ). Non-parametric statistics for the behavioral sciences. New York : McGraw - Hill. pp. 75 -- 83. Jump up ^ Pratt, J ( 1959 ). `` Remarks on zeros and ties in the Wilcoxon signed rank procedures ''. Journal of the American Statistical Association. 54 ( 287 ) : 655 -- 667. doi : 10.1080 / 01621459.1959. 10501526. ^ Jump up to : Derrick, B ; White, P ( 2017 ). `` Comparing Two Samples from an Individual Likert Question ''. International Journal of Mathematics and Statistics. 18 ( 3 ) : 1 -- 13. ^ Jump up to : Kerby, Dave S. ( 2014 ), `` The simple difference formula : An approach to teaching nonparametric correlation. '', Comprehensive Psychology, 3, doi : 10.2466 / 11. IT. 3.1 Jump up ^ Dalgaard, Peter ( 2008 ). Introductory Statistics with R. Springer Science & Business Media. pp. 99 -- 100. ISBN 978 - 0 - 387 - 79053 - 4. External links Wilcoxon Signed - Rank Test in R Example of using the Wilcoxon signed - rank test An online version of the test A table of critical values for the Wilcoxon signed - rank test Brief guide by experimental psychologist Karl L. Weunsch - Nonparametric effect size estimators ( Copyright 2015 by Karl L. Weunsch ) Kerby, D.S. ( 2014 ). The simple difference formula : An approach to teaching nonparametric correlation. Comprehensive Psychology, volume 3, article 1. doi : 10.2466 / 11. IT. 3.1. link to article hide Statistics Outline Index Descriptive statistics Continuous data Center Mean arithmetic geometric harmonic Median Mode Dispersion Variance Standard deviation Coefficient of variation Percentile Range Interquartile range Shape Central limit theorem Moments Skewness Kurtosis L - moments Count data Index of dispersion Summary tables Grouped data Frequency distribution Contingency table Dependence Pearson product - moment correlation Rank correlation Spearman 's rho Kendall 's tau Partial correlation Scatter plot Graphics Bar chart Biplot Box plot Control chart Correlogram Fan chart Forest plot Histogram Pie chart Q -- Q plot Run chart Scatter plot Stem - and - leaf display Radar chart Data collection Study design Population Statistic Effect size Statistical power Sample size determination Missing data Survey methodology Sampling stratified cluster Standard error Opinion poll Questionnaire Controlled experiments Design control optimal Controlled trial Randomized Random assignment Replication Blocking Interaction Factorial experiment Uncontrolled studies Observational study Natural experiment Quasi-experiment hide Statistical inference Statistical theory Population Statistic Probability distribution Sampling distribution Order statistic Empirical distribution Density estimation Statistical model L space Parameter location scale shape Parametric family Likelihood ( monotone ) Location -- scale family Exponential family Completeness Sufficiency Statistical functional Bootstrap U V Optimal decision loss function Efficiency Statistical distance divergence Asymptotics Robustness Frequentist inference Point estimation Estimating equations Maximum likelihood Method of moments M - estimator Minimum distance Unbiased estimators Mean - unbiased minimum - variance Rao -- Blackwellization Lehmann -- Scheffé theorem Median unbiased Plug - in Interval estimation Confidence interval Pivot Likelihood interval Prediction interval Tolerance interval Resampling Bootstrap Jackknife Testing hypotheses 1 - & 2 - tails Power Uniformly most powerful test Permutation test Randomization test Multiple comparisons Parametric tests Likelihood - ratio Wald Score Specific tests Z - test ( normal ) Student 's t - test F - test Goodness of fit Chi - squared G - test Kolmogorov -- Smirnov Anderson -- Darling Lilliefors Jarque -- Bera Normality ( Shapiro -- Wilk ) Likelihood - ratio test Model selection Cross validation AIC BIC Rank statistics Sign Sample median Signed rank ( Wilcoxon ) Hodges -- Lehmann estimator Rank sum ( Mann -- Whitney ) Nonparametric anova 1 - way ( Kruskal -- Wallis ) 2 - way ( Friedman ) Ordered alternative ( Jonckheere -- Terpstra ) Bayesian inference Bayesian probability prior posterior Credible interval Bayes factor Bayesian estimator Maximum posterior estimator Correlation Regression analysis Correlation Pearson product - moment Partial correlation Confounding variable Coefficient of determination Regression analysis Errors and residuals Regression model validation Mixed effects models Simultaneous equations models Multivariate adaptive regression splines ( MARS ) Linear regression Simple linear regression Ordinary least squares General linear model Bayesian regression Non-standard predictors Nonlinear regression Nonparametric Semiparametric Isotonic Robust Heteroscedasticity Homoscedasticity Generalized linear model Exponential families Logistic ( Bernoulli ) / Binomial / Poisson regressions Partition of variance Analysis of variance ( ANOVA, anova ) Analysis of covariance Multivariate ANOVA Degrees of freedom Categorical / Multivariate / Time - series / Survival analysis Categorical Cohen 's kappa Contingency table Graphical model Log - linear model McNemar 's test Multivariate Regression Manova Principal components Canonical correlation Discriminant analysis Cluster analysis Classification Structural equation model Factor analysis Multivariate distributions Elliptical distributions Normal Time - series General Decomposition Trend Stationarity Seasonal adjustment Exponential smoothing Cointegration Structural break Granger causality Specific tests Dickey -- Fuller Johansen Q - statistic ( Ljung -- Box ) Durbin -- Watson Breusch -- Godfrey Time domain Autocorrelation ( ACF ) partial ( PACF ) Cross-correlation ( XCF ) ARMA model ARIMA model ( Box -- Jenkins ) Autoregressive conditional heteroskedasticity ( ARCH ) Vector autoregression ( VAR ) Frequency domain Spectral density estimation Fourier analysis Wavelet Whittle likelihood Survival Survival function Kaplan -- Meier estimator ( product limit ) Proportional hazards models Accelerated failure time ( AFT ) model First hitting time Hazard function Nelson -- Aalen estimator Test Log - rank test Applications Biostatistics Bioinformatics Clinical trials / studies Epidemiology Medical statistics Engineering statistics Chemometrics Methods engineering Probabilistic design Process / quality control Reliability System identification Social statistics Actuarial science Census Crime statistics Demography Econometrics National accounts Official statistics Population statistics Psychometrics Spatial statistics Cartography Environmental statistics Geographic information system Geostatistics Kriging Portal Commons WikiProject Retrieved from `` https://en.wikipedia.org/w/index.php?title=Wilcoxon_signed-rank_test&oldid=854012075 '' Categories : Statistical tests Nonparametric statistics U-statistics Hidden categories : All articles with unsourced statements Articles with unsourced statements from February 2017 Talk Contents Interaction About Wikipedia Català Deutsch Español Euskara فارسی Français Italiano Nederlands 日本 語 Polski Português Русский 5 more Edit links This page was last edited on 8 August 2018, at 10 : 57 ( UTC ). Text is available under the Creative Commons Attribution - ShareAlike License ; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia ® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization. About Wikipedia

Question: what does the wilcoxon signed rank test measure
Answer: two related samples, matched samples, or repeated measurements on a single sample to assess whether their population mean ranks differ (i.e. it is a paired difference test)