This is one of the following seven articles on Paired (2-Sample Dependent) t-Tests in Excel

Paired t-Test in 4 Steps in Excel 2010 and Excel 2013

Excel Normality Testing of Paired t-Test Data

Paired t-Test Excel Calculations, Formulas, and Tools

Paired t-Test – Effect Size in Excel 2010, and Excel 2013

Paired t-Test – Test Power With G-Power Utility

Wilcoxon Signed-Rank Test in 8 Steps As a Paired t-Test Alternative

Sign Test in Excel As A Paired t-Test Alternative

# Wilcoxon Signed-Rank

Test in 8 Steps in Excel as

a Paired t-Test Alternative

The Wilcoxon Signed-Rank Test is an alternative to the paired t-Test when sample size is small (number of pairs = n < 30) and normality cannot be verified for the difference sample data or the population from which the difference sample was taken.

The Wilcoxon Signed-Rank Test calculates the difference between each data point in the difference sample and the Constant from the t-Test’s Null Hypothesis (0 in this case). The absolute values of each difference and ranked and then assigned the sign (positive or negative) that the difference originally had. These signed ranks are summed up to create the Test Statistic W.

Test Statistic W will be approximately normally distributed if the required assumptions are met for this test. The Test Statistic’s z Score can then be calculated and compared with the Critical z value. The decision whether or not to reject the test’s Null Hypothesis is made based on the results of this comparison.

The Null Hypothesis for this test states that the median difference equals the Constant, i.e. H_{0}: Population Median Difference = Constant. This is very similar to the Null Hypothesis of the one-sample t-Test which states that the population median difference is equal to the Constant. The population is the set of differences from all possible before-and-after data pairs.

The Wilcoxon Signed-Rank Test is performed by implementing the following steps:

1) Calculate the difference between each difference data point and the Constant that the sample is being compared to, which is the Constant of 0 from the Null Hypothesis.

2) Record the sign (positive or negative) of each difference.

3) Sort the absolute values of difference data in ascending order.

4) Assign ranks to this data.

5) Attach the sign of each difference to its rank.

6) Sum up all of these signed ranks. This sum is the Test Statistic W.

7) Calculate the standard deviation, σ_{w}, for these signed ranks.

8) The Test Statistic W will be approximately normally distributed if the required assumptions for this test are met. Calculate the z Score for this variable W.

9) Compare the z Score of W with the Critical z Value for the given alpha and number of tails in the test. If the z Score is further from the standardized mean of zero than the Critical z Value, the Null Hypothesis can be rejected. The Null Hypothesis states that the population’s median is equal to the Constant from the Null Hypothesis.

Performing the Wilcoxon Signed Rank Test on the data is the example in this section is done as follows:ep 1) Calculate the Difference Between Each Sample Data Point and the Constant to Which the Sample Is Being Compared.

The original Null Hypothesis from the paired t-Test stated that the **mean** difference between all before-and-after data pairs in the entire population is equal to 0. The Null Hypothesis for this test was as follows:

H_{0}: x_bar_{diff} = Constant =0

The x_bar_{diff} sample is created as follows:

* (Click Image To See Larger Version)*

The Wilcoxon Signed-Rank Test calculates the difference between each data point in the difference sample and the Constant from the t-Test’s Null Hypothesis (0 in this case). That final difference sample is created as follows:

* (Click Image To See Larger Version)*

### Step 2) Create the Null and Alternative Hypotheses.

The one-sample t-Test attempts to determine whether the **mean** difference between all possible pairs of before-and-after data is equal to 0.

The Wilcoxon Signed-Rank Test attempts to determine whether the **median** difference between all possible pairs of before-and-after data is equal to 0. The Null Hypothesis for this would be stated as follows:

H_{0}: Median_Difference = Constant = 0

The Alternate Hypothesis is always in inequality and states that the two items being compared are different. This hypothesis test is trying to determine whether there has been a reduction in clerical errors, i.e., the After measurements are smaller than the Before measurements. If there has been a reduction in clerical errors, the median difference will be less than 0.

The Alternative Hypothesis for this Wilcoxon Signed-Rank Test will therefore be stated as follows:

H_{1}: Median_Difference < Constant = 0

H_{1}: Median_Difference < 0

### Step 3) Evaluate Whether the Test’s Required Conditions Have Been Met

The Wilcoxon Signed-Rank Test has the following requirements:

a) Data are ratio or interval but not categorical (nominal or ordinal). This is the case here.

