Parametric Noparametric Tests
Parametric Noparametric Tests
significance
By
Prof Dr Saad Motawea
Professor of Community Medicine and Public
Health Tests of
significance
Intended learning
Objectives:
By the end of this lecture,
the student should be able
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Objectives
to:
• Understand normal distribution curve and skewness
• Understand the statistical hypothesis
• Understand The P (probability) value
• List tests of significance
• Select the proper test of significance according to the type of data
• Interpret of results of significance tests.
2
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Example:
Let us say that a group of patients enrolling for a trial had a normal distribution for
weight. The mean weight of the patients was 80 kg. For this group, the SD was calculated
to be 5 kg.
1 SD below the average is 80 – 5 = 75 kg.
1 SD above the average is 80 + 5 = 85 kg.
±1 SD will include 68.2% of the subjects, so 68.2% of patients will weigh between 75
and 85 kg.
95.4% will weigh between 70 and 90 kg (±2 SD).
99.7% of patients will weigh between 65 and 95 kg (±3 SD).
Problem:
If we have some length of hospital stay data with a mean stay of 10 days and a SD of 8
days. Does this mean and SDs appropriate measures to use?!
No because the previous data are not paramateric the SD should be 1/3 mean
3
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Skewness.
Skewness indicate the extent and direction of asymmetry (degree of departure from
skewness) in a distribution.
1- If a distribution is perfectly symmetrical, the measure of skewness is equal to zero.
2- If the distribution is asymmetrical and the tail of the distribution extends in the
direction of the positive values -positive skewness (shift to the right) where the mean will
be to the right (greater than) median and mode. As shown in figure (2B)
3- If the tail extends in the direction of negative values- negative skewness
(Shift to the left) where the mean will be to the left (less than) median and mode. As
shown in figure (2A)
Figure (2): A Shift to the right (+ve skewness) B Shift to the left (-ve skewness).
4
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
HYPOTHESIS TESTING
The “null hypothesis”
The “null hypothesis” is a concept. The test method assumes (hypothesizes) that
there is no (null) difference between the groups.
The result of the statistical test either supports or rejects that hypothesis.
The null hypothesis is generally the opposite of what we are actually interested in
finding out.
If we are interested if there is a difference between two treatments then the null
hypothesis would be that there is no difference and we would try to disprove this.
Null hypothesis (Ho); that no differences exist between groups.
Examples:
What is the null hypothesis in a study?
(a) To find out whether use of a new surgical technique reduces rates of wound infection.
(b) To find out whether adenoidectomy reduces absence from school in children with
middle ear disease.
Answers
(a) Rates of wound infection are the same with the new surgical technique as with old
surgical technique.
(b) In children with middle ear disease rates of absence from school are the same after
adenoidectomy as in comparable children who have not had the operation.
• Type I error; the probability of error to reject the null hypothesis when it is true.
i.e to state that there is difference when the difference occurs by chance.
• Type II error; the probability of error to accept the null hypothesis when it is
false i.e to state that there is no difference when such difference exists.
5
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Errors
Decision
6
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
• It means that the difference will only have happened by chance 1 in 100 times.
This is unlikely, but still possible.
• P = 0.001 It is usually considered to be “very highly significant”. means the
difference will have happened by chance 1 in 1000 times, even less likely, but still
just possible.
The lower the P value, the less likely it is that the difference happened by chance
and so the higher the significance of the finding.
Remember that
• P = 0.05 is usually classed as “significant”,
• P = 0.01 as “highly significant”
• P = 0.001 as “very highly significant”.
Example 1: Patients with minor illnesses were randomized to see either Dr Smith or
Dr Jones. Dr Smith ended up seeing 176 patients in the study whereas Dr Jones saw
200 patients (Table 1).
Table 1. Number of patients with minor illnesses seen by two GPs
• In the example above, only two of the sets of data showed a significant difference
between the two GPs.
7
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
8
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Tests of significance
In order to test a statistical hypothesis, tests of significance are used. They are
mathematical expression of sample values that provide basis for testing statistical
hypotheses.
Statistical tests which enable us to decide whether to reject or accept hypotheses.
It varies whether the data are parametric or non parametric.
PARAMETRIC TESTS
t TESTS AND OTHER PARAMETRIC TESTS
How important are they?
Used in one in three of the published medical papers, they are an important
aspect of medical statistics.
Mathematically it is difficult to obtain t value
By any Statistical computer program such as SPSS, Epi info …..etc it is very
easy.
(1) Student- t test ( Two samples t-test) (Unpaired t-test):
Used to compare the means of two samples, the variable is of quantitative type
9
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
=20 √ 5 + 15 =4.49
N.B: For any test of significance, the following rules are applicable;
* If the calculated value is equal or greater than the tabulated value, there is significant
difference i.e. the Alterative Hypothesis is true.
* If the calculated value is less than the tabulated value, the Null Hypothesis is true i.e.
there is insignificant difference.
10
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
NON-PARAMETRIC TESTS
Non-parametric statistics are used when the data are not normally distributed and so
are not appropriate for “parametric” tests.
Rather than comparing the values of the raw data, statisticians “rank” the data and
compare the ranks.
MANN–WHITNEY corresponds to unpaired t-test.
The “Wilcoxon signed rank test”: corresponds to paired t-test.
Kruskal-Wallis test corresponds to One-way ANOVA Compare three or more
unmatched groups
Friedman tests corresponds to Repeated-measures ANOVA Compare three or
more matched groups
Spearman’s rank correlation coefficient: corresponds to Pearson’s correlation
coefficient.
• Do not be put off by the names – go straight to the P value. P = 0.05 is usually
classed as “significant”, P = 0.01 as “highly significant” P = 0.001 as “very
highly significant”.
Example:
A statistician used a “Mann–Whitney U test” to test the hypothesis that there is no
difference between the ages of two groups. This gave a U value of 133 200 with a P
value of < 0.001.
Ignore the actual U value but concentrate on the P value, which suggests very
highly significantly difference between the two groups
TESTS FOR QUALITATIVE DATA
Chi-square test: it measures the association between qualitative variables. It uses
absolute values.
Fisher exact test: alternative to chi-square test when cell frequencies are less than 5.
The “Mantel Haenszel test” is an extension of the χ2 test that is used to compare
several two-way tables.
12
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
Z-test: used to compare 2 groups regarding qualitative variable. It uses proportion not
absolute numbers.
Chi-square test: (X2)
Equation:
X2 = ∑ (O – E )2
Example :
Drug A 40 20 60
Drug B 36 4 40
Total 76 24 100
Is there a statistical difference between the two drugs regarding cure rate?
Steps of calculation:
a- Calculate the expected frequency (E) for each cell To find the expectancy E
of a cell you multiply the row total by the column total and divide by the
grand overall total
E= row total x column total / grand total
b- For each cell, subtract the expected frequency from the observed frequency (
O–E)
c- For each cell, square the result of ( O-E) and divide by the expected
frequency E
d- Add the squared results calculated in step c for all the cells
X2 = ∑ ( O – E ) 2
Treatment
Total 76 24 100
14
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
8- Our results revealed that calculated X2 is larger than tabulated X2 , which means
that the p value is smaller than 0.05 ( P < 0.05) . We conclude that Drug B is better
than Drug A in treatment of Tonsillitis, as the difference is statistically significant.
15
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
16
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
17
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
An Introduction to SPSS
What is SPSS?
• “SPSS” = Statistical Package for the Social Sciences
• A software program that is very user-friendly
What can it do?
• Enables the user to perform advanced statistical analyses (e.g., t-tests) without all
the tedious hand calculations .
• We won’t teach you the formulas. We’ll only teach you how to do a t-test with
SPSS, and how to interpret the results.
The following example use actual SPSS output
While you are learning about t-tests, you are also learning to interpret SPSS output!
We want to compare the systolic BP between the normal weight and the over-weight.
250 subjects for each group were recruited.
Table : Descriptive statistics of Systolic BP by group.
Mean Std Deviation Minimum Maximum Median
over-weight 141.65 23.06 90.00 200.00 138.00
normal-weight 97.12 10.82 80.00 132.00 100.00
SPSS output
Conclusion: there was a significant difference in the systolic BP between the over-
weight and normal (p<0.001)
18
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
19
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
20
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
21
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
22
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
23
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
24
PARAMETRIC&NONPARAMETRIC TESTS Prof Dr Saad Motawea
25