5. non parametric analysis
TRANSCRIPT
KNOWLEDGE FOR THE BENEFIT OF HUMANITYKNOWLEDGE FOR THE BENEFIT OF HUMANITY
BIOSTATISTICS (HFS3283)
NON-PARAMETRIC STATISTICS
Dr.Dr. MohdMohd RazifRazif ShahrilShahril
School of Nutrition & Dietetics School of Nutrition & Dietetics
Faculty of Health SciencesFaculty of Health Sciences
UniversitiUniversiti Sultan Sultan ZainalZainal AbidinAbidin
1
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Topic Learning Outcomes At the end of this lecture, students should be able to;
• identify types of non-parametric statistics and their use
• explain assumptions to be met when using non-
parametric statistics
• perform non-parametric statistics using SPSS
• explain how to interpret the SPSS outputs of non-
parametric statistics
2
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Parametric vs. Non-parametric Tests
3
• Parametric tests assume the data is of sufficient “quality” – the results can be misleading if assumptions are
wrong
– “Quality” is defined in terms of certain properties of the data
• Non-parametric tests can be used when the data is not of sufficient quality to satisfy the assumptions of parametric test – Parametric tests are preferred when the assumptions
are met because they are more sensitive.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions of t-test
4
1. Normally distributed1. Normally distributed 1. Normally distributed1. Normally distributed 2. Interval or ratio scale 2. Interval or ratio scale
datadata 2. Interval or ratio scale 2. Interval or ratio scale
datadata
3. No extreme scores or 3. No extreme scores or outliersoutliers
3. No extreme scores or 3. No extreme scores or outliersoutliers
4. Equal variance in the two 4. Equal variance in the two samples (samples (for independent for independent
samples t testsamples t test) )
4. Equal variance in the two 4. Equal variance in the two samples (samples (for independent for independent
samples t testsamples t test) )
Parametric testParametric test Parametric testParametric test
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 1 - Normality
5
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 1 - Normality
6
In severe skew the most extreme histogram interval usually has the highest frequency
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 1 - Normality
7
In moderate skew the most extreme histogram interval does not have the highest frequency
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 1 - Normality
8
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 3 – No extreme values
9
It is sometimes legitimate to exclude extreme scores from the sample or alter them to make them less extreme. You may then use parametric tests.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 4 – Equal variance
(independent t-test only)
10
Variance 25.2 Variance 4.1
• If the variance of one group is 3 or more times bigger than the other, then perform a non-parametric test
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Recap! Assumptions 4 – Equal variance
(independent t-test only)
11
• Sometimes, the variance in the two independent groups is unequal, but the larger variance is less than 3 times bigger than the smaller variance – In this case you can perform a t test with a correction
for unequal variance (Levene’s Test)
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Parametric vs. Non-parametric Tests (cont.)
12
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
13
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Mann Whitney Test
14
• Non-parametric tests for comparing two groups
or conditions
• Used when you have two conditions, each
performed by a separate group of subjects.
• Each subject produces one score. Tests whether
there is a statistically significant difference
between the two groups.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Mann Whitney Test
15
Assumptions
1. Dependent variable should be measured at the ordinal or continuous level (i.e., interval or ratio).
2. Independent variable should consist of two categorical, independent groups.
3. Independence of observations, which means that there is no relationship between the observations in each group or between the groups themselves.
4. Not normally distributed and distributions in each group have the same variability
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example for Mann Whitney Test
16
• Does it make any difference to students'
comprehension of statistics whether the lectures
are in English or in Malay?
– Group 1: statistics lectures in English.
– Group 2: statistics lectures in Malay.
• DV: lecturer intelligibility ratings by students (0 =
"unintelligible", 100 = "highly intelligible").
• Ratings - so Mann-Whitney is appropriate.
Mann-Whitney using SPSS - procedure:
1 1
2 2
3 3
4 4
Mann-Whitney using SPSS - procedure:
5 5
6 6
7 7
8 8
9 9
Mann-Whitney using SPSS - output:
OUTPUT INTERPRETATION There is no significant difference on Intelligibility if the course is taught in English or Malay, (U = 25.00, p = 0.286)
Ranks
8 10.38 83.00
9 7.78 70.00
17
Language
English
Malay
Total
Intelligibility
N Mean Rank Sum of Ranks
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
WilcoxonTest
20
• Non-parametric tests for comparing two related
or paired groups or conditions
• Used when you have two conditions, both
performed by the same subjects.
• Each subject produces two scores, one for each
condition. Tests whether there is a statistically
significant difference between the two
conditions.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
WilcoxonTest
21
Assumptions
1. Dependent variable should be measured at
the ordinal or continuous level (i.e., interval or
ratio).
2. Independent variable should consist of two
categorical, related or matched groups.
3. Not normally distributed and distributions in
each group have the same variability
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example for WilcoxonTest
22
• Does background music affect the mood of
studying?
• Eight student: each tested twice.
– Condition A: background music.
– Condition B: silence.
• DV: Students’ mood rating (0 = "extremely
miserable", 100 = "euphoric").
• Ratings, so use Wilcoxon test.
Wilcoxon using SPSS - procedure:
1 1
2 2
3 3
4 4
Wilcoxon using SPSS - procedure:
5 5
6 6
7 7
Wilcoxon using SPSS - output:
OUTPUT INTERPRETATION There is no significant difference on Students’ Mood between background Music or Silence when studying, (Z = -1.357, p = 0.175)
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Kruskal Wallis Test
26
• Non-parametric tests for comparing more than
two groups or conditions
• Used when you have three or more conditions,
each performed by a separate group of subjects.
• Each subject produces one score. Tests whether
there is a statistically significant difference
between the three or more groups.
• Post hoc analysis would require that one
conduct multiple pairwise comparisons using a
procedure like the Mann Whitney U.
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Kruskal Wallis Test
27
Assumptions;
1. Dependent variable should be measured at the ordinal or continuous level (i.e., interval or ratio).
2. Independent variable should consist of two or more categorical, independent groups.
3. Independence of observations, which means that there is no relationship between the observations in each group or between the groups themselves.
4. Not normally distributed and distributions in each group have the same variability
S C H O O L O F N U T R I T I O N A N D D I E T E T I C S • U N I V E R S I T I S U L T A N Z A I N A L A B I D I N
Example on Kruskal Wallis Test
28
• Is there any difference on back pain rating by the
patients between Drug A, B and C?
– Group 1: Drug A.
– Group 2: Drug B
– Group 3: Drug C
• DV: Back pain score by the patients (1 = “lowest
level of pain", 10 = “greatest level of pain").
• Ratings - so Kruskal Wallis is appropriate.
29
Kruskal Wallis using SPSS - procedure:
1 1
2 2
3 3
4 4
30
Kruskal Wallis using SPSS - procedure:
5 5
6 6
7 7
8 8
9 9
31
Kruskal Wallis using SPSS - Output:
OUTPUT INTERPRETATION There was a statistically significant difference in pain score between the different drug treatments,(χ2(2) = 8.520, p = 0.014)
Thank YouThank You
32