The Real Statistics T Tests and Non-parametric Equivalents data analysis tool supports the Mann-Whitney and Wilcoxon Signed-Ranks tests, while the One Factor ANOVA data analysis tool supports the Kruskal-Wallis non-parametric test. We now describe another data analysis tool which provides access to a number of non-parametric tests.
Real Statistics Data Analysis Tool: The Real Statistics Resource Pack provides the Non-parametric Tests data analysis tool which supports the following tests:
- Friedman’s Test
- One-Sample Runs Test
- Two-Sample Runs Test
- Two Sample Kolmogorov-Smirnov Test
- Cochran’s Q Test
- Moods’ Median Test
- Mann-Whitney Test
- Wilcoxon Signed-Ranks Test
- Kruskal-Wallis Test
We now show how to perform Example 1 of Two Sample Kolmogorov-Smirnov Test using the Other Non-parametric Tests data analysis tool.
Press Ctrl-m and double click on the Other Non-parametric Tests from the menu. Fill in the dialog box that appears as shown in Figure 1.
Figure 1 – Non-parametric Tests data analysis tool
Upon clicking on the OK button the output shown in range E3:F11 of Figure 2 appears.
Figure 2 – Two Sample KS Test
In this example the input data (range A3:C13) is in the form of a frequency table. The data analysis tool can also be used with data in raw format using the Kolmogorov-Smirnov (raw) option from Figure 1.
We next repeat Example 2 of McNemar’s Test using the Non-parametric Tests data analysis tool. In this example 1,000 people were surveyed with 705 in favor and 295 against a motion. After they listened to a debate 73 people changed their vote from against to in favor and 115 changed their vote from in favor to against. We want to test whether the debate affected peoples’ opinions.
We code the input data as shown in range A3:C8 of Figure 3, where 1 means in favor of the motion and 0 means against the motion.
Figure 3 – McNemar’s Test
We perform the test by pressing Ctrl-m and selecting the Non-parametric Tests data analysis tool from the menu. This time when the dialog shown in Figure 1 appears we insert A3:C7 in the Input Range (see Figure 3) and choose the Cochran’s Q Test (freq) option. The output appears on the right side of Figure 3.
The output is similar to that shown in Figure 1 of McNemar’s Test. Note that this test includes a .5 continuity correction factor. To get the result of Cochran’s Q Test without using the correction factor, you need to manually change the formula in cell F7 from =COCHRAN(A4:C7) to =COCHRAN(A4:C7,,FALSE), and the values in cells F7 and F9 change to 9.382979 and 0.00219.
Observation: To access the Mann-Whitney or Wilcoxon Signed Ranks test simply choose the appropriate option from the dialog box shown in Figure 1 and press the OK button (don’t fill in any other fields). You will then be redirected to the T Test and Non-parametric Equivalents data analysis tool, where you can further describe the test that you want.
Similarly, to access the Kruskal-Wallis test, choose this option and press the OK button without filling in any other fields and you will be redirected to the Anova: Single Factor data analysis tool to complete the test.
Observation: When choosing the Two-Sample Runs Test with Ties option, the number of distinct columns in the output is not completely determined. The software will assume there are 5 columns (plus one column for labels). If this is more than necessary then any unused columns will be filled with the values #N/A. If 5 isn’t enough, you will need to manually expand the range in the output which contains the array formula of form =RUNS2TEST(R1, R2, TRUE, 100) and press Ctrl-Shft-Enter. See Two-Sample Runs Test for more information about this formula.
Similarly if you want to use a number of iterations different from 100, you will need to highlight the =RUNS2TEST(R1, R2, TRUE, 100) formula in the formula bar, change the number of iterations and press Ctrl-Shft-Enter.