b) Sample size (the number of data pairs) is at least 10. This is the case here.

c) Data of the Difference sample are distributed about a median with reasonable symmetry. Test Statistic W will not be normally distributed unless this assumption is met.

The following Excel-generated histogram shows that the difference data are distributed symmetrically about their median of -4. The symmetry about the median of -4 is not perfect but, given the small sample size, is reasonable enough to proceed with this test:

*(Click Image To See Larger Version)*

This histogram and the sample’s median were generated in Excel as follows:

*(Click Image To See Larger Version)*

### Step 4 – Record the Sign of Each Difference

Place a “+1” and “-1” next to each non-zero difference. This can be automatically generated with an If-Then-Else statement as follows:

*(Click Image To See Larger Version)*

Placing a plus sign (+) next to a number automatically requires a custom number format available from the Format Cell dialogue box. One custom format that will work is the following: “+”#:”-“# . This is demonstrated in following Excel screen shot:

*(Click Image To See Larger Version)*

### Step 5 – Sort the Absolute Values of the Differences While Retaining the Sign Associated to Each Difference

Sort both columns based upon column of difference absolute values.

* (Click Image To See Larger Version)*

### Step 6 –Rank the Absolute Values, Attach the Signs, and Sum up the Signed Ranks to Create Test Statistic W

The absolute values are ranked in ascending order starting with a rank of 1. Absolute values that are tied area assigned the average rank of the tied values. For example, the first three absolute values are 2. Each of these three absolute values would be assigned a rank of 2, which is equal to the average rank of all three, i.e., (1 + 2 + 3) / 3 = 2.

Test Statistic W is equal to the sum of all signed ranks.

*(Click Image To See Larger Version)*

### A Quick and Easy Way To Create the Rankings

Rankings can be quickly and automatically created using the RANK.AVG() formula as is done in the following image. Cell H19 contains the following formula:

=IF(ISNUMBER(G619),RANK.AVG(G619,$G$619:$G$688,1),””)

This formula creates a ranking for the value in cell G619 as part of the data group in G619 to G688. This correctly assigns ranks to tied values.

### Step 7 – Calculate the z Score of W

The distribution of Test Statistic W can be approximated by the normal distribution if all of the required assumptions for this test are met. The difference data consists of more than 10 points of ratio data that are reasonably symmetrical about their median. The assumptions are met for this Wilcoxon Signed-Rank Test.

The standard deviation of W, σ_{W}, is calculated as follows:

σ_{W} = SQRT[ n(n + 1)(2n + 1)/6 ] = 42.25

z Score = ( W – Constant – 0.5) / σ_{W}

z Score = ( -83 – 0 – 0.5) / 42.25 = -1.98

The constant is the Constant from the Null Hypothesis for this test, which is the following:

H_{0}: Median_Difference = Constant = 0

The z Score must include a 0.5 correction for continuity because W assumes whole integer values (except in the event of a tie of ranks).

### Step 8 – Reject or Fail to Reject the Null Hypothesis Based Upon a Comparison Between the z Score and the Critical z Value

Given that α = 0.05 and this is a two-tailed test, the Critical z Value is calculated as follows:

Z Critical_{α=0.05,One-Tailed, Left_Tail} = NORM.S.INV(α) = NORM.S.INV(0.05)

Z Critical_{α=0.05, One-Tailed, Left_Tail} = -1.64485

The Null Hypothesis is rejected if the z Score is further from the standardized mean of zero than the Critical z Values. This is the case here since the z Score (-1.98) is further from the standardized mean of zero than the Critical z Values (-1.64485). this information is shown in the Excel-generated graph as follows:

*(Click Image To See Larger Version)*

The Wilcoxon Signed-Rank Test detects that the ** median** difference between the before-and-after data is significant at an alpha level of 0.05.

The results of this Wilcoxon Signed-Rank Test were very similar to the results of the original paired t-Test in which the Null Hypothesis was rejected because the t Value (-2.159) was further from the standardized mean of zero than the Critical t Value (-1.76).

The results of the original t-Test are shown as follows:

*(Click Image To See Larger Version)*

The Paired t-Test detects that the ** mean** difference between the before-and-after data is significant at an alpha level of 0.05.

**Excel Master Series Blog Directory**

Statistical Topics and Articles In Each Topic

