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

Unit-3-Non Parametric test-NOTES

Uploaded by

manubmath2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
424 views

Unit-3-Non Parametric test-NOTES

Uploaded by

manubmath2002
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 39

B.

Pharm - VIII Semester

Biostatistics and research methodology

Topic: Non-Parametric Test

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.

and etc. & etc.


Parametric and non-parametric tests
 Parametric tests:
If the data are normally distributed, parametric tests such as the t-test, ANOVA or Pearson
correlation are used.
 Non-parametric tests:
If the data are not normally distributed, the nonparametric tests are used. These are for
example the Mann-Whitney U Test or the Wilcoxon-Test.
Examples

Parametric and non-parametric tests

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)

Describe one group Mean, Standard deviation(SD) Median, Percentiles


One sample One sample t-Test Wilcoxon test for one sample
Two dependent samples Paired Sample t-Test(n<30) Wilcoxon-Test(n<30)
Two independent samples Unpaired Sample t-Test Mann-Whitney U Test
Compare more than two
independent unmatched One-way ANOVA Kruskal-Wallis-Test
samples/groups
Compare more than two
dependent matched Repeated Measures ANOVA Friedman-Test
samples/groups
No equivalent test
To test the categorical
(Fisher exact test or McNemar’s Chi-square test
variables for independence
test)
Quantity relationship
Pearson Correlation Spearman-Correlation
between two variables
Predict value from another
Linear regression No equivalent test
variable(continuous)
Predict values from several
measured or binominal Logistic regression No equivalent test
variables

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).

 Confidence level: The probability that an estimate


of a population parameter is within certain
specified limits of the true value; commonly
denoted by “1-α”.
β and Power
 β: The probability of failing to reject the null hypothesis
when it is false (or the probability of making a type II
error).

 Power: The probability of correctly rejecting the null


hypothesis when it is false; commonly denoted by “1- β”.
TESTING OF HYPOTHESIS

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

The Kruskal-Wallis 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. It is
denoted by H.

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.

Researchers want to know if three different


fertilizers lead to different levels of plant
growth. They randomly select 30 different
plants and split them into three groups of 10,
applying a different fertilizer to each group. At
the end of one month they measure the height
of each plant.

Formula:
4. Friedman Test

The Friedman Test is a non-parametric alternative to


the Repeated Measures ANOVA. It is used to determine whether
or not there is a statistically significant difference between the
means of three or more groups in which the same subjects show
up in each group.

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:

 One group that is measured on three or more different occasions.


 Group is a random sample from the population.
 One dependent variable that is either ordinal, intreval or ratio scale.
 Samples do NOT need to be normally distributed
Examples of Friedman Test:
 Comparing Drug Efficacy Over Time: A study could evaluate a drug's effectiveness over time by
comparing the severity of symptoms at different time points((e.g., baseline, 1 month, 3 months, and
6 months)in the same patient group, such as comparing the effectiveness of an anti-inflammatory
drug at baseline.
 Assessing Side Effects Across Different Drug Dosages Over Time: A study on a new antidepressant
might monitor side effects (e.g., fatigue levels on a scale of 1-10) at baseline, low dose, medium
dose, and high dose in the same patients.
 Pharmacokinetic Studies – Measuring Drug Concentrations at Different Time Points: The Friedman
test is used to analyze changes in drug plasma concentration over time(at 1 hour, 2 hours, and 4
hours post-dose) in a bioavailability study, particularly when data are not normally distributed.
 Comparing Patient Responses to Multiple Formulations of a Drug: A study could compare patient
responses to different drug formulations, such as oral, transdermal, and intravenous. For instance, a
trial could assess pain relief scores in patients receiving a painkiller in three different formulations on
separate occasions, ensuring each patient experiences all three.
 Comparing Different Dosages of a Drug for the Same Patients: In a trial for a migraine medication,
patients receive increasing doses (low, medium, high) during different phases of the study, and their
migraine frequency is recorded after each phase.
Formula:

𝐹𝑟
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 –

This test is always an upper tailed, therefore if Then Ho is


accepted. Otherwise, Ho is rejected.

Chi square test for independence of attributes is applicable


subject to the following conditions:
1. The total frequency N should be large (≥50).
2. The observations should be random (Independent).
3. Each of the expected cell frequencies Ei should be 5 or more.
Problem: Chi-square test
A chi-square test is a statistical test used to compare observed results with expected
results. The Chi-Square Test of Independence can only compare categorical variables.

Drug Cured(yes) Not-Cured(no) Total


(1)
Allopathic 510 100 610
Ayurvedic 110 50 160
Total 620 150 770
2x2
Fisher exact test
Smoking status Lung cancer(Yes) Lung cancer(No)
(2) Non-smoker 4 300
Occasional smoker 100 180
Regular smoker 260 120
Total 411 600 2x3

Formula:
Thank you

You might also like