0% found this document useful (0 votes)
55 views

Non Parametric Tests

This document discusses non-parametric tests and their assumptions and applications. Some key points: 1) Non-parametric tests do not assume a specific data distribution and make no assumptions about the population. They can be used when data is not normally distributed. 2) Common non-parametric tests include the chi-square test, McNemar test, sign test, Wilcoxon signed-ranks test, Mann-Whitney U test, Kruskal-Wallis test, and Spearman's rank correlation test. 3) The chi-square test is one of the most widely used non-parametric tests. It can test for associations between variables or compare observed and expected frequencies.

Uploaded by

Varun bharathi
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)
55 views

Non Parametric Tests

This document discusses non-parametric tests and their assumptions and applications. Some key points: 1) Non-parametric tests do not assume a specific data distribution and make no assumptions about the population. They can be used when data is not normally distributed. 2) Common non-parametric tests include the chi-square test, McNemar test, sign test, Wilcoxon signed-ranks test, Mann-Whitney U test, Kruskal-Wallis test, and Spearman's rank correlation test. 3) The chi-square test is one of the most widely used non-parametric tests. It can test for associations between variables or compare observed and expected frequencies.

Uploaded by

Varun bharathi
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/ 37

NON – PARAMETRIC TESTS

G. MERLIN
BIOSTATISTICIAN
Assumptions
• Non-parametric tests can be applied when:
– Data does not follow any specific distribution
and no assumptions about the population are made

– Data measured on any scale


Testing normality
• Normality: This assumption is only broken if there are large
and obvious departures from normality
• This can be checked by
✔ Inspecting a histogram
✔ Skewness and kurtosis ( Kurtosis describes the peak of the curve
s
Skewness describes the ymmetry of the curve.)

✔ Kolmogorov-Smirnov (K-S) test (sample size is ≥50 )


✔ Shapiro-Wilk test (if sample size is <50)
(Sig. value >0.05 indicates normality of the distribution)
Testing normality
Testing normality
Testing normality
Commonly used tests
• Commonly used Non Parametric Tests are:
− Chi Square test
− McNemar test
− The Sign Test
− Wilcoxon Signed-Ranks Test
− Mann–Whitney U or Wilcoxon rank sum
test
− The Kruskal Wallis or H test
− Friedman ANOVA
− The Spearman rank correlation test
− Cochran's Q test
Chi Square test
• First used by Karl Pearson
• Simplest & most widely used non-parametric
test in statistical work.
• Calculated using the formula-
χ2 = ∑ ( O – E )2
E
O = observed
frequencies E =
expected frequencies
• Greater the discrepancy between observed & expected
frequencies, greater shall be the value of χ2.
• Calculated value of χ2 is compared with table value of χ2
for given degrees of freedom.
Chi Square test
• Application of chi-square test:
• Test of association (smoking & cancer, treatment
& outcome of disease, vaccination & immunity)
• Test of proportions (compare frequencies of diabetics &
non-diabetics in groups weighing 40-50kg, 50-60kg, 60-
70kg & >70kg.)
• The chi-square for goodness of fit (determine if actual
numbers are similar to the expected/theoretical
numbers)
Chi Square test
• Attack rates among vaccinated & unvaccinated children
against measles :
Group Result Total
Attacked Not-attacked

Vaccinated 10 90 100
(observed)
Unvaccinated 26 74 100
(observed)
Total 36 164 200

• Prove protective value of vaccination by χ2 test at 5% level of


significance
Chi Square test
Group Result Total

Attacked Not-attacked

Vaccinate 18 82 100
d
(Expected)
Unvaccinated 18 82 100
(Expected)

Total 36 164 200


Chi Square test
✔ χ2 value = ∑ (O-E)2/E

✔ (10-18)2 + (90-82)2 + (26-18)2 + (74-82)2


18 82 18 82
✔ 64 + 64 + 64 + 64
18 82 18 82
✔ =8.67
✔ calculated value (8.67) > 3.84 (expected value
corresponding to P=0.05)
✔ Null hypothesis is rejected. Vaccination is
protective.
Chi Square test
• Yates’ correction: applies when we have two categories
(one
degree of freedom)
• Used when sample size is≥ 40, and expected frequency of
<5 in one cell
• Subtracting 0.5 from the difference between each observed
value and its expected value in a 2 × 2 contingency table

• χ2 = ∑ [O- E-0.5]2
E
Fisher’s Exact Test
• Used when the

• Total number of cases is <20 or

• The expected number of cases in any cell


is
≤1 or
• More than 25% of the cells have expected
frequencies <5.
McNemar Test
• McNemar Test: used to compare before and
after findings in the same individual or to
compare findings in a matched analysis (for
dichotomous variables)

• Example: comparing the attitudes of medical