- Histograms in Excel
- Bar Chart in Excel
- Combinations & Permutations in Excel
- Normal Distribution in Excel
- Overview of the Normal Distribution
- Normal Distribution’s PDF (Probability Density Function) in Excel 2010 and Excel 2013
- Normal Distribution’s CDF (Cumulative Distribution Function) in Excel 2010 and Excel 2013
- Solving Normal Distribution Problems in Excel 2010 and Excel 2013
- Overview of the Standard Normal Distribution in Excel 2010 and Excel 2013
- An Important Difference Between the t and Normal Distribution Graphs
- The Empirical Rule and Chebyshev’s Theorem in Excel – Calculating How Much Data Is a Certain Distance From the Mean
- Demonstrating the Central Limit Theorem In Excel 2010 and Excel 2013 In An Easy-To-Understand Way

- t-Distribution in Excel
- Binomial Distribution in Excel
- z-Tests in Excel
- Overview of Hypothesis Tests Using the Normal Distribution in Excel 2010 and Excel 2013
- One-Sample z-Test in 4 Steps in Excel 2010 and Excel 2013
- 2-Sample Unpooled z-Test in 4 Steps in Excel 2010 and Excel 2013
- Overview of the Paired (Two-Dependent-Sample) z-Test in 4 Steps in Excel 2010 and Excel 2013

- t-Tests in Excel
- Overview of t-Tests: Hypothesis Tests that Use the t-Distribution
- 1-Sample t-Tests in Excel
- 1-Sample t-Test in 4 Steps in Excel 2010 and Excel 2013
- Excel Normality Testing For the 1-Sample t-Test in Excel 2010 and Excel 2013
- 1-Sample t-Test – Effect Size in Excel 2010 and Excel 2013
- 1-Sample t-Test Power With G*Power Utility
- Wilcoxon Signed-Rank Test in 8 Steps As a 1-Sample t-Test Alternative in Excel 2010 and Excel 2013
- Sign Test As a 1-Sample t-Test Alternative in Excel 2010 and Excel 2013

- 2-Independent-Sample Pooled t-Tests in Excel
- 2-Independent-Sample Pooled t-Test in 4 Steps in Excel 2010 and Excel 2013
- Excel Variance Tests: Levene’s, Brown-Forsythe, and F Test For 2-Sample Pooled t-Test in Excel 2010 and Excel 2013
- Excel Normality Tests Kolmogorov-Smirnov, Anderson-Darling, and Shapiro Wilk Tests For Two-Sample Pooled t-Test
- Two-Independent-Sample Pooled t-Test - All Excel Calculations
- 2- Sample Pooled t-Test – Effect Size in Excel 2010 and Excel 2013
- 2-Sample Pooled t-Test Power With G*Power Utility
- Mann-Whitney U Test in 12 Steps in Excel as 2-Sample Pooled t-Test Nonparametric Alternative in Excel 2010 and Excel 2013
- 2- Sample Pooled t-Test = Single-Factor ANOVA With 2 Sample Groups

- 2-Independent-Sample Unpooled t-Tests in Excel
- 2-Independent-Sample Unpooled t-Test in 4 Steps in Excel 2010 and Excel 2013
- Variance Tests: Levene’s Test, Brown-Forsythe Test, and F-Test in Excel For 2-Sample Unpooled t-Test
- Excel Normality Tests Kolmogorov-Smirnov, Anderson-Darling, and Shapiro-Wilk For 2-Sample Unpooled t-Test
- 2-Sample Unpooled t-Test Excel Calculations, Formulas, and Tools
- Effect Size for a 2-Independent-Sample Unpooled t-Test in Excel 2010 and Excel 2013
- Test Power of a 2-Independent Sample Unpooled t-Test With G-Power Utility

- Paired (2-Sample Dependent) t-Tests in Excel
- Paired t-Test in 4 Steps in Excel 2010 and Excel 2013
- Excel Normality Testing of Paired t-Test Data
- Paired t-Test Excel Calculations, Formulas, and Tools
- Paired t-Test – Effect Size in Excel 2010, and Excel 2013
- Paired t-Test – Test Power With G-Power Utility
- Wilcoxon Signed-Rank Test in 8 Steps As a Paired t-Test Alternative
- Sign Test in Excel As A Paired t-Test Alternative

- Hypothesis Tests of Proportion in Excel
- Hypothesis Tests of Proportion Overview (Hypothesis Testing On Binomial Data)
- 1-Sample Hypothesis Test of Proportion in 4 Steps in Excel 2010 and Excel 2013
- 2-Sample Pooled Hypothesis Test of Proportion in 4 Steps in Excel 2010 and Excel 2013
- How To Build a Much More Useful Split-Tester in Excel Than Google's Website Optimizer

- Chi-Square Independence Tests in Excel
- Chi-Square Goodness-Of-Fit Tests in Excel
- F Tests in Excel
- Correlation in Excel
- Pearson Correlation in Excel
- Spearman Correlation in Excel
- Confidence Intervals in Excel
- z-Based Confidence Intervals of a Population Mean in 2 Steps in Excel 2010 and Excel 2013
- t-Based Confidence Intervals of a Population Mean in 2 Steps in Excel 2010 and Excel 2013
- Minimum Sample Size to Limit the Size of a Confidence interval of a Population Mean
- Confidence Interval of Population Proportion in 2 Steps in Excel 2010 and Excel 2013
- Min Sample Size of Confidence Interval of Proportion in Excel 2010 and Excel 2013

- Simple Linear Regression in Excel
- Overview of Simple Linear Regression in Excel 2010 and Excel 2013
- Complete Simple Linear Regression Example in 7 Steps in Excel 2010 and Excel 2013
- Residual Evaluation For Simple Regression in 8 Steps in Excel 2010 and Excel 2013
- Residual Normality Tests in Excel – Kolmogorov-Smirnov Test, Anderson-Darling Test, and Shapiro-Wilk Test For Simple Linear Regression
- Evaluation of Simple Regression Output For Excel 2010 and Excel 2013
- All Calculations Performed By the Simple Regression Data Analysis Tool in Excel 2010 and Excel 2013
- Prediction Interval of Simple Regression in Excel 2010 and Excel 2013

- Multiple Linear Regression in Excel
- Basics of Multiple Regression in Excel 2010 and Excel 2013
- Complete Multiple Linear Regression Example in 6 Steps in Excel 2010 and Excel 2013
- Multiple Linear Regression’s Required Residual Assumptions
- Normality Testing of Residuals in Excel 2010 and Excel 2013
- Evaluating the Excel Output of Multiple Regression
- Estimating the Prediction Interval of Multiple Regression in Excel
- Regression - How To Do Conjoint Analysis Using Dummy Variable Regression in Excel

- Logistic Regression in Excel
- Logistic Regression Overview
- Logistic Regression in 6 Steps in Excel 2010 and Excel 2013
- R Square For Logistic Regression Overview
- Excel R Square Tests: Nagelkerke, Cox and Snell, and Log-Linear Ratio in Excel 2010 and Excel 2013
- Likelihood Ratio Is Better Than Wald Statistic To Determine if the Variable Coefficients Are Significant For Excel 2010 and Excel 2013
- Excel Classification Table: Logistic Regression’s Percentage Correct of Predicted Results in Excel 2010 and Excel 2013
- Hosmer- Lemeshow Test in Excel – Logistic Regression Goodness-of-Fit Test in Excel 2010 and Excel 2013

- Single-Factor ANOVA in Excel
- Overview of Single-Factor ANOVA
- Single-Factor ANOVA in 5 Steps in Excel 2010 and Excel 2013
- Shapiro-Wilk Normality Test in Excel For Each Single-Factor ANOVA Sample Group
- Kruskal-Wallis Test Alternative For Single Factor ANOVA in 7 Steps in Excel 2010 and Excel 2013
- Levene’s and Brown-Forsythe Tests in Excel For Single-Factor ANOVA Sample Group Variance Comparison
- Single-Factor ANOVA - All Excel Calculations
- Overview of Post-Hoc Testing For Single-Factor ANOVA
- Tukey-Kramer Post-Hoc Test in Excel For Single-Factor ANOVA
- Games-Howell Post-Hoc Test in Excel For Single-Factor ANOVA
- Overview of Effect Size For Single-Factor ANOVA
- ANOVA Effect Size Calculation Eta Squared in Excel 2010 and Excel 2013
- ANOVA Effect Size Calculation Psi – RMSSE – in Excel 2010 and Excel 2013
- ANOVA Effect Size Calculation Omega Squared in Excel 2010 and Excel 2013
- Power of Single-Factor ANOVA Test Using Free Utility G*Power
- Welch’s ANOVA Test in 8 Steps in Excel Substitute For Single-Factor ANOVA When Sample Variances Are Not Similar
- Brown-Forsythe F-Test in 4 Steps in Excel Substitute For Single-Factor ANOVA When Sample Variances Are Not Similar

