Unit-3-Non Parametric test-NOTES
Unit-3-Non Parametric test-NOTES
Mr. Ninganagouda.P
Lecturer in Biostatistics,
Department of Community Medicine,
SIMS&RH, Tumkur
Definition of Non-Parametric Test:
There is no requirement for any distribution of the population in the non-
parametric test. Also, the non-parametric test is a type hypothesis test that is not
dependent on any underlying hypothesis. In the non-parametric test, the test
depends on the value of the median. This method of testing is also known as
distribution-free testing. Test values are found based on the ordinal or the
nominal level. The parametric test is usually performed when the independent
variables are non-metric. This is known as a non-parametric test.
Applications Of Non-Parametric Tests:
The differences between nonparametric and parametric tests are listed below
based on certain parameters or properties.
Figure:1 Figure:2
Examples: Examples:
1. School children’s height and weight. Income, stock prices, and the number of daily
2. Shoes size or shirt size. visitors to a website.
Parametric Vs Nonparametric
Measure type Parametric tests(Contnuous) Nonparametric tests(Nominal/Ordinal)
Source: This table is derived from Mikulski, H. (1995).Intuitive Statistics. Oxford Press. New York
Non-parametric tests are,
1. Wilcoxon Rank Test,
2. Mann-Whitney U Test,
3. Kruskal-Walli’s test,
4. Friedman Test,
5. Chi-square test,
6. Spearman Rank Correlation,
7. 1-sample Sign Test,
8. The Mann-Kendall Trend Test,
9. Mood’s Median Test.
Alpha (α) and Confidence level
Alpha (α) : The significance level of a test : the
probability of rejecting the null hypothesis when it
is true (or the probability of making a type I error).
Types of Hypothesis Tests: In hypothesis testing, there are two main hypotheses:
Null Hypothesis (H₀): This is the hypothesis that there is no effect or no difference between
groups. It suggests that any observed differences are due to random chance.
Alternative Hypothesis (H₁ or Ha): This is the hypothesis that there is an effect or there is a
difference between groups. It suggests that the observed differences are due to some non-
random cause.
1. Wilcoxon Rank Test
Testing of hypothesis:
Null Hypothesis (H₀): The median of the differences between paired observations is zero.
Alternative Hypothesis (H₁): The median of the differences between paired observations is not zero.
Assumptions:
Data are paired and come from same population.
Each paired is chosen randomly and independently.
The data are measured on at least an interval scale when, as is usual, within pair
differences are calculated to perform the test.
Examples:
A pharmaceutical company might use the Wilcoxon Rank Test to compare the
pain relief provided by a new analgesic drug to a placebo in patients with
osteoarthritis.
A researcher might use the Wilcoxon Rank Test to compare the incidence of
nausea between two different doses of a chemotherapy drug.
A pharmaceutical company might use the Wilcoxon Rank Test to compare the
Cmax of a new antibiotic drug between healthy volunteers and patients with renal
impairment.
Formula:
Problem: Wilcoxon Signed Rank Test(n<30)
In below example table when one or both of the observation groups
are not normally distributed.
Formula:
2. Mann-Whitney U test :
Mann-Whitney U test is the non-parametric alternative test to the
independent sample t-test. It is a non-parametric test that is used to
compare two sample means that come from the same population, and used
to test whether two sample means are equal or not. Usually, the Mann-
Whitney U test is used when the data is ordinal or when the assumptions
of the t-test are not met. Sometimes understanding the Mann-Whitney U is
difficult interpret because the results are presented in group rank
differences rather than group mean differences.
Testing of hypothesis:
Compare two independent groups (e.g., treatment vs. control) when the data is ordinal or not normally distributed.
Null Hypothesis (H₀): The two groups have the same distribution (no difference in
medians).Alternative Hypothesis (H₁): The two groups have different distributions (different medians).
Assumptions of the Mann-Whitney U test:
Mann-Whitney U test is a non-parametric test, so it does not assume any
assumptions related to the distribution of scores. There are, however, some
assumptions that are assumed
1. The sample drawn from the population is random.
2. Independence within the samples and mutual independence is
assumed. That means that an observation is in one group or the
other (it cannot be in both).
3. Ordinal measurement scale is assumed.
Examples of Mann-Whitney U test :
A clinical trial is conducted to compare the effectiveness of two different drugs in reducing pain
levels in patients. The pain is rated on an ordinal scale (e.g., 0 to 10). Since the pain scores are ordinal
and may not follow a normal distribution, a Mann-Whitney U test can be used to determine if there is
a significant difference in the median pain scores between the two treatment groups.
A pharmaceutical study compares side effects severity between two drugs using the Mann-Whitney U
test, if the distribution is not normal and the severity is measured on a ranked scale like mild,
moderate, or severe.
The Mann-Whitney U test can be used to compare the bioavailability of two different drug
formulations, examining if one leads to significantly different levels of drug absorption compared to
the other, as the bioavailability data is not normally distributed.
In a trial, patients are randomly assigned to two different treatments for a disease, and their recovery
times are recorded. If recovery times don't meet normality assumptions, the Mann-Whitney U test
can be used to determine significant differences between treatment groups.
The study compares the time to onset of action between two analgesic drugs, assessing potential
skewed data. The Mann-Whitney U test could be used to determine if there are significant differences
in the distribution of times to onset.
Formula:
Problem: Mann-Whitney U Test(n<30)
The Mann-Whitney U test is used to compare differences between two independent
groups when the dependent variable is either ordinal or continuous, but not normally
distributed.
Formula:
3. The Kruskal-Wallis test
Testing of hypothesis:
Compare three or more independent groups when the data is not normally distributed.
Null Hypothesis (H₀): All groups have the same distribution (no difference in medians across groups).
Alternative Hypothesis (H₁): At least one group has a different distribution (different median) from the
others.
Assumptions of the Kruskal-Wallis test:
The assumptions of the Kruskal-Wallis test are similar to those
for the Wilcoxon-Mann-Whitney test.
Samples are random samples, or allocation to treatment group
is random.
The two samples are mutually independent.
The measurement scale is at least ordinal, and the variable is
continuous.
Examples of Mann-Whitney U test :
Example of Comparing Efficacy of Multiple Drug Doses: The Kruskal-Wallis test is utilized in a study
to evaluate the efficacy of three different drug doses and non-normally distributed outcome
measures like symptom reduction.
Comparison of Side Effects Across Multiple Drug Groups: The Kruskal-Wallis test can be utilized to
compare treatment groups in a trial assessing side effects like dizziness or nausea, where the
severity data is ordinal.
Effect of Drug Formulations on Biomarkers: The Kruskal-Wallis test can be used to evaluate
differences between groups in a study examining the impact of different drug formulations on a
biomarker distribution.
Comparing Drug Responses in Multiple Patient Subgroups: A pharmaceutical study compares drug
responses across different patient subgroups, such as different age groups or comorbidities, where
the response variable is non-normally distributed, such as assessing the efficacy of an anti-cancer
drug across different age groups.
Formula:
Problem: Kruskal-Wallis-Test
A Kruskal-Wallis Test is used to determine whether or not there is a statistically
significant difference between the medians of three or more independent groups. It is
considered to be the non-parametric equivalent of the One-Way ANOVA.
Formula:
4. Friedman Test
Testing of hypothesis:
Compare three or more related groups (e.g., repeated measures or matched samples).
Null Hypothesis (H₀): The medians of the related groups are the same.
Alternative Hypothesis (H₁): At least one group’s median is different from the others.
Assumptions of Friedman Test:
𝐹𝑟
Problem: Friedman-Test
The Friedman test is the non-parametric alternative to the repeated measures of
ANOVA with repeated measures. It is used to test for differences between groups
when the dependent variable being measured is ordinal.
Formula:
5. Chi square test ( )
Testing of hypothesis:
Test the independence between two categorical variables.
Null Hypothesis (H₀): The two variables are independent (no association).
Alternative Hypothesis (H₁): The two variables are dependent (there is an association).
Applications of chi square test:
The important applications of chi square distribution(test) are
1). Test of homogeneity.
2). To test “ goodness of fit ” of a theoretical distribution to an
observed distribution.
3). To test independence of attributes in a 2 x 2 contingency table.
1). Test of homogeneity
This test can also be used to test whether the occurrence of
events follow uniformity or not e.g. the admission of patients in
government hospital in all days of week is uniform or not can be
tested with the help of chi square test.
Chi square calculated value is less than chi square table value,
then null hypothesis is accepted, and it can be concluded that there is
a uniformity in the occurrence of the events.
2. Goodness of fit :
• This test enables us to see how well does the assumed theoretical
distribution (such as Binomial distribution, Normal distribution) fit
to the observed data.
• The chi square test formula for goodness of fit is:
, Where, Oi = Observed frequency
Ei = Expected frequency
• If (calculated) > (tabulated), with (n-1) degrees of freedom, then
null hypothesis is rejected otherwise accepted.
• And if null hypothesis is accepted, then it can be concluded that the
given distribution follows theoretical distribution.
3. Chi- test for independent of attributes:
By using chi square test we can find out whether two attributes
are independent or not. Suppose, we have N observations classified
according to two attributes.
Examples:
1. Whether there is any association between eye colours of parents
and children.
2. Whether there is any association between marriage and happiness.
3. Whether quinine is effective in controlling malaria or not
In order to test whether the attributes are independent or not,
we take the null hypothesis that the two attributes are independent.
i.e., H0 = The two attributes are independent.
H1 = The two attributes are not independent.
‘N’ observations are classified with respect to 2 attributes A
and B are written in the form of a 2 x 2 contingency table as follows.
Yates’s test statistic is –
Formula:
Thank you