students towardconfidence in statistics
analysis before andafter the intensive
statistics course.
Sign Test
• Used for paired data, can be ordinal or continuous
• Simple and easy to interpret
• Makes no assumptions about distribution of the data
• Not very powerful
• To evaluate H0 we only need to know the signs of the
differences
• If half the differences are positive and half are negative,
then the median = 0 (H0 is true).
• If the signs are more unbalanced, then that is evidence
against H0.
Sign Test
– Children in an orthodontia How do you feel about your
study were asked to rate how teeth?
they felt about their teeth on 1. Wish I could change them
a 5 point scale. 2. Don’t like, but can put
up with them
– Survey administered before 3. No particular feelings one
and after treatment. way or the other
4. I am satisfied with them
5. Consider myself fortunate
in this area
Rating Rating
child before after
1 1 5
2 1 4
3 3 1
• Use the sign test to evaluate
4 2 3
5 4 4 whether these data provide
6 1 4
7 3 5 evidence that orthodontic
8 1 5
9 1 4 treatment improves
10 4 4
11 1 1
children’s image of their
12 1 4
13 1 4
teeth.
14 2 4
15 1 4
16 2 5
17 1 4
18 1 5
19 4 4
20 3 5
Rating Rating
child before after change
1 1 5 4
2 1 4 3
3 3 1 -2
• First, for each child,
4 2 3 1
5 4 4 0 compute the difference
6 1 4 3
7 3 5 2 between the two ratings
8 1 5 4
9 1 4 3
10 4 4 0
11 1 1 0
12 1 4 3
13 1 4 3
14 2 4 2
15 1 4 3
16 2 5 3
17 1 4 3
18 1 5 4
19 4 4 0
20 3 5 2
Rating Rating
child before after change sign
1 1 5 4 +
2 1 4 3 +
3 3 1 -2 -
4 2 3 1 +
• The sign test looks at the signs
5 4 4 0 0 of the differences
6 1 4 3 + – 15 children felt better
7 3 5 2 +
about their teeth (+
8 1 5 4 +
9 1 4 3 +
difference in ratings)
10 4 4 0 0 – 1 child felt worse (- diff.)
11 1 1 0 0
– 4 children felt the same
12 1 4 3 +
13 1 4 3 +
(difference = 0)
14 2 4 2 + • If H0 were true we’d expect an
+
15 1 4 3 equal number of positive and
16 2 5 3 +
negative differences.
17 1 4 3 +
18 1 5 4 + (P value from table 0.004)
19 4 4 0 0
20 3 5 2 +
Wilcoxon signed-rank test

• Nonparametric equivalent of the paired


t-test.
• Similarto sign test, but take into
consideration the magnitude of difference
among the pairs of values. (Sign test only
considers the direction of difference but
not the magnitude of differences.)
Wilcoxon signed-rank test
• The 14 difference scores 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.


Wilcoxon signed-rank test
Score Rank
• +2 1
• +4 2
• +6 3
• -8 4.5 Sum of positive ranks = 6
• -8 4.5
•• -10
-10 6.5
6.5 Sum of negative ranks = 99
• -12 8
For N = 14, and α = .05, the critical
value of T = 21.
• -14 9 T= 6
If T is equal to or less than T
• -16 10
critical, then null hypothesis is
• -18 11.5
rejected i.e., drug A decreases
• -18 11.5
the BP among hypertensive
• -20 13
patients.
• -26 14
Mann-Whitney U test
• Mann-Whitney U – similar to Wilcoxon signed-ranks
test
except that the samples are independent and not paired.

• Null hypothesis: the population means are the same for


the two groups.

• Rank the combined data values for the two groups. Then find
the average rank in each group.
Mann-Whitney U test
• Then the U value is calculated using formula

• U= N1*N2+ Nx(Nx+1) _ (where Rx is larger rank


Rx total)
2
• To be statistically significant, obtained U has to be equal to
or LESS than this critical value.
Mann-Whitney U test
• 10 dieters following Atkin’s diet vs. 10 dieters
following
Jenny Craig diet

• Hypothetical RESULTS:
• Atkin’s group loses an average of 34.5 lbs.

• J. Craig group loses an average of 18.5 lbs.

• Conclusion: Atkin’s is better?


Mann-Whitney U test
• When individual data is seen

• Atkin’s, change in weight (lbs):


+4, +3, 0, -3, -4, -5, -11, -14, -15, -300

• J. Craig, change in weight (lbs)


-8, -10, -12, -16, -18, -20, -21, -24, -26, -30
Jenny Craig diet
30

25

20

P
e
r
c 15
e
n
t

10

0
-30 -25 -20 -15 -10 -5 0 5 10 15 20

Weight Change
Atkin’s diet
30

25

20

P
e
r
c 15
e
n
t

10

0
-300 -280 -260 -240 -220 -200 -180 -160 -140 -120 -80 -60 -40 0 20
-100 -20
Weight Change
Mann-Whitney U test
• RANK the values, 1 being the least weight loss and 20 being
the most weight loss.
• Atkin’s
– +4, +3, 0, -3, -4, -5, -11, -14, -15, -300
– 1, 2, 3, 4, 5, 6, 9, 11, 12, 20
• J. Craig
− -8, -10, -12, -16, -18, -20, -21, -24, -26, -30
− 7, 8, 10, 13, 14, 15, 16, 17, 18, 19
Mann-Whitney U test
• 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.
Kruskal-Wallis One-way ANOVA
• It’s more powerful than Chi-square test.
• It is computed exactly like the Mann-Whitney test, except
that there are more groups (>2 groups).

• Applied on independent samples with the same shape (but not


necessarily normal).
Friedman ANOVA
• Friedman ANOVA: When either a matched-subjects or
repeated-measure design is used and the hypothesis of a
difference among three or more (k) treatments is to be tested,
the Friedman ANOVA by ranks test can be used.
Spearman rank-order
correlation
• Use to assess the relationship between two ordinal
variables or two skewed continuous variables.

• Nonparametric equivalent of the

Pearson correlation.
• It is a relative measure which varies from -1 (perfect
negative relationship) to +1 (perfect positive
relationship).
Advantages of non-parametric
tests
• These tests are distribution free.
• Easier to calculate & less time consuming than parametric
tests when sample size is small.

• Can be used with any type of data.


• Many non-parametric methods make it possible to work with
very small samples, particularly helpful in collecting pilot
study data or medical researcher working with a rare disease.
Limitations of non-parametric
methods
• Statistical methods which require no assumptions about
populations are usually less efficient .

• As the sample size get larger , data manipulations required


for non-parametric tests becomes laborious

• A collection of tabulated critical values for a variety of non-


parametric tests under situations dealing with various
sample sizes is not readily available.

You might also like