- Two-Factor ANOVA With Replication in Excel
- Two-Factor ANOVA With Replication in 5 Steps in Excel 2010 and Excel 2013
- Variance Tests: Levene’s and Brown-Forsythe For 2-Factor ANOVA in Excel 2010 and Excel 2013
- Shapiro-Wilk Normality Test in Excel For 2-Factor ANOVA With Replication
- 2-Factor ANOVA With Replication Effect Size in Excel 2010 and Excel 2013
- Excel Post Hoc Tukey’s HSD Test For 2-Factor ANOVA With Replication
- 2-Factor ANOVA With Replication – Test Power With G-Power Utility
- Scheirer-Ray-Hare Test Alternative For 2-Factor ANOVA With Replication

- Two-Factor ANOVA Without Replication in Excel
- Randomized Block Design ANOVA in Excel
- Repeated-Measures ANOVA in Excel
- Single-Factor Repeated-Measures ANOVA in 4 Steps in Excel 2010 and Excel 2013
- Sphericity Testing in 9 Steps For Repeated Measures ANOVA in Excel 2010 and Excel 2013
- Effect Size For Repeated-Measures ANOVA in Excel 2010 and Excel 2013
- Friedman Test in 3 Steps For Repeated-Measures ANOVA in Excel 2010 and Excel 2013

- ANCOVA in Excel
- Normality Testing in Excel
- Creating a Box Plot in 8 Steps in Excel
- Creating a Normal Probability Plot With Adjustable Confidence Interval Bands in 9 Steps in Excel With Formulas and a Bar Chart
- Chi-Square Goodness-of-Fit Test For Normality in 9 Steps in Excel
- Kolmogorov-Smirnov, Anderson-Darling, and Shapiro-Wilk Normality Tests in Excel

- Nonparametric Testing in Excel
- Mann-Whitney U Test in 12 Steps in Excel
- Wilcoxon Signed-Rank Test in 8 Steps in Excel
- Sign Test in Excel
- Friedman Test in 3 Steps in Excel
- Scheirer-Ray-Hope Test in Excel
- Welch's ANOVA Test in 8 Steps Test in Excel
- Brown-Forsythe F Test in 4 Steps Test in Excel
- Levene's Test and Brown-Forsythe Variance Tests in Excel
- Chi-Square Independence Test in 7 Steps in Excel
- Chi-Square Goodness-of-Fit Tests in Excel
- Chi-Square Population Variance Test in Excel

- Post Hoc Testing in Excel
- Creating Interactive Graphs of Statistical Distributions in Excel
- Interactive Statistical Distribution Graph in Excel 2010 and Excel 2013
- Interactive Graph of the Normal Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the Chi-Square Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the t-Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the t-Distribution’s PDF in Excel 2010 and Excel 2013
- Interactive Graph of the t-Distribution’s CDF in Excel 2010 and Excel 2013
- Interactive Graph of the Binomial Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the Exponential Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the Beta Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the Gamma Distribution in Excel 2010 and Excel 2013
- Interactive Graph of the Poisson Distribution in Excel 2010 and Excel 2013

- Solving Problems With Other Distributions in Excel
- Solving Uniform Distribution Problems in Excel 2010 and Excel 2013
- Solving Multinomial Distribution Problems in Excel 2010 and Excel 2013
- Solving Exponential Distribution Problems in Excel 2010 and Excel 2013
- Solving Beta Distribution Problems in Excel 2010 and Excel 2013
- Solving Gamma Distribution Problems in Excel 2010 and Excel 2013
- Solving Poisson Distribution Problems in Excel 2010 and Excel 2013

- Optimization With Excel Solver
- Maximizing Lead Generation With Excel Solver
- Minimizing Cutting Stock Waste With Excel Solver
- Optimal Investment Selection With Excel Solver
- Minimizing the Total Cost of Shipping From Multiple Points To Multiple Points With Excel Solver
- Knapsack Loading Problem in Excel Solver – Optimizing the Loading of a Limited Compartment
- Optimizing a Bond Portfolio With Excel Solver
- Travelling Salesman Problem in Excel Solver – Finding the Shortest Path To Reach All Customers

- Chi-Square Population Variance Test in Excel
- Analyzing Data With Pivot Tables
- SEO Functions in Excel
- Time Series Analysis in Excel
- VLOOKUP

## No comments:

## Post a Comment