If you have two scores from the same people, first match them into pairs and subtract each “Before” score from its “After” score. The Wilcoxon signed-rank test uses the direction and ranks of these differences. Consider it when the magnitudes of the differences can be meaningfully ranked, pairs are independent of one another, and the difference distribution is approximately symmetric. In this guide, you will calculate a result for eight pairs and report it so that the analysis can be reproduced from the chapter.
Start with the spreadsheet. Keep one row per person and two measurement columns, then add a difference column. Check a few rows manually first. If the measurements contain the same people in different orders, match them by identifier. The row number does not establish a match. If the link is missing, choosing a test cannot restore it. The guide to unmatched before-and-after surveys covers that situation.
Check what actually forms a pair
In a thesis in Psychology, a pair might consist of two measurements from the same person at different times, two scores from the same participant under two conditions, or two deliberately matched measurements linked according to the study design. In each case, you analyse the difference within an established pair. Two datasets of equal size do not automatically form pairs. You need a rule that allows someone else to establish why one score was subtracted from that particular other score.
With repeated measurement, the rule is usually simple: the same participant identifier in both exports. However, identifiers must be unique at each measurement occasion. If an identifier occurs twice before the follow-up, do not choose the first record merely because the software found it first. Consult the data-collection instructions. Establish whether the second record is a duplicate, a repeat attempt intended to replace the first, or a separate measurement. Record how you resolved it and keep copies of the input files. A small decision about one row can change a difference's sign and shift the other ranks.
Check the unit of analysis too. If 20 people completed a questionnaire twice, you have at most 20 pairs at the person level. If each person also completed several trials on each occasion, those trials should not be declared separate independent pairs without justification. You might have specified in advance that the relevant measure is each person's median time over three trials on each occasion. You then pair that person's two medians and obtain one difference per person. A question about performance over many trials may require a model accounting for repetition. Document the decision in advance and explain the unit to which the conclusion applies.
Independence between pairs is a separate condition. Participants may train in pairs, study in the same classes or perform the task under the same tutor. If a substantial shared class or team influence is part of the design, a simple test treating all participants' scores as independent can give an overly optimistic result. Independence cannot be read from a histogram. Establish it from the design and data-collection process. If it cannot be reasonably defended, discuss group-level analysis or a method accounting for dependence with your supervisor.
Define the difference and check both exports
Before subtracting, record the units and scale direction. A positive difference can indicate better task performance when higher scores mean more correct answers. On a burden scale, a positive difference indicates greater burden. For completion time, it means a longer time, with a different interpretation when speed is the aim. Label the column “After minus before” and explain in the methods what a positive sign means. Readers should not have to infer this from the p-value.
When checking the spreadsheet, confirm that both measurement columns use the same range and coding rules. If the response order was reversed in the second questionnaire, restore consistent item coding before calculating a total. If the first column uses seconds and the second minutes, convert the units before subtracting. Identify labels stored as numbers too: values such as “99” and “-1” may be missing-value codes. Consult the export description and record the meaning of every code. Calculate differences after completing this check.
For an ordinal scale, assessing absolute differences requires particular care. “Low”, “Medium” and “High” can be ordered. Assigning them 1, 2 and 3 does not necessarily mean that the distances between scale points can be interpreted. If the data strongly justify only the direction of change within a pair, the sign test addresses a narrower question. You can also show category transitions: how many people moved from each category to another and how many stayed in the same one. Choose a test using the construction of the variable, rather than the ease of subtracting its codes.
Work through this decision before calculating the whole column. Suppose one record changes from “Low” to “Medium” and another from “Medium” to “High”. The direction is known in both cases and can be described similarly. You need a basis for comparing their magnitudes before attaching importance to which difference is larger. Keep two fields in the spreadsheet: the original category and the code used for processing. Report the categories in words. This allows assessment of the method to rest on the actual scale even when the calculation file contains only numbers.
The next check concerns missing data. An “After” score without a “Before” score should not be subtracted from zero or from the whole group's mean to increase the pair count. A simple paired test uses complete pairs. Record how many people had each measurement and how many entered the analysis. If more people are lost at one occasion, check whether you know why. A short missing-data note should explain whether and how the losses may have changed the group represented. With several scales, the complete-pair count can differ for each.
- Match
- Pair before and after. Keep missing outcomes separate from genuine zeros.
- Rank
- Order the sizes of differences and sum ranks separately by sign.
- Report
- Give the number of pairs, direction, statistic and how you obtained p.
First decide what a positive difference means on your scale.
Read the differences before choosing the test
Plot the differences as points or show an ordered list with zero marked. With a small sample, a plot helps reveal an extreme case, a unit error, many zeros, or numerous small negative changes alongside a few very large positive ones. It cannot firmly establish the population distribution's shape. Combine it with knowledge of the scale. With strong restrictions, such as everyone already reaching the maximum at the first occasion, the task itself may constrain possible differences asymmetrically.
The paired Wilcoxon test examines the difference distribution around a specified value, usually zero. Its usual interpretation assumes symmetry around the distribution's centre. Non-normality does not remove the need to assess other conditions. Avoid turning “Check the difference distribution” into “Shapiro-Wilk p is below 0.05, so always use Wilcoxon”. Separate normality checks for the “Before” and “After” columns also do not directly describe the distribution of their differences. The guide to a significant Shapiro-Wilk result shows how to place that result within the choice of method.
If your question concerns mean change in the original scale's units and the conditions for a paired t-test are reasonable, that analysis addresses the mean difference. If you want to use ranks of change magnitudes and can justify both their interpretation and a symmetric difference distribution, Wilcoxon provides another way to assess change. With strong asymmetry and a meaningful distinction between signs, consider the sign test. It reduces the information to counts of positive and negative changes. Remember that this choice can lead to a different question about the variable.
The Mann-Whitney test concerns two independent groups. It does not use the fact that two scores belong to the same person. Names can cause confusion because some software also calls the independent-groups procedure the Wilcoxon rank-sum test and may display W in a table. Before copying a result, read the full procedure name, confirm the paired setting and check which data entered the calculation. One letter above a column does not identify the method.
Calculate eight differences and assign their ranks
Use the calculation below to follow the whole route from spreadsheet to reported result. The practice data concern a points score. Each identifier represents one pair. A higher points total means more correct answers. We calculate the difference as “After minus before”. In a real thesis, independence between pairs and the meaning of the measurement must be established from the study design.
- A01: before 11, after 12. Difference +1. Magnitude 1 is the smallest, so its rank is 1.
- A02: before 13, after 11. Difference -2. Magnitude 2 is second, so it has rank 2 on the negative side.
- A03: before 12, after 15. Difference +3, rank 3.
- A04: before 16, after 20. Difference +4, rank 4.
- A05: before 15, after 20. Difference +5, rank 5.
- A06: before 12, after 18. Difference +6, rank 6.
- A07: before 14, after 21. Difference +7, rank 7.
- A08: before 10, after 18. Difference +8, rank 8.
Here, the row order happens to match the order of the absolute differences. Usually it will not. If an 8-point change occurs in the first row, do not give it rank 1. Its rank comes from its magnitude relative to all the other changes. Its location in the file is irrelevant. Restore the sign after assigning ranks. The change of -2 then occupies second place by magnitude, but its rank contributes to the negative sum.
Add the positive ranks: 1 + 3 + 4 + 5 + 6 + 7 + 8 = 34. The negative-rank sum is 2. Check that 34 + 2 = 36, the sum of the numbers from 1 to 8. If you get 38 or 33, return to the ordering and check for a duplicated rank. The distinct absolute differences in the complete example allow every rank to be listed explicitly.
In a textbook convention, you can report the smaller rank sum as T = 2. In R's basic paired-test output, when calculating “After minus before”, V denotes the positive-rank sum, which is 34 here. Another implementation may report the two-sided statistic as W = 2. Use the symbol and value from the actual procedure used, after checking what the symbol means. Matching p-values do not require both programs to display the same statistic.
Check the descriptive values before writing. The before-score median is 12.5, the after-score median is 18, and the median paired difference is 4.5 points. The difference between the two column medians is 5.5 and answers a different question. All three are useful, but the paired-difference median describes the middle change between two scores from the same person. When discussing individual change, show the paired-change distribution alongside the summary of scores at each occasion.
Check the p-value in software and understand its origin
The distribution for this example is straightforward to describe. Under the null hypothesis in the classical model, the independent signs of differences are symmetric around zero. When the test conditions hold, eight distinct nonzero ranks give 256 equally likely sign arrangements, because each rank can be positive or negative. Here, extreme tail sums are 0, 1 and 2 at one end and 34, 35 and 36 at the other. That gives six arrangements out of 256, producing an exact two-sided p = 0.0234375. This checks the software result and shows why we use more than the number of pairs with an increase.
If you work in R, enter the vectors in the same order, then call the paired procedure with the second measurement as the first argument. This short command is sufficient:
before <- c(
11, 13, 12, 16,
15, 12, 14, 10
)
after <- c(
12, 11, 15, 20,
20, 18, 21, 18
)
wilcox.test(
after, before,
paired = TRUE,
alternative =
"two.sided",
exact = TRUE
)
In your study spreadsheet, preserve pair order explicitly after checking the identifier. The software cannot establish that the third element in one vector belongs to the same person as the third element in the other. Equal-length vectors in the wrong order may produce a result without a warning. The manual check protects you from a correct calculation on an incorrectly matched dataset.
The p-value describes how unusual a result at least this extreme would be under the specified hypothesis and model conditions. It does not give the probability that chance or the software itself caused the difference. It also does not measure the change in points or assess its usefulness. Report the example's 0.023 alongside the change, scale and pair count. Treat it as part of the analysis, rather than a standalone sign that the study succeeded. A result closer to the threshold needs the same information.
Swapping the vectors changes V from 34 to 2 here because every difference reverses sign. The two-sided p-value stays the same. The direction in your description changes only if you redefine the difference and consistently explain its sign. In a one-sided analysis, swapping the vectors while keeping the same alternative parameter changes the question. Record the hypothesis and a consistent subtraction direction before opening the data if there is a documented basis for a one-sided test. Do not select it after seeing which direction gives a more favourable result.
Count zeros, tied magnitudes and missing values separately
A zero difference occurs when both measurements are available and the person has the same score twice. A missing difference occurs when the second value is unavailable. Use separate codes if both appear in the spreadsheet. Classical zero handling omits zeros from ranking, but complete zero-change pairs should still be visible in the data description. Distinguish the number of complete pairs, zero differences and nonzero pairs in your results.
Now consider a change to the calculation. A01 originally had 11 before and 12 after. If both values are 11, you still have eight complete pairs but seven nonzero differences. After omitting the zero, the remaining magnitudes receive ranks 1 to 7. You cannot make this adjustment by simply subtracting the old rank from the original sum. Rank 1 now belongs to the difference of magnitude 2. Software can use different zero conventions, so check settings and warnings before comparing results.
A tie occurs when absolute differences are equal. With +5 and -5, both occupy neighbouring positions, such as 4 and 5, and each receives their mean rank of 4.5. You then allocate this rank according to sign. It is a tie in change magnitude despite the opposite directions. The configured p-value method for ties may differ from the method for eight distinct magnitudes. Do not transfer the manual distribution from our dataset to tied data.
A discrepancy between R and another program need not indicate an arithmetic error. First compare participant lists and missing-data handling, subtraction direction, test variant, the numbers of zeros and ties, and the p-value method. With a small sample, an approximation may differ from an exact calculation. Consult documentation for the version used. Programs change default thresholds and handling of special cases. In a thesis, record the actual version and settings for your data, together with the reason for choosing them.
Consider spreadsheet rounding too. A value displayed as 0.1 may contain additional decimal places. Where scoring has a defined precision, reproduce it meaningfully and check whether differences intended to be equal remain tied after calculation. Floating-point representation can create technical artefacts with fractions. Resolve this in line with measurement units and precision, rather than rounding repeatedly until p becomes smaller. Keep the original column and document how precision was handled.
Write the method so that the calculation can be reproduced
Start with participants and measurement occasions. In the methods, explain why the scores can be paired, how many measurements were available, and how missing values and zeros were treated. Specify how the points score was constructed. If the scale has a documented scoring procedure, cite its source. For a self-developed task set, explain what earned a point and whether the two measurements have comparable structures. A test cannot repair an unclear measurement instruction.
A possible description of this guide's calculation is “The two points measurements were matched by identifier. Differences were calculated as points after minus points before. The difference distribution was examined, and missing values, zeros and ties in absolute differences were checked. Eight complete pairs without zeros or ties were used to illustrate a two-sided Wilcoxon signed-rank test. The p-value was calculated exactly”. In your thesis, add the actual assessment of conditions, the software and version, and the significance level specified before analysis.
If several scales or comparisons are planned for the same data, identify the main question and additional questions. Separate p-values are not separate studies, and the probability of at least one result below the chosen threshold can change. Record which comparison follows from the main hypothesis and how additional comparisons are treated. Your approach should follow from the study design and be explainable to your supervisor. The guide to research and statistical hypotheses covers the earlier choice of parameter and hypothesis form.
You can express the method in two sentences. The first justifies pairing, for example “The same task scores were compared for the same participants on two occasions”. The second explains the choice of test in relation to the data, for example “A two-sided signed-rank test was used for points differences whose magnitudes could be meaningfully ranked”. Follow it with an actual justification of assumptions and limitations. “The sample was small” can be one fact, but does not independently justify using ranks.
Report the result with a clear link between numbers and conclusions
First describe the data, then give the test, then interpret it. For our example, a report could read “Among eight complete pairs, the median score was 12.5 points at the first measurement and 18 points at the second. The median individual after-minus-before difference was 4.5 points. Scores increased in seven pairs and decreased in one. The exact two-sided Wilcoxon signed-rank test gave V = 34, p = 0.0234. Increases therefore predominated among the observed pairs”.
If 0.05 was specified as the significance level before analysis, you can add that the test result provides grounds for rejecting the stated null hypothesis at that level. Follow what is recorded in the method. If symmetry cannot be justified or pairs depend on one another, the same arithmetic does not support a strong conclusion. With a small real sample, remain cautious whichever side of the threshold p falls. Describe an exploratory comparison as exploratory.
In the discussion, distinguish change from the effectiveness of an activity. Measuring the same group before and after classes can show a direction of change. Without a comparable group, change alone cannot distinguish the classes' effect from familiarity with the task, other events, different measurement conditions or natural variation. Discuss other plausible explanations that actually apply and how a further study could distinguish them. Writing “The score increased” in the results and “Effectiveness was proved” in the abstract breaks that chain of reasoning.
If your supervisor requires an effect-size measure, establish its definition and direction before copying a value. Under one convention, paired rank-biserial correlation uses the difference between the two rank sums divided by their total. In this example, (34 – 2) / 36 gives approximately 0.89 for after-minus-before and that sign convention. Explain how the measure was calculated. Also describe change in the original scale's units, because a rank-based effect size cannot tell the reader whether several points matter practically. For confidence intervals, check whether the estimate shown by the software concerns the ordinary difference median or another quantity.
If software reports a Hodges-Lehmann estimator or pseudomedian, do not copy it into a field labelled “Median individual change”. R's documentation notes that a population pseudomedian agrees with the median for a symmetric distribution. In a sample, the two quantities are calculated differently. Report the descriptive statistic in points separately from the estimator and its interval if that procedure actually produced them. One carefully chosen word helps readers understand why two values from the same file differ.
Show the change distribution using a chart suited to pairs
Bars showing two means can look clear while hiding that most people's scores stayed the same and a few extreme participants raised the mean. A difference plot shows the direction of individual changes. Each point represents a pair. Label the axis “After-minus-before difference (points)” and mark zero. To show both occasions as well, use a paired plot connecting the same participant's two values with a line. Very large samples may require a different display, while the line and units should retain a clear meaning.
If the chart will be read on a phone, avoid long participant codes as the main labels. Number points in an order established in the methods, or show the difference distribution without individual identifiers. State the units and sample size in the caption. Use shape or direct labels to show direction when colour provides an additional distinction. Check contrast in greyscale and after inserting the chart into the document. For sensitive samples, check the project's anonymisation rules before displaying individual results.
Our dataset shows one difference of -2 to the left of zero and seven positive differences to the right. The results description is therefore understandable even without the test name: readers can see that improvement did not occur for everyone. Another possible illustration is a short rank card showing 34 on the positive side and 2 on the negative. Explain this as a calculation check if you use it. Without that explanation, someone might read 34 and 2 as participant counts or scale units.
Check variants that may change the decision before your defence
If measurement conditions changed between occasions, correct pairing does not restore comparability. If the pilot used 15 questions and the second round used 20, raw totals have different maximum scores. Percentages can rescale both columns, but cannot establish equivalent difficulty. Explain what comparison is possible, such as the same items at both measurements, and what remains a separate result. Make the instrument change visible rather than concealing it with an automatic conversion.
If your supervisor asks about a small sample and several missing follow-up answers, prepare two sentences. First, record how many people began, how many provided the second measurement, how many complete pairs remained, and whether reasons for loss are known. Then limit the conclusion to the data supporting the analysis. If people withdrew after a difficult task, those remaining may represent a different group from everyone enrolled. The test itself does not account for that process. A broader conclusion needs further missing-data analysis and assessment of the design.
If one program gives a significant result and another does not, retain both outputs with the procedure and version names. Check complete-pair counts, zero handling, one-sided versus two-sided settings, and exact versus approximate p-values. Differences can be visible in small studies. Do not choose an output according to which provides the desired label. Explain the methodological choice and, where a sensitivity analysis matters, show both results with the procedural difference.
If the study specified in advance that a one-point increase would not be practically noticeable, check the interpretation before declaring a “Significant improvement”. You can report a difference in points and explain that its practical meaning depends on the specified threshold and scale. Where no threshold is justified by the design or literature, show the observed variation in changes and state what remains unresolved. A small p-value does not create a threshold of noticeable change.
Try reproducing the analysis on one sheet of paper
Imagine going to your thesis defence without the software and explaining the route of one measurement. Choose an identifier, read its before and after values, explain the sign, identify its place among the ordered differences and add the rank to the correct sum. Then identify where the thesis describes the test and why it answers the chosen question. If a step requires guessing the settings, add them to the methods. If a row cannot be traced to its source, check the analysis file before drawing a conclusion.
A02 is a useful check in our example. Its first score is 13 and its second 11, giving a decrease of 2 points. In magnitude, this exceeds A01's +1 and is below +3 and all subsequent changes. It therefore contributes rank 2 to the negative sum. Two sentences show where both the rank and sign needed to reproduce the calculation come from.
Finally, compare three places in the thesis: methods, results and abstract. Their lengths can differ, but terminology should agree. If the method specifies “After minus before”, results use “Increase” for a positive change, and the abstract gives a complete-pair count, check that count against the results. If the result concerns only people with both measurements, define the scope of “Everyone” in the abstract. This catches problems statistical software cannot detect.
Before submission, identify the raw-data source, save a separate analysis spreadsheet and record the settings. The note can include software version, vector order, test type, complete-pair count, handling of zeros and ties, p-value method and result. Send it to the person checking the work along with the variable description and agreed anonymisation rules. The task is complete when the result can be recalculated and its description can be understood without access to the software interface.
Questions and answers
Do I need to know which statistical test to commission?
No. Not every thesis requires statistical tests. Please send the research questions, hypotheses, the survey, and the database. I will check the type of variables, group structure, and method assumptions, and then propose an analysis that corresponds to the research objective.
Are charts from Google Forms sufficient for statistical tests?
Usually, a database of individual responses is required, for example an export to XLSX or CSV. Aggregate charts alone often do not allow reconstructing relationships between answers or calculating correlations. Please also send the questionnaire and the scoring key for scales, if used.
How many people are needed for statistical analysis in a master's thesis?
There is no single number suitable for every thesis. The planned test, the number and size of groups, the expected effect size, and the required power and precision of the analysis are important. A small sample limits inference. It is best to discuss the sample size before starting data collection.
What should I prepare for the analysis and presentation of results in a psychology thesis?
Include the research questions, hypotheses, description of variables and tools, and available analysis summaries. If you also need calculations, send an anonymised dataset with a description of columns and the coding method for responses. Based on this, I will determine the scope of support.
What will I receive after the statistical analysis is completed?
I agree the scope before starting. It may include a prepared dataset, descriptive statistics, test results, tables, charts, a description of the methods and interpretation in relation to the research questions. I agree the format of editable files and any materials from the software when I prepare the quote.
How much does statistical analysis for a degree thesis cost?
I will prepare a quote after reviewing the database and research questions. The cost depends on data cleaning, the number and complexity of analyses, the scope of tables and description, and the deadline. I do not price the service based solely on the number of pages in the thesis.
Sources
- AGH University of Krakow. Statistics in medicine teaching materials, section on nonparametric tests. Ranking differences and handling tied ranks.
- National Institute of Standards and Technology. Signed Rank Test, Dataplot Reference Manual. Symmetry and the distinction between the sign test and signed-rank test.
- R Core Team. Wilcoxon Rank Sum and Signed Rank Tests, wilcox.test documentation. The paired argument, hypotheses and calculation methods.
- SciPy Developers. scipy.stats.wilcoxon documentation. Subtraction direction, statistic, zeros and ties.
- Kerby, D. S. (2014). The Simple Difference Formula: An Approach to Teaching Nonparametric Correlation. DOI 10.2466/11.IT.3.1. Computing the matched-pairs rank-biserial correlation from the difference between the two shares of the rank sum.
Check the calculation and write-up
Include the data and your output with the procedure name. Start by checking the pairs, differences and settings.
Contact StudentSupport


