Download as pdf or txt
Download as pdf or txt
You are on page 1of 32

Non

parametric
tests

– By:

– Aya Abdullah Elshafie and revised by Youssef


Waheeb
OBJECTIVES:

 What are non parametric tests


 When to use non parametric tests
 Popular nonparametric Tests
Parametric Test

– If the information about the population is completely known by


means of its parameters ( mean , standard deviation ) then
statistical test is called parametric test
• The general assumptions of parametric tests are
 The populations are normally distributed (follow normal
distribution curve).
 The data is in interval or ratio scale (quantitive continuous )
E.g: t- test, f-test, z-test, ANOVA
Non parametric tests :

They are statistical tests that are also known as distribution-free tests
because they are based on fewer assumptions (e.g., they do not
assume that the outcome is approximately normally distributed).
• Non-parametric tests can be applied when:
 Data don’t follow any specific distribution
 Data measured on any scale
Advantages:

 Used With All Scales


 Easier to Compute
 Need not involve population parameters
 Results may be as exact as parametric procedures
Disadvantages:

 May waste information


 Difficult to compute by hand for large samples
Sign test
Testing for Distribution
Normality
Test :

Kolmogorov-Smirnov (K-S) test (sample size is ≥50 ) or Shapiro-Wilk test (if sample
size is <50) .
(Sig. value >0.05 indicates normality of the distribution)
Graph:
histogram ,Q-Q plot and p-p plot .
Popular Nonparametric Tests

 Chi Square test


 Wilcoxon Signed-Ranks Test
 Mann–Whitney U or Wilcoxon rank sum test
 The Kruskal -Wallis or H test
 The Spearman rank correlation test
 Logistic regression
Wilcoxon signed-rank test

– The Wilcoxon signed-rank test is a nonparametric statistical


hypothesis test used to compare two related samples, matched
samples, or repeated measurements on a single sample

– This is the non-parametric analogue to the paired t -test


Wilcoxon signed-rank test

– A. State the null hypothesis


Ho: The two samples are identical
– b. State the alternative hypothesis
Ha: The two samples are not identical
– c. Obtain the differences between paired values in the two samples/treatments.
– d. Rank the absolute values of these differences, giving the smallest difference
rank 1.
– e. Assign to each rank the sign of the observed differences.
– f. Get the sum of the positive ranks and the sum of the negative ranks.
Example:
Patient Score (1) Score (2)
1 60 40
2 50 42
– In order to investigate the 3 65 41
difference in BP score in patient 4 70 58
who received anti hypertensive 5 60 34
drug A the scores were as the 6 65 71
following: 7 70 52
8 50 40
9 65 43
10 60 50
11 60 52
12 59 63
13 70 72
14 70 52
Example :

– The 14 differences in BP among hypertensive patients after giving


drug A were:
– -20, -8, -14, -12, -26, +6, -18, -10, -12, -10, -8, +4, +2, -18
– The statistic T is found by calculating the sum of the positive
ranks, and the sum of the negative ranks.
– The smaller of the two values is considered.
Mann–Whitney U or Wilcoxon
rank sum test
– It is a nonparametric counterpart of the t test used to compare the means of
two independent populations.
– • The hypotheses being tested with the Mann-Whitney U test are as follows:
– H0: The two populations are identical.
– Ha: The two populations are not identical.
Mann–Whitney U
Mann–Whitney U example:

– 10 dieters following Atkin’s diet vs. 10 dieters following Jenny Craig


diet
• Hypothetical RESULTS:
• Atkin’s group loses an average of 34.5 kg.
• J. Craig group loses an average of 18.5 kg.
• Conclusion: Atkin’s is better?
Mann–Whitney U example

– When individual data is seen


– • Atkin’s, change in weight (kg):
+4, +3, 0, -3, -4, -5, -11, -14, -15, -30
– • J. Craig, change in weight (kg):
-8, -10, -12, -16, -18, -20, -21, -24, -26, -30
Mann–Whitney U example:

– Sum of Atkin’s ranks:


1+ 2 + 3 + 4 + 5 + 6 + 9 + 11+ 12+ 20=73
– Sum of Jenny Craig’s ranks:
7 + 8 +10+ 13+ 14+ 15+16+ 17+ 18+19=137
– Jenny Craig clearly ranked higher.
– Calculated U value (18) < table value (27), Null hypothesis is
– rejected.
Spss output
Kruskal-Wallis test

 Non parametric alternative to the one-way ANOVA F-test


 Like the Mann-Whitney/Wilcoxon Rank Sum Test we use the sum of the ranks
assigned to each group when considering the combined sample as the basis for
our test statistic.
 The Kruskal-Wallis test is based on the assumption that the groups are
independent and that individual items are selected randomly.
 The hypotheses tested by the Kruskal-Wallis test follow.
 H0 :The populations are identical.
 Ha: At least one of the populations is different.
Kruskal-Wallis test

– It is calculated according to the following equation


Spearman’s Rank Correlation
Coefficient
Measures correlation between ranks
Nonparametric equivalent of the Pearson correlation.
Values range from –1 to +1
Spss output:
– Interpretation
– In a sample of 66 children with CP, there is no significant
relationship between age of the children and systolic BP,
r = 0.02, p = 0.90 .
Transformation

• If noticed that the data violate assumptions:


o Not normally distributed
o Variance of groups are unequal
• Transform the data into another scale
1 -logarithm

• Transform the data into its logarithms


• Logarithms pulls down high values more than low values
& and restore the distribution to normal
2- Square root

• If t test shows that means of two groups are


unequal, then variance is also unequal
• Then, replace the counts by their square roots
• Square roots stops the variance being controlled
by means
Summary Table
Objective Measureme Transformation
nt
Alter skewed distribution Continuous Logarithmic
to normality Log X
Ensure equality of Counts Square root √
variance X
Ensure equality of Proportions sin-1 √ p
variance
Thank you

You might also like