0% found this document useful (0 votes)
7 views16 pages

Lecture NP - Handout

Nonparametric tests are statistical methods that make fewer assumptions about data distribution and are applicable in a wider range of scenarios, utilizing ranks rather than actual values. Key nonparametric tests include the Wilcoxon Signed Rank Test for paired samples, Mann-Whitney test for independent groups, and the Kruskal-Wallis test for multiple groups, all of which assess differences in medians. These tests are particularly useful when data do not meet the assumptions required for parametric tests, such as normality.

Uploaded by

terefe degaga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views16 pages

Lecture NP - Handout

Nonparametric tests are statistical methods that make fewer assumptions about data distribution and are applicable in a wider range of scenarios, utilizing ranks rather than actual values. Key nonparametric tests include the Wilcoxon Signed Rank Test for paired samples, Mann-Whitney test for independent groups, and the Kruskal-Wallis test for multiple groups, all of which assess differences in medians. These tests are particularly useful when data do not meet the assumptions required for parametric tests, such as normality.

Uploaded by

terefe degaga
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

Nonparametric Tests

Nonparametric methods generally make fewer assumptions about the probability model and are,
therefore, applicable in a broader range of problems.These tests use the median and do not
assume anything about distribution, in other words they are ‘distribution free’ statistical tests
(1).Mathematically, value is ignored (i.e. the magnitude of differences are not compared)Instead,
data is analysed simply according to rank.
These data are REE (resting energy expenditure, kcal/day) for patients with cytic fibrosis and
healthy individuals matched on age, sex, height and weight.
Nonparametric tests were developed for these situations where fewer assumptions have to be
madeSometimes called Distribution-free tests,butstill have assumptions but are less strict.They
can be applied to Normal data even though parametric tests have greater power if assumptions
met(2).
Ranks:are orders of values according to their ascending order, and are the practical differences
between parametric and nonparametricin that the nonparametric methods use the ranks of values
rather than the actual values(3).
Example
1,2,3,4,5, 7,13,22,38,45 - actual
1,2,3,4,5,6, 7, 8, 9,10 - rank
Median: The median is the value above and below which 50% of the data lie, if the data is
ranked in order, it is the middle value. While, in symmetric distributions the mean and median
are the same, in skewed distributions, median is more appropriate(4).
For example if we see the following data for blood pressure, the median value is 140 means 50%
of the records are below 140 and 50% of the records are above 140.
BPs: 135, 138, 140, 140, 141, 142, 143
Median=140
T-test, which is the parametric test, is used to test whether the mean of a sample is significantly
different from a hypothesised sample meanT-test relies on the sample being drawn from a
normally distributed population(5).
If sample is not normal then we use the Wilcoxon Signed Rank Test, which are analogues to t-
test as an alternative.

1
1. Wilcoxon Signed Rank Test
Wilcoxon Signed Rank Test is a nonparametric test relating to the median as measure of
central tendency. In this test, the ranks of the absolute differences between the data and the
hypothesised median are calculated, then the ranks for the negative and the positive
differences are summed separately (W- and W+ resp.)The minimum of these is the test
statistic, W(1).
Paired samples t-test
The disadvantage of paired sample t-test is that, it assumes data are a random sample from a
population which is Normally distributed and its advantage is ituses all detail of the available
data, and if the data are normally distributed it is the most powerful test(5).
The Wilcoxon Signed Rank Test for Paired Comparisons
Disadvantage of this test is, it only considers the sign (+ or -) of any change is analysed whereas
it’s aadvantage is that it is easy to carry out and data can be analysed from any distribution or
population(4).
If we have the same sample measured on two separate occasions then this is a paired
comparison,but two independent samples is not a paired comparison.
1.1.The Wilcoxon Signed Rank Test for Paired Comparisons
We will use similar calculation to the Wilcoxon Signed Rank test, only the differences in the
paired results are ranked.
Example using SPSS:
A group of 10 patients with chronic anxiety receive sessions of cognitive therapy. Quality of Life
scores are measured before and after therapy.
Wilcoxon Signed Rank Test example

2
QoL Score

Before After Diff Rank -/+

6 9 3 5.5 +

5 12 7 10 +

3 9 6 9 +

4 9 5 8 +

2 3 1 4 +

1 1 0 3 tied

3 2 -1 2 -

8 12 4 7 +

6 9 3 5.5 +

12 10 -2 1 -
W- = 2
W+ = 7
1 tied
Analyze -> Nonparametric Tests -> Legacy Dialoge -> 2 related Samples

3
Ranks

N Mean Rank Sum of Ranks


a
Negative Ranks 2 2.25 4.50
b
Positive Ranks 7 5.79 40.50
QOLafter - QOLbefore c
Ties 1

Total 10

a. QOLafter<QOLbefore
b. QOLafter>QOLbefore
c. QOLafter = QOLbefore

The mean rank (i.e., the "Mean Rank" column in the Ranks table) of the Quality of life for before
after treatment can be used to compare the effect of the treatment therapy before and after
treatment.

a
Test Statistics

QOLafter -
QOLbefore
b
Z -2.136
Asymp. Sig. (2-tailed) .033

a. Wilcoxon Signed Ranks Test


b. Based on negative ranks.

4
Ten participants were recruited to understand the effect cognitive therapyfor the application of
anxiety minimization as measured by quality of life score before and after the treatment of
cognitive therapy. A Wilcoxon signed-rank test determined that there was a statistically
significant median decrease in quality of life score (-2.136score) when subjects take the
cognitive therapy as compared to before taking it, W = -2.136, p< .05.
2. Mann-Whitney test Ξ Wilcoxon Rank Sum
Mann-Whitney test is used when we want to compare two unrelated or independent
groups(6),and its analogues test for parametric data is the unpaired (independent) samples t-test.
Example
The following data shows the number of alcohol units per week collected in a survey:
Men (n=13): 0,0,1,5,10,30,45,5,5,1,0,0,0
Women (n=14): 0,0,0,0,1,5,4,1,0,0,3,20,0,0
Is the amount greater in men compared to women?

Mann-Whitney Test

Ranks

Gender N Mean Rank Sum of Ranks

male 13 15.96 207.50

Alcohol female 14 12.18 170.50

Total 27

a
Test Statistics

Alcohol

Mann-Whitney U 65.500
Wilcoxon W 170.500

5
Z -1.317
Asymp. Sig. (2-tailed) .188
b
Exact Sig. [2*(1-tailed Sig.)] .220

a. Grouping Variable: Gender


b. Not corrected for ties.

3. SIGN TEST
The paired-samples sign test, typically referred to as just the sign test, is used to determine
whether there is a median difference between paired or matched observations(4). The test can be
considered as an alternative to the dependent t-test (also called the paired-samples t-test) or
Wilcoxon signed-rank testwhen the distribution of differences between paired observations is
neither normal nor symmetrical, respectively. Most commonly, participants are tested at two
time points or under two different conditions on the same continuous dependent variable.
However, two different groups of participants are possible as part of a "matched-pairs" study
design.
Most importantly, Sign Test is used to test claims involving matched pairs of data, involving
nominal data, about the median of a single population. The requirements for this test are same
issues as to sampling as before (random, representative)

A researcher wants to test a new formula for a sports drink that improves running performance.
Instead of a regular, carbohydrate-only drink, this new sports drink contains a new carbohydrate-
protein mixture. The researcher would like to know whether this new carbohydrate-protein drink
leads to a difference in performance compared to the carbohydrate-only sports drink. To do this,
the researcher recruited 20 participants who each performed two trials in which they had to run
as far as possible in two hours on a treadmill. In one of the trials they drank the carbohydrate-
only drink and in the other trial they drank the carbohydrate-protein drink. The order of the trials
was counterbalanced and the distance they ran in both trials was
recorded.https://statistics.laerd.com/spss-tutorials/sign-test-using-spss-statistics.php

Therefore, for a sign test, you will have two variables. In this example, these are: (1) carb, which
is the distance run (in km) in two hours for the carbohydrate-only trial; and (2) carb_protein,
which is the distance run (in km) in two hours for the carbohydrate-protein trial. The researcher
would like to determine whether there was a difference in the distance run between the two trials,

6
and therefore, if there is a performance difference between the two different sports drinks. In
variable terms, the researcher wants to know if the median of the differences between the carb
and carb_protein scores is 0 (zero).

Now let us do the spss procedure to run the sign test as below:

Click Analyze >Nonparametric Tests >Legacy Dialogs > 2 Related Samples

Then transfer the variables carb and carb_protein into the Test Pairs: box by highlighting both

variables) and clicking the button.

You will end up with a screen similar to the one below:

7
Click on ok.

SPSS Statistics Output of the Sign Test

Frequencies Table: Positives, Negatives and Ties

We should evaluate the number of positive, negative and tied paired differences to understand
each participant's (relative) response to the two trials. These paired differences will also give you
an indication of what to expect for the result of the sign test (remembering that the test is based
on the signed differences). This information is provided in the Frequencies table, as shown
below:

Sign Test
Frequencies

N
a
Negative Differences 3
b
Positive Differences 16
carb_protein - carb c
Ties 1

Total 20

a. carb_protein< carb
b. carb_protein> carb
c. carb_protein = carb

You can see how many participants decreased (the "Negative Differences" row), improved (the
"Positive Differences" row) or witnessed no change (the "Ties" row) in their performance in the
carbohydrate-protein trial (i.e., carb_protein) compared to the carbohydrate-only trial (i.e., carb).

Test Statistics Table

We can now move on to discovering whether the median of the difference in distance ran
between the trials is statistically significant using these signed differences. The result of the sign
test is found in the Test Statistics table, as shown below:

a
Test Statistics

carb_protein -
carb
b
Exact Sig. (2-tailed) .004

8
a. Sign Test
b. Binomial distribution used.
The statistical significance (i.e., p-value) of the sign test is found in the "Exact Sig. (2-tailed)"
row of the table above. However, if you had more than a total of 25 positive and negative
differences, an "Asymp. Sig. (2-sided test)" row will be displayed instead. We explain the
differences between the two ways that the p-value is calculated in our enhanced sign test guide.

4. Krukal Test
The Kruskal-Wallis H test, sometimes also called the one-way ANOVA on ranks, is a rank-based
nonparametric test that can be used to determine if there are statistically significant differences
between two or more groups of an independent variable on a continuous or ordinal dependent
variable(1). It is considered the nonparametric alternative to the one-way ANOVA, and an
extension of theMann-Whitney U test to allow the comparison of more than two independent
groups”.

Example
An experiment was carried out to see if alcohol or coffee affects driving reaction times. There were
three different groups of participants; 10 drinking water, 10 drinking beer containing two units of
alcohol and 10 drinking coffee. Reaction time on a driving simulation was measured for each
participant.
Just we will follow some steps to carry out the Kruskal-Walis test for the above experiment on
reaction time.

Click Analyze >Nonparametric Tests >Legacy Dialogs >K Independent Samples

9
"Tests for Several Independent Samples" dialogue box, as shown below:

Transfer the dependent variable, ReatTime , into the Test Variable List: box and the
independent variable, Method, into the Grouping Variable: box. we can transfer these
variables by either drag-and-dropping each variable into the appropriate boxes or by

highlighting (i.e., clicking on) each variable and using the appropriate button. You
will end up with a screen similar to the one below:

Click the button. You will be presented with the "Several Independent Samples:
Define Range" dialogue box, as shown below:

10
Enter "1" into the Minimum: box and "3" into the Maximum box. These values represent
the range of codes we gave the groups of the independent variable, Method (i.e., Water
was coded "1" through to Alcohol which was coded "3"). You will end up with a screen
similar to below:

Then you will get the following outputs

Descriptive Statistics

N Mean Std. Deviation Minimum Maximum

ReactTime 30 1.6500 .85124 .37 3.47


Method 30 2.0000 .83045 1.00 3.00

Kruskal-Wallis Test

Ranks

Method N Mean Rank

Water 10 7.45

Coffee 10 15.70
ReactTime
Alcohol 10 23.35

Total 30

a,b
Test Statistics

ReactTime

Chi-Square 16.322
df 2
Asymp. Sig. .000

a. Kruskal Wallis Test


b. Grouping Variable:
Method
The mean rank (i.e., the "Mean Rank" column in the Ranks table) of the ReactTIme for each
method (Water, Coffee and Alcohol) group can be used to compare the effect of the different the

11
reaction time. Whether these reaction method groups have different reaction time can be
assessed using the Test Statistics table which presents the result of the Kruskal-Wallis H test.
That is, the chi-squared statistic (the "Chi-Square" row), the degrees of freedom (the "df" row)
of the test and the statistical significance of the test (the "Asymp. Sig." row).
A Kruskal-Wallis H test showed that there was a statistically significant difference in reaction
time between the different methods, χ2(2) = 16.322, p = 0.000, with a mean rank reaction time of
7.45for water, 15.70 for Coffee and 23.35 for Alcohol.

5. Fried man Test

The Friedman test is the non-parametric alternative to the one-way ANOVA with repeated
measures. It is used to test for differences between groups when the dependent variable being
measured is ordinal(3). It can also be used for continuous data that has violated the assumptions
necessary to run the one-way ANOVA with repeated measures (e.g., data that has marked
deviations from normality).

Example

A researcher wants to examine whether music has an effect on the perceived psychological effort
required to perform an exercise session. The dependent variable is "perceived effort to perform
exercise" and the independent variable is "music type", which consists of three groups: "no
music", "classical music" and "dance music". To test whether music has an effect on the
perceived psychological effort required to perform an exercise session, the researcher recruited
12 runners who each ran three times on a treadmill for 30 minutes. For consistency, the treadmill
speed was the same for all three runs. In a random order, each subject ran: (a) listening to no
music at all; (b) listening to classical music; and (c) listening to dance music. At the end of each
run, subjects were asked to record how hard the running session felt on a scale of 1 to 10, with 1
being easy and 10 extremely hard. A Friedman test was then carried out to see if there were
differences in perceived effort based on music type.

Source: shttps://statistics.laerd.com/spss-tutorials/friedman-test-using-spss-statistics.php

12
Let us enter the three variables, which we have labelled "none", "classical" and "dance" to
represent the subjects' perceived effort when running based on the three different types of music.

Now, let us run the Friedman test using SPSS.

Analyze >Nonparametric Tests >Legacy Dialogs > K Related Samples

Transfer the dependent variables none, classical and dance to the Test Variables: box by using
the button or by dragging-and-dropping the variables into the box. You will end up with the
following screen:

13
Descriptive Statistics

N Percentiles

25th 50th (Median) 75th

none 12 7.0000 7.5000 8.0000


classical 12 6.2500 7.5000 8.0000
dance 12 6.0000 6.5000 7.0000
This is a very useful table because it can be used to present descriptive statistics in your results
section for each of the time points or conditions (depending on your study design) for your
dependent variable. This usefulness will be presented in the "Reporting the Output" section later.

Friedman Test

Ranks

Mean Rank

none 2.38
classical 2.17
dance 1.46
The Friedman test compares the mean ranks between the related groups and indicates how the
groups differed, and it is included for this reason. However, you are not very likely to actually
report these values in your results section, but most likely will report the median value for each
related group.
The Test Statistics table informs you of the actual result of the Friedman test, and whether there
was an overall statistically significant difference between the mean ranks of your related groups.
For the example used in this guide, the table looks as follows:
a
Test Statistics

N 12
Chi-Square 7.600
df 2
Asymp. Sig. .022

a. Friedman Test

The table above provides the test statistic (χ2) value ("Chi-square"), degrees of freedom ("df")
and the significance level ("Asymp. Sig."), which is all we need to report the result of the
Friedman test. From our example, we can see that there is an overall statistically significant
difference between the mean ranks of the related groups. It is important to note that the Friedman

14
test is an omnibus test, like its parametric alternative; that is, it tells you whether there are overall
differences, but does not pinpoint which groups in particular differ from each other. To do this
you need to run post hoc tests, which will be discussed after the next section.

There was a statistically significant difference in perceived effort depending on which type of
music was listened to whilst running, χ2(2) = 7.600, p = 0.022.

15
References

1. Bagdonavicius V, Kruopis J, Nikulin MS. Nonparametric tests for complete data: John Wiley &
Sons; 2013.
2. Corder G, Foreman D. Nonparametric statistics for non-statisticians: a step-by-step approach.
2009. NY: Wiley CrossRef Google Scholar.
3. Hollander M, Wolfe DA, Chicken E. Nonparametric statistical methods: John Wiley & Sons; 2013.
4. Linebach JA, Tesch BP, Kovacsiss LM. Nonparametric statistics for applied research: Springer;
2014.
5. Rosner B. Fundamentals of biostatistics: Nelson Education; 2015.
6. Ridgeway G. All of Nonparametric Statistics. Taylor & Francis; 2007.

16

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy