2. Outline
• Differentiate nonparametric from parametric statistics
• Discuss the advantages and disadvantages of
nonparametric statistics
• Commonly used nonparametric test procedures
• Perform Hypothesis tests using Nonparametric
procedures
3. Levels of measurement
Ordinal – Socio-Economic
Status (SES), pain level
Ratio –Kelvin Scale,
Weight, height, pulse rate
Interval – Celsius or
Fahrenheit scale
Nominal – Gender, race,
blood group
4. Parametric Test Procedures
• Parameter: A numerical quantity which characterizes a
given population or some part of it.
• Involve Population Parameters
Example: Population Mean, median etc
• Have Stringent Assumptions
Example: Normal Distribution
• Require Interval Scale or Ratio Scale
• Examples: z-Test, t-Test, ANOVA
5. Are most variables normally distributed?
For example,
Is income distributed normally in the population?
Incidence rates (rare diseases) are not normally
distributed.
Number of car accidents is also not normally
distributed.
Duration of illness is not normally distributed.
6. Nonparametric Test Procedures
• Do Not Involve Population Parameters
• No Stringent Distribution Assumptions
“Distribution-free”
• Data Measured on Any Scale
– Ratio or Interval
– Ordinal
• Example: Good-Better-Best
– Nominal
• Example: Male-Female
7. When our data is normally distributed, the mean is
equal to the median and we use the mean as our
measure of central tendency.
However, if our data is skewed, then the median is a
much better measure of center.
Therefore, just like the Z, t and F tests made inferences
about the population mean(s), nonparametric tests
make inferences about the population
median(s)/distribution.
8. Merits and Demerits
1. Used with all scales
2. Easier to Compute
3. Make Fewer Assumptions
4. Need not involve population parameters
5. May waste information
Parametric model more efficient if data permits.
6. Difficult to compute by hand for large samples
9. Commonly used NP tests
Some of the commonly used non parametric tests are
Chi square test
McNemar’s test
Mann-Whitney U test (Wilcoxon Rank-sum test)
Wilcoxon Signed Rank test
Krushkal-Wallis test (H test)
Friedman ANOVA
Spearman’s Rank correlation
10. Parametric & Non-parametric tests
AIM Parametric t-tests Non parametric equivalent
Compare one sample to a
hypothetical value
One-sample t-test
Compare 2 independent
sample means
Independent samples t-test
Compare 2 paired sample
means
Paired samples t-test
Compare more than 2
sample means
ANOVA
Correlation between 2
variables
Pearson’s Correlation
Compare more than 2
samples - repeated
Repeated measures
ANOVA
Sign test
Mann Whitney U test
Wilcoxon Signed rank test
Kruskal-Wallis test
Friedman test
Spearmans Rank Correlation
11. Sign test
Can be used as a non-parametric alternative to
single sample t test.
• The null hypothesis for the sign test specifies the
population median, M0
Ho: The median value of the population is equal to a stated
(Hypothesized) value
0
0 : m
m
H
0
1
0
1
0
1 :
:
: m
m
H
or
m
m
H
or
m
m
H
12. • The data doesn’t follow normal distribution
• Mean is not representative of the values since the
values are skewed to right or left
• Data transformation doesn’t make the values normal
13. Procedure
• State the hypothesis value to be tested
• Calculate Xi − m0 for i = 1, 2, ..., n.
• Define S− = the number of negative signs obtained upon
calculating Xi − m0 for i = 1, 2, ..., n.
• Define S+ = the number of positive signs obtained upon
calculating Xi − m0 for i = 1, 2, ..., n.
14. • Count the number of values in the dataset greater than
stated value. This test statistic is referred to as S+.
• Count the number of values in the dataset less the
stated value. This test statistic is referred to as S-
• If S+ is less than S-, then we reject the null hypothesis
15. Example
The following values are the ages of students in a
Ph.D. program. Determine if the median is less than 40
42, 22, 24, 25, 32, 34, 38, 40, 40, 44, 25, 26, 29
S+ = 2 and S - = 9
(note that 2 observations are exactly 40 which should not
be counted)
Hence, we fail to accept Ho; the median age of the group is
not equal to 40
16. Mann - Whitney U test
Mann-Whitney U Test is used in place of the two sample
t-test when the normality assumption is questionable.
Because the samples are independent, they can be of
different sizes.
This test can also be applied when the observations in a
sample of data are ranks, i.e., ordinal data rather than
direct measurements.
Assumptions: Independent, Random Samples
Populations Are Continuous
18. Mann Whitney U-test example …….
Calculate U values for both samples, U1, U2.
Calculate U = min(U1, U2)
Reject H0 if U is less than the Ucrit
Null hypothesis: both samples come from the same
underlying distribution
19. Mann Whitney U-test example
Width of leaf (cms)
Sunlight 4.8 5.1 5.5 4.1 5.3 4.5 5.1
Shade 5.5 6.3 7.2 6.8 5.5 5.9 5.5
Wi
dth
Sunlight Shade
4.1 4.5 4.8 5.1 5.1 5.3 5.5 5.5 5.5 5.5 6.3 6.5 6.8 7.2
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4.5 4.5 6 8.5 8.5 8.5 8.5 11 12 13 14
Rank total R1= 29.5 Rank total R2 = 75.5
Arrange all the observations into a single ranked
series i.e., without regard to which sample they are in.
Rank them.
20. • The following data shows the age at diagnosis of type II
diabetes in young adults. Is the age at diagnosis
different for males and females?
– Males: 19 22 16 29 24
– Females: 20 11 17 12
• Arrange in order of magnitude
Age 11 12 16 17 19 20 22 24 29
Rank 1 2 3 4 5 6 7 8 9
Group 2 2 1 2 1 2 1 1 1
21. Example – t-test, M-W U test
• Objectives –
• to compare the anxiety levels across gender.
• to compare pre and post anxiety levels
Study to assess the effectiveness of intervention
in reducing anxiety
23. Results of t-test
Group Statistics
11 17.64 5.390
28 15.57 3.605
sex
1 M
2 F
SAAS.1
N Mean SD
Independent Samples Test
1.394 37 .172
Equal variances
assumed
SAAS.1
t df
Sig.
(2-tailed)
t-test for Equality of Means
24. Results of M W U-test
Ranks
11 26.05 286.50
28 17.63 493.50
sex
1 M
2 F
SAAS.1
N
Mean
Rank
Sum of
Ranks
Test Statisticsb
87.500
.037
Mann-Whitney U
Asymp. Sig. (2-tailed)
SAAS.1
Grouping Variable: sex
b.
26. Wilcoxon Signed rank test
The Wilcoxon signed-rank test is a non-parametric
statistical hypothesis test used when comparing 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).
H0: the median difference is zero
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 cannot be assumed to be
normally distributed
28. Calculate the rank sum T– of the negative differences
and the rank sum T+ of the positive differences.
Note: Differences equal to 0 are eliminated, and the
number n of differences is reduced accordingly.
Test statistic is T = smaller of T– or T+.
Rejection region: T ≤ T0
29. • 8 children with autism have enrolled in the study and
the amount of time that each child is engaged in
repetitive behavior during three hour observation
periods are measured both before treatment and then
again after taking the new medication for a period of 1
week. The data are shown below.
Child 1 2 3 4 5 6 7 8
Before
Treatment 85 70 40 65 80 75 55 20
After 1 Week
of Treatment 75 50 50 40 20 65 40 25
30. • First, we compute difference scores for each child.
• H0: The median difference is zero
• T+ = 32 and T- = 4.
Child
Before
Treatment
After 1 Week of
Treatment Difference
1 85 75 10
2 70 50 20
3 40 50 -10
4 65 40 25
5 80 20 60
6 75 65 10
7 55 40 15
8 20 25 -5
Ordered Absolute
Values of
Differences Ranks
-5 1
10 3
-10 3
10 3
15 5
20 6
25 7
60 8
Signed Ranks
-1
3
-3
3
5
6
7
8
31. Paired t-test – example
Paired Samples Statistics
16.15 39 4.215
8.87 39 4.808
SAAS.1
SAAS.2
Pair
1
Mean N SD
Paired Samples Test
8.778 38 .001
SAAS.1 - SAAS.2
Pair 1
t df
Sig.
(2-tailed)
32. WSR test – example
Ranks
34 19.44 661.00
2 2.50 5.00
3
39
Negative Ranks
Positive Ranks
Ties
Total
SAAS.2 - SAAS.1
N
Mean
Rank
Sum of
Ranks
Test Statisticsb
-5.157a
.001
Z
Asymp. Sig. (2-tailed)
SAAS.2 -
SAAS.1
Based on positive ranks.
a.
Wilcoxon Signed Ranks Test
b.
33. Two-sample paired sign test
Assumptions:
The paired differences are independent.
Each paired difference comes from a continuous
distribution with the same median.
Test statistic for the paired sign test is based only on
the sign of the paired differences.
Note that it is not assumed that the two samples are
independent of each other. In fact, they should be related
to each other such that they create pairs of data points.
34. Parametric & non-parametric tests
AIM Parametric t-tests Non parametric
Compare one sample to a hypothetical value One-sample t-test Sign test
Compare 2 independent sample means Student’s t-test Mann Whitney U
Compare 2 paired sample means Paired t-test Wilcoxon Signed rank
Compare more than 2 sample means ANOVA Kruskal-Wallis test
Compare more than 2 samples - repeated Repeated measures
ANOVA
Friedman test
Assesses the linear relation between two
variables.
Pearson’s correlation
coefficient.
Spearman rank
correlation, Kendall Tau
36. Kruskal-Wallis H-Test for Comparing k
Probability Distributions
H0: The k probability distributions are identical
Ha: At least one of the k probability distributions differ in location.
Test statistic:
2
12
3 1
1
j
j
R
H n
n n n
Rejection region:
H >
2
with (k – 1) degrees of freedom
37. Kruskal-Wallis H-Test Procedure
1. Assign ranks, Ri , to the n combined observations
• Smallest value = 1; largest value = n
• Average ties
2. Sum ranks for each group
3. Compute test statistic
2
12
3 1
1
j
j
R
H n
n n n
Squared total of
each group
40. Descriptives
14 207.36 17.248
8 188.13 26.920
6 189.83 20.721
28
14 88.57 12.439
8 73.88 13.098
6 84.50 13.531
28
1
2
3 +
Total
1
2
3 +
Total
Parental.
attachment
Self.
Esteem
N Mean SD
ANOVA
ANOVA
2405.76 2 1202.9 2.71 .086
11086.9 25 443.48
13492.7 27
1107.20 2 553.60 3.35 .051
4127.80 25 165.11
5235.00 27
Between Groups
Within Groups
Total
Between Groups
Within Groups
Total
Parental.
attachment
Self.Esteem
Sum of
Squares df
Mean
Square F Sig.
41. Kruskal Wallis test
Ranks
14 17.68
8 11.38
6 11.25
28
14 17.43
8 9.25
6 14.67
28
sibs.
new
1
2
3 +
Total
1
2
3 +
Total
Parental.attachment
Self.Esteem
N
Mean
Rank
Test Statisticsa,b
4.186 5.049
2 2
.123 .080
Chi-Square
df
Asymp. Sig.
Parental.
attachment
Self.
Esteem
Kruskal Wallis Test
a.
Grouping Variable: sibs.new
b.
42. Parametric & non-parametric tests
AIM Non parametric tests - categorical
outcomes
Compare 2
unpaired
samples
Fisher's test
(chi-square for large samples)
Compare 2
paired samples
McNemar’s test
43. Why not use NP tests all the time?
Parametric tests are often preferred because:
They are more robust.
They discard a lot of information
Parametric and non-parametric tests often
address two different types of questions.
Since nonparametric tests require fewer assumptions
and can be used with a broader range of data types,
this question arises.