4. Tests of normality
• The frequency distribution (histogram), stem-and-leaf
plot, boxplot, P-P plot (probability-probability plot),
and Q-Q plot (quantile-quantile plot) are used for
checking normality visually.
• The main tests for the assessment of normality are
Kolmogorov-Smirnov (K-S) test, Lilliefors corrected K-S
test, Shapiro-Wilk test, Anderson-Darling test , Cramer-
von Mises test), D’Agostino skewness test, Anscombe-
Glynn kurtosis test), D’Agostino-Pearson omnibus test,
and the Jarque-Bera test
[Peat J, Barton B. Medical Statistics: A guide to data
analysis and critical appraisal. Blackwell Publishing; 2005]
6. Overview of common statistical
tests
Outcome Variable
Are the observations correlated?
Assumptions
independent correlated
Continuous
(e.g. blood pressure,
age, pain score)
Ttest
ANOVA
Linear correlation
Linear regression
Paired ttest
Repeated-measures ANOVA
Mixed models/GEE modeling
Outcome is normally
distributed (important
for small samples).
Outcome and predictor
have a linear
relationship.
Binary or
categorical
(e.g. breast cancer
yes/no)
Chi-square test
Relative risks
Logistic regression
McNemar’s test
Conditional logistic regression
GEE modeling
Sufficient numbers in
each cell (>=5)
Time-to-event
(e.g. time-to-death,
time-to-fracture)
Kaplan-Meier statistics
Cox regression
n/a Cox regression
assumes proportional
hazards between
groups
7. Continuous outcome (means)
Outcome
Variable
Are the observations correlated? Alternatives if the
normality assumption is
violated (and small n):
independent correlated
Continuous
(e.g. blood
pressure,
age, pain
score)
Ttest: compares means
between two independent
groups
ANOVA: compares means
between more than two
independent groups
Pearson’s correlation
coefficient (linear
correlation): shows linear
correlation between two
continuous variables
Linear regression:
multivariate regression technique
when the outcome is continuous;
gives slopes or adjusted means
Paired ttest: compares means
between two related groups (e.g.,
the same subjects before and
after)
Repeated-measures
ANOVA: compares changes
over time in the means of two or
more groups (repeated
measurements)
Mixed models/GEE
modeling: multivariate
regression techniques to compare
changes over time between two
or more groups
Non-parametric statistics
Wilcoxon sign-rank test:
non-parametric alternative to
paired ttest
Wilcoxon sum-rank test
(=Mann-Whitney U test): non-
parametric alternative to the ttest
Kruskal-Wallis test: non-
parametric alternative to ANOVA
Spearman rank correlation
coefficient: non-parametric
alternative to Pearson’s correlation
coefficient
8. Parametric Test Procedures
1. Involve Population Parameters (Mean)
2. Have Stringent Assumptions
(Normality)
3. Examples: Z Test, t Test, F test
EPI 809 / Spring 2008
9. Nonparametric Test Procedures
1. Do Not Involve Population Parameters
Example: Probability Distributions, Independence
2. Data Measured on Any Scale (Ratio or
Interval, Ordinal or Nominal)
3. Example: Wilcoxon Rank Sum Test
EPI 809 / Spring 2008
12. Parametric and nonparametric tests of
significance
Nonparametric tests Parametric tests
Nominal
data
Ordinal data Ordinal, interval,
ratio data
One group Chi square
goodness
of fit
Wilcoxon
signed rank test
One group t-test
Two
unrelated
groups
Chi square Wilcoxon rank
sum test,
Mann-Whitney
test
Student’s t-test
Two related
groups
McNemar’
s test
Wilcoxon
signed rank test
Paired Student’s
t-test
K-unrelated
groups
Chi square
test
Kruskal -Wallis
one way
analysis of
variance
ANOVA
K-related
groups
Friedman
matched
samples
ANOVA with
repeated
measurements
14. Chi-Square test. Underlying assumptions.
• Frequency data
Adequate sample size
Measures independent
of each other
Theoretical basis for the
categorization of the
variables
Cannot be used to analyze
differences in scores or their means
Expected frequencies should not be
less than 5
No subjects can be count more than
once
Categories should be defined prior to
data collection and analysis
15. Fisher’s exact test. McNemar test.
• For N x N design and
very small sample size
Fisher's exact test should
be applied
• McNemar test can be used
with two dichotomous
measures on the same
subjects (repeated
measurements). It is used
to measure change
16. Ordinal data independent groups. Mann-Whitney test
The observations from both groups are combined and ranked, with the
average rank assigned in the case of ties.
Null hypothesis : Two sampled populations are equivalent in location
If the populations are identical in location, the ranks should be randomly
mixed between the two samples
17. Ordinal data independent groups. Kruskal-Wallis test
The observations from all groups are combined and ranked, with the
average rank assigned in the case of ties.
Null hypothesis : k sampled populations are
equivalent in location
If the populations are identical in location, the ranks should be randomly
mixed between the k samples
k- groups comparison, k 2
18. Ordinal data 2 related groups Wilcoxon signed rank test
Takes into account information about the magnitude of differences within
pairs and gives more weight to pairs that show large differences than to pairs
that show small differences.
Null hypothesis : Two variables have the same distribution
Based on the ranks of the absolute values of the differences
between the two variables.
Two related variables. No assumptions about the shape of distributions of the
variables.
20. Selected parametric tests
One group t-test. Example
Comparison of sample mean with a population mean
Question: Whether the studed group have a significantly lower body weight
than the general population?
It is known that the weight of young adult male has a mean value of 70.0 kg
with a standard deviation of 4.0 kg.
Thus the population mean, µ= 70.0 and population standard deviation, σ= 4.0.
Data from random sample of 28 males of similar ages but with specific enzyme
defect: mean body weight of 67.0 kg and the sample standard deviation of 4.2
kg.
21. One group t-test. Example
Null hypothesis: There is no difference between sample mean and population
mean.
population mean, µ= 70.0
population standard deviation, σ= 4.0.
sample size = 28
sample mean, x = 67.0
sample standard deviation, s= 4.0.
t - statistic = 0.15, p >0.05
Null hypothesis is accepted at 5% level
22. Two unrelated group, t-test. Example
Comparison of means from two unrelated groups
Study of the effects of anticonvulsant therapy on bone disease in the elderly.
Study design:
Samples: group of treated patients (n=55)
group of untreated patients (n=47)
Outcome measure: serum calcium concentration
Research question: Whether the groups statistically significantly differ in mean
serum consentration?
Test of significance: Pooled t-test
23. Two unrelated group, t-test. Example
Comparison of means from two unrelated groups
Study of the effects of anticonvulsant therapy on bone disease in the elderly.
Study design:
Samples: group of treated patients (n=20)
group of untreated patients (n=27)
Outcome measure: serum calcium concentration
Research question: Whether the groups statistically significantly differ in mean
serum consentration?
Test of significance: Separate t-test
24. Two related group, paired t-test. Example
Comparison of means from two related variabless
Study of the effects of anticonvulsant therapy on bone disease in the elderly.
Study design:
Sample: group of treated patients (n=40)
Outcome measure: serum calcium concentration
before and after operation
Research question: Whether the mean serum
consentration statistically
significantly differ before and after operation?
Test of significance: paired t-test
25. k unrelated group, one -way ANOVA test. Example
Comparison of means from k unrelated groups
Study of the effects of two different drugs (A and B) on weight reduction.
Study design:
Samples: group of patients treated with drug A (n=32)
group of patientstreated with drug B (n=35)
control group (n=40)
Outcome measure: weight reduction
Research question: Whether the groups statistically
significantly differ in mean weight reduction?
Test of significance: one-way ANOVA test
26. k unrelated group, one -way ANOVA test. Example
The group means compared with the overall mean of the sample
Visual examination of the individual group means may
yield no clear answer about which of the means are
different
Additionally post-hoc tests can be used (Scheffe or
Bonferroni)
27. k related group, two -way ANOVA test. Example
Comparison of means for k related variables
Study of the effects of drugs A on weight reduction.
Study design:
Samples: group of patients treated with drug A (n=35)
control group (n=40)
Outcome measure: weight in Time 1 (before using
drug) and Time 2 (after using drug)
28. k related group, two -way ANOVA test. Example
Research questions:
Whether the weight of the persons statistically
significantly changed over time?
Test of significance: ANOVA with repeated measurementtest
Whether the weight of the persons
statistically significantly differ between the
groups?
Whether the weight of the persons used
drug A statistically significantly redused
compare to control group?
Time effect
Group difference
Drug effect
29. Selected parametric tests
Underlying assumptions.
interval or ratio data
Adequate sample size
Measures independent
of each other
Homogenity of group
variances
Cannot be used to analyze
frequency
Sample size big enough to avoid
skweness
No subjects can be belong to more
than one group
Equality of group variances
35. Correlation and regression
• Two random variables X and Y are said to be bivariate normal, or jointly normal, if
aX+bY has a normal distribution for all a,b∈R. In the above definition, if we let
a=b=0, then aX+bY=0. We agree that the constant zero is a normal random
variable with mean and variance 0.