This document provides an overview of various statistical tests for comparing variables, including t-tests, ANOVA, MANOVA, ANCOVA, and MANCOVA. It defines each test and provides examples of their proper usage. T-tests are used to compare two groups on a continuous variable, including paired and unpaired, parametric and non-parametric versions. ANOVA and MANOVA are used to compare three or more groups and two or more dependent variables, respectively. ANCOVA and MANCOVA control for covariates/confounding variables in one-way and two-way designs with single or multiple dependent variables. Examples and best practices are given for selecting and conducting each type of test.
4. t Tests
Comparing 1 group with a value:
Parametric: One sample t test
Non-parametric: Wilcoxon signed rank test
Compare 2 groups:
Paired:
Parametric: Paired t test
Non-parametric: Wilcoxon matched-pairs test
Unpaired:
Parametric: Unpaired t test (2 independent sample t
test)
Non-parametric: Mann-Whitney test
5. Comparing 1 Group With a Value
This Test tells whether the mean of a single variable
differs from a specified constant.
It compares the mean of a single column of numbers
against a hypothetical mean that we assume.
For example comparing IQ of a group with the
standard IQ (100).
The parametric test is one sample t test.
The non-parametric test is Wilcoxon signed rank test.
6. Comparing 2 Paired Groups
It tells you if the variables in two matched groups are
distinct.
Matching should be by the experimental design, but
not based on the variable you are comparing.
For comparing blood pressures, it is OK to match
based on age or gender, but not OK to match based
on blood pressure.
Parametric test is paired (or matched) t test.
Non parametric test is Wilcoxon matched pairs test.
7. Comparing 2 Paired Groups
Choose a paired test when the columns of data are
matched.
That means that values on the same row are related to
each other, some examples:
Measuring a variable in each subject before and after an
intervention (very common in life science).
In matched pairs, one of the pair gets one treatment (or
placebo); the other gets an alternative treatment.
A laboratory experiment is run in 2 time points in the same
sample.
9. Comparing 2 Unpaired Groups
The unpaired t test compares the means of two
unmatched groups.
Choose unpaired t test when the values of data on the
same row are independent of each other.
For this test, the subjects are randomly assigned to
two groups.
Any difference in response is due to the treatment (or
lack of treatment) and not to other factors.
10. t Tests
Hands-on practice
To calculate One-Sample t Test in Excel:
=T.TEST(array1, array2, tails, type)
To calculate parametric t Tests in SPSS:
Analyze => Compare Means => One-Sample T Test...
Analyze => Compare Means => Paired-Samples T Test...
Analyze => Compare Means => Independent-Samples T
Test...
11. t Tests
Hands-on practice
To calculate Non-parametric t Tests in SPSS:
Analyze => Nonparametric Tests => One Sample…=>
Objective Tab => Automatically compare observed data to
hypothesized => Settings Tab => Customize test radio
button => Compare median to hypothesized…. Check box
Analyze => Nonparametric Tests => Legacy Dialogs => 2
Related Samples...
Analyze => Nonparametric Tests => Legacy Dialogs => 2
Independent Samples...
12. t Tests
Hands-on practice
To calculate One-Sample t Test (both parametric and
Non-parametric) in Prism:
Column (from welcome screen) => t test-one sample =>
Analyze => Column statistics => Inferences Section =>
check the appropriate check boxes and determine the
hypothetical value
To calculate both paired and unpaired t Test (both
parametric and Non-parametric) in Prism:
Column (from welcome screen) => t test-unpaired =>
Analyze => t tests (and nonparametric tests)
13. ANOVA Tests
Variance is SD squared (SD2), and ANOVA is
acronym of Analysis of variance.
ANOVA is used for comparing 3 or more groups for
their mean differences.
ANOVA tests a continuous (scale or interval)
response variable (dependent variable).
16. ANOVA Tests
One-way ANOVA
Not matched groups:
Parametric: ordinary one-way ANOVA test
Non parametric: Kruskal-Wallis test
Matched groups:
Parametric: Repeated measures one-way ANOVA test
Non parametric: Friedman's test
Two-way ANOVA
Parametric: Repeated measures two-way ANOVA test
Non parametric: there is no consensus, use parametric
17. One-way ANOVA
One-way ANOVA, is also known as one-factor, or
single-factor ANOVA.
“One-way” means a response is affected by one
factor.
If we measure a response to 3 different drugs, drug
treatment is just one factor.
Since there are 3 drugs, the factor is said to have 3
levels.
‘Repeated measures' means we treat or observe each
subject repeatedly (more than once).
18. One-way ANOVA
One-way Because There Is One Factor (Level of Education)
but 3 Levels (College, Graduate, High School)
Education
Graduate
College High school
Test
Score
Factor
(Independent
Variable)
Dependent,
Response or
Outcome
Variable
Levels of the Factor
(3 Levels)
21. One-way ANOVA
Some examples of one-way ANOVA are:
Measuring a variable in each subject several times: before,
during and after an intervention (repeated measure ANOVA).
Recruiting subjects as matched groups for age, disease
severity, etc. (but NOT based on the desired variable)
Running a laboratory experiment several times, each time
with several treatments handled in parallel.
(Again!), Matching should not be based on the variable you
are comparing.
If you have data from three or more groups, you are not
allowed to compare two groups at a time with a t test.
22. One-way ANOVA
The concept of homo- and heteroscedasticity also
applies here.
“Sphericity” means that you waited long enough
between treatments for any treatment effect to wash
away.
This concept is not relevant for nonparametric tests,
or if your data are not matched.
So sphericity is applicable only for repeated measure
ANOVA.
23. One-way ANOVA
After ANOVA we should compare every mean with the
others, and we will have multiple P values.
The problem is, with multiple P values, we get at least one
P < 0.05, even if all null hypotheses are true (Type I error).
Some tests do these comparisons and correct for the type I
error.
They are called “post tests” or “Post-hoc tests”.
Tukey-Kramer test is the most commonly used post test
after one-way ANOVA.
We can decrease type I error by “planned comparisons”.
24.
25. Goal Report also CI? Method
Compare every mean to every
other mean
Yes Tukey
No
Holm-Sidak
Dunn (nonparametric)
Compare every mean to a
control mean
Yes
Dunnettt
Sidak
Bonferroni
No
Holm-Sidak
Dunn (nonparametric)
Compare selected pairs of
means (up to 40)
Yes
Bonferroni-Dunn
Sidak-Bonferroni
No
Holm-Sidak
Dunn (nonparametric)
Linear trend? Do column mean
correlate with column order?
No
Test for linear trend. Only
available with one-way
ANOVA.
26. One-way ANOVA
The term planned comparison is used when:
You focus on a few sensible comparisons rather than
every possible comparison.
The choice of which comparisons to make, was part of
the experimental design.
You did not do more comparisons after looking at the
data.
27. Two-way ANOVA
Two-way ANOVA (or two-factor ANOVA)
determines how a response is affected by two factors.
If we measure a response to 3 different drugs in men
and women, drug is one factor, and gender is the
other.
In the above example, two-way ANOVA responds
these questions:
Is the response affected by drug?
Is the response affected By gender?
Are the two intertwined?
28. Two-way ANOVA
Two-way Because There are 2 Factors (Education, and Gender)
Test
Score
College Graduate High school
Education
Dependent,
Response or
Outcome
Variable
Levels of the First
Factor (3 Levels)
Levels of the Second
Factor (2 Levels)
Men Women
First Factor
(Independent
Variable)
Second Factor
(Independent
Variable)
29. Two-way ANOVA
Use two-way ANOVA when:
You have one quantitative, and 2 nominal variables.
Each value of one nominal variable is in combination with
the other nominal variable.
So It defines 3 null hypotheses:
The means of the measurement variable are equal for
different values of the first nominal variable.
The means are equal for different values of the second
nominal variable.
There is no interaction (the effects of one nominal variable
don't depend on the value of the other nominal variable).
30. Two-way ANOVA
Interaction of Factors
A significant interaction indicates that the effect that one independent
variable has on the dependent variable depends on the level of the
other independent variable.
This pattern is true for all 2 factor analyses (ANOVA, ANCOVA,
MANCOVA)
31. Do not use this kind of graph in two way ANOVA.
Which bar is higher: fs in females or ss in males?
Two-way ANOVA
33. ANOVA
Hands-on practice
To calculate ANOVA in SPSS:
For One-way ANOVA: Analyze => Compare Means => One-
Way ANOVA
For Two-way ANOVA: Analyze => General Linear Model =>
Univariate...
To calculate ANOVA in Prism (parametric,
nonparametric, repeated measure):
For One- way ANOVA: Column (from welcome screen) => one
way ANOVA=> Analyze => one way ANOVA (and
nonparametric)
For Two-way ANOVA: Grouped (from welcome screen) =>
Analyze => grouped analyses => 2 way ANOVA
34. MANOVA
MANOVA stands for: Multivariate Analysis of
Variance.
MANOVA is an ANOVA with two or more
continuous response (dependent) variables.
MANOVA may also be one-way or two-way.
The number of factor variables distinguishes a one-
way MANOVA from a two-way MANOVA.
35. One-way MANOVA
One-way because there is one factor
MANOVA because there are 2 Response Variables
(Factor)
(Response)
(Response)
Independent Variable
(for categorization)
Dependent or outcome variables
(which we are looking for)
Level of Education
(High school,
College, Graduate)
Test score
Annual Income
36. Two-way MANOVA
Two-way Because There Are 2 Factors
MANOVA Because There Are 2 Response Variables
(Response)
(Response)
(Factor)
(Factor)
Independent Variables
(for categorization)
Dependent or outcome variables
(which we are interested in)
Test score
Annual Income
Gender
Level of Education
(High school,
College, Graduate)
37. ANCOVA
If a variable confounds the results, it is called a
covariate; hence the name ANCOVA.
ANCOVA is used to control or remove the effects of
covariate(s) [also called confounding variable(s)].
ANCOVA is the most suitable tool for pre-, and post-
tests in two independent groups (explained later).
Similar to ANOVA, there are 2 types of ANCOVA:
one-way and two-way ANCOVA.
38. One-way ANCOVA
One-way Because There Is One Factor
ANCOVA Because There Is / Are Covariate(s)
Response
Factor
Covariate(s) or
Confounding Variable(s)
Dependent or outcome variable
(which we are interested in)
Independent Variable
(for categorization)
The covariate(s) are not
considered a “factor” and
do not determine one-way
or two-way test
Level of Education
(High school,
College, Graduate)
Test score
Number of Hours
Spent Studying
39. One-way ANCOVA
Example 1
Independent Variable
or Factor for
categorization
Exercise 1
Exercise 2
Exercise 3
Sys. BP. = Systolic blood pressure
Dependent / Outcome
/Response variable
which we are interested in
Sys. BP.
Sys. BP.
Sys. BP.
After exercise
Sys. BP.
Sys. BP.
Sys. BP.
Covariate(s) or
Confounding Variable(s)
Before exercise
40. One-way ANCOVA
Example 2
Independent Variable
or Factor for
categorization
Exercise 1
Exercise 2
Control
Dependent / Outcome
/Response variable
which we are interested in
Cholesterol
Cholesterol
Cholesterol
After exercise
Cholesterol
Cholesterol
Cholesterol
Covariate(s) or
Confounding Variable(s)
Before exercise
41. Two-way ANCOVA
The two-way ANCOVA is similar to two-way
ANOVA but controls covariate(s).
Two-way ANCOVA determines
The effect of the first factor on the response variable.
The effect of the first factor on the response variable.
the interaction between the two factors on the response
variable.
Two-way ANCOVA is used for two types of study:
observational, and experimental study.
42. Two-way ANCOVA
Observational Example
Independent Variables or
Factors for categorization
(Gender & Anxiety)
Gender Anxiety
Male
Low
Moderate
High
Female
Low
Moderate
High
Covariate(s) or
Confounding Variable(s)
Revision time
Revision time
Revision time
Revision time
Revision time
Revision time
Exam score
Dependent / outcome
/Response variable
which we are interested in
Exam score
Exam score
Exam score
Exam score
Exam score
43. Two-way ANCOVA
Experimental Example 1
Independent Variables or
Factors for categorization
(Drug & Treatment)
Drug Treatment
Drug A
(Placebo)
Rest (Control)
Exercise
Diet
Drug B
Rest (Control)
Exercise
Diet
Covariate(s) or
Confounding Variable(s)
Weight
Weight
Weight
Weight
Weight
Weight
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Dependent / outcome
/Response variable
which we are interested in
Note that the covariate(s) may, or may not
be the same as the dependent variable
44. Two-way ANCOVA
Experimental Example 2
Independent Variables or
Factors for categorization
(Diet & Exercise)
Diet Exercise
With Diet
Low
Moderate
High
No Diet
Low
Moderate
High
Covariate(s) or
Confounding Variable(s)
Weight
Weight
Weight
Weight
Weight
Weight
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Cholesterol
Dependent / outcome
/Response variable
which we are interested in
Note that the covariate(s) may, or may not
be the same as the dependent variable
45. MANCOVA
MANCOVA stands for: Multi Analysis of
Covariance
MANCOVA incorporates features of both MANOVA
and ANCOVA.
MANCOVA tests two or more response (dependent)
variables, and controls for one or more covariates.
Again, there are one-way, and two-way MANCOVA.
46. One-way MANCOVA
One-way Because There Is One Factor
MANCOVA Because There Are 2 Response Variables and One Covariate
Response
Response
Factor
Covariate)
Covariate or
Confounding Variable
Dependent or outcome variables
(which we are interested in)
Independent Variable
(for categorization)
Number of Hours
Spent Studying
Level of Education
(High school,
College, Graduate
Test score
Annual Income
The covariate(s) are NOT
considered a “factor” and
do NOT determine one-
way or two-way test
47. One-way MANCOVA
One-way because there is one factor (exercise with 3 levels: low, moderate,
high), and MANCOVA because there are 3 response variables (cholesterol,
CRP, systolic blood pressure), and one covariate (weight).
48. Two-way MANCOVA
Two-way because there is 2 factors (exercise with 3 levels: low, moderate,
high; gender with 2 levels: male and female), and MANCOVA because there
are 3 response variables (cholesterol, CRP, systolic blood pressure), and one
covariate (weight).
55. Contingency Tables (Crosstabs)
Contingency tables (crosstabs) examine the relationship
between two categorical (nominal or ordinal) variables.
Since the nominal variable often (not always) has 2
outcome, it is called a “binominal” or “binary” variable.
Some examples of outcome (binominal variable) are:
Disease / no disease
Pass / fail
Artery open / artery obstructed
Survive or not
Metastasis or not
56. Contingency Tables (Crosstabs)
Contingency tables are heavily used in basic science
experiments.
The rows represent alternative treatments or events,
and the columns tabulate alternative outcomes.
Crosstabs are NOT a statistical test, and are used
when an outcome has only two (or a few)
possibilities.
The appropriate test is chosen after arranging data in
contingency tables.
57. Contingency Tables (Crosstabs)
It is claimed that there
is an association
between living near
Electromagnetic
Fields (EMF) and
leukemia.
In how many ways
can we investigate
whether this
association really
exists?
58. Contingency Tables (Crosstabs)
In crosstabs data may be arrange for 4 types of
studies.
The sequence of choosing data (especially the first
step) is crucial in the design and outcome of the
study.
The 4 types of study in crosstabs are:
1. Cross-sectional
2. Experimental (Clinical trial)
3. Prospective (Cohort)
4. Retrospective (Case-Control)
59. Cross-sectional Study
A large
sample from
a population
Exposure
assessment
Exposed
Leukemia
assessment
Leukemic
Healthy
Non-exposed
Leukemia
assessment
Leukemic
Healthy
60. Leukemia
Exposed to EMF Affected Not Affected
Not Exposed to EMF Affected Not Affected
EMF: Electromagnetic Fields
1. Choose a large sample of people selected from the general population.
2. assess whether or not each subject has been exposed to high levels of EMF.
3. Then check the subjects to see whether or not they have leukemia.
4. It would not be a cross-sectional study if you selected subjects based on EMF exposure or
presence of leukemia.
Cross-sectional Study
61. Experimental (Clinical trial) Study
A group of
animals
Deliberate
Exposure
Follow up
Leukemia
assessment
Leukemic
Healthy
Deliberate
Non-
exposure
Follow up
Leukemia
assessment
Leukemic
Healthy
62. Leukemia
Half Deliberately
Exposed to EMF
Affected Not Affected
Half Deliberately not
Exposed to EMF
Affected Not Affected
EMF: Electromagnetic Fields
1. Half of animals are exposed to EMF, while half are not.
2. After a period of time, assess leukemia in animals.
3. Affected and not affected animals, make the columns
Experimental (Clinical trial) Study
64. Leukemia
Known exposed to EMF Affected Not Affected
Known Non-exposed to
of EMF
Affected Not Affected
EMF: Electromagnetic Fields
1. Select one group with non exposure to EMF and another group with high
exposure.
2. Then follow all subjects and tabulate the numbers that get leukemia.
3. Subjects affected are in one column; the rest in the other column.
Prospective (Cohort) Study
65. Retrospective (Case-Control) Study
Known leukemic
individuals (cases)
Exposure
assessment
Exposed
Non-Exposed
Known healthy
individuals (controls)
Exposure
assessment
Exposed
Non-Exposed
66. Leukemia
Exposed to low
levels of EMF
Known Affected
(Case)
Known Non-
Affected (Control)
Exposed to high
levels of EMF
Known Affected
(Case)
Known Non-
Affected (Control)
EMF: Electromagnetic Fields
1. Recruit one group of subjects with leukemia and a control group that does not
have leukemia but is otherwise similar.
2. Then assess high or low EMF exposure in all subjects.
3. Enter the number with low exposure in one row, and the number with high
exposure in the other row.
Retrospective (Case-Control) Study
67. Contingency Tables (Crosstabs)
Crosstabs show the association between exposure and
outcome.
Crosstabs do not determine the intensity of the association
per se.
To quantify intensity of association we may calculate:
Relative risk or Risk ratio (RR)
Absolut risk reduction (ARR)
Odds ratio (OR)
What is the difference between odds ratio and relative
risk?
68. Relative Risk or Risk Ratio (RR)
Relative risk is the risk of an
adverse event in the exposed
group relative to unexposed
group.
The left group is exposed to
treatment, but the right
group is not exposed.
The risk of an adverse
outcome is shown in brown.
The relative risk is reduced
by 50% (RR = 0.5)
69. Progress No Progress Total Progress Relative Risk
AZT 76 399 475 0.16 0.57
Placebo 129 332 461 0.28
Total 205 731 936
AZT: Azathioprine
First column of data (whatever it is),
is divided by the total of data
No
Progress
Progress Total
No
Progress
Relative Risk
AZT 399 76 475 0.84 1.17
Placebo 332 129 461 0.72
Total 731 205 936
For calculating the relative risk, the order of the two columns matters,
the order of rows not so much.
Relative Risk or Risk Ratio (RR)
70. Absolut Risk Reduction (ARR)
Absolut risk is the difference
of the risk of an adverse
event in the exposed group
and unexposed group.
The left group is exposed to
treatment, but the right
group is not exposed.
The risk of an adverse
outcome is shown in brown.
The absolut risk is reduced
by 25% (AR = 0.25)
73. Odds Ratio (OR)
Odds ratio quantifies the strength of association
between exposed cases and exposed controls.
Odds ratio is most commonly used in case-control
studies
It may also be used in cross-sectional and cohort
study.
74. Cases
(Lung cancer)
Controls
(No Lung cancer)
Smoked
(Exposed)
688 650
Never smoked
(Not Exposed)
21 59
• the odds of a case being a smoker (exposed cases): 688/21 = 32.8
• The odds of a control being a smoker (exposed controls): 650/59 = 11.0
• The odds ratio (exposed cases to exposed controls): 32.8 / 11.0 = 3.0
• The risk of a smoker getting lung cancer is 3 times the risk of a nonsmoker
Odds Ratio in a Case-Control Study
75. Odds Ratio (OR) Vs. Relative Risk (RR)
• Odds Ratio (OR):
• Odds of being exposed among
the cases to odds of being
exposed among the controls
• OR compared based on event
(usually a disease)
• Relative Risk (RR):
• Risk of outcome in the exposed
group to Risk of outcome in the
unexposed group
• RR compares based on exposure
(usually a risk factor)
76. Odds Ratio (OR) Vs. Relative Risk (RR)
Interpretation:
RR > 1
Risk in exposed > Risk in non-
exposed
Positive association; causal?
(maybe, maybe not)
RR = 1
Risk in exposed = Risk in non-
exposed
No association
RR < 1
Risk in exposed < Risk in non-
exposed
Negative association;
protective? (maybe, maybe not)
Interpretation:
OR > 1
Exposure is positively related to
disease
Positive association: causal?
(maybe, maybe not)
OR = 1
Exposure is not related to
disease
No association: independent
OR < 1
Exposure is negatively related to
disease
Negative association:
protective? (maybe, maybe not)
77. Odds Ratio (OR) Vs. Relative Risk (RR)
Relative risk and odds ratio both give the same
information, just on different scales.
In clinical studies the parameter of greatest interest is
often the risk (RR).
However, frequently the available data only allows
the computation of the OR.
78. Chi-square Test
Chi-square test is applied for 2 categorical (ordinal or
nominal) variables from a single population.
It determines whether there is an association between
levels of the 2 categorical variables.
It will NOT tell you anything about the nature of
relationship (eg: strength) between them.
For example:
Is gender related to voting preference?
Is satisfaction category related to marital status?
81. Chi-square Test
In contingency tables, the “observed” frequencies are
compared with the “expected” frequencies (O vs. E).
The comparison is performed by “chi-square” test
and a P value is reported.
The null hypothesis (H0) dictates one or some of the
followings:
Proportions are not different in 2 (or more) groups.
The observed and expected values are not different.
Alternative treatments do not cause alternative results.
The rows and columns are not related / associated.
82. Chi-square Test
Chi-square test is used in 2 main contexts:
1. To compare the observed distribution of 1 nominal
variable with an expected distribution from a known
(external) theory.
we know the proportions before collecting the data, eg:
1:1 sex ratio, or 1:2:1 ratio in a genetic cross.
The expected frequencies are theoretical, and we do not
really believe the observed and expected values match
exactly.
2. To analyze a contingency table with 2 or more
nominal variables, and expected values are computed
from (internal) data.
83.
84. Observed Expected
Right Bill 1752 1823.5 (3647* 0.5)
Left Bill 1895 1823.5 (3647* 0.5)
Total 3647
P=0.018, so there are significantly more left-billed, and H0 is rejected.
Chi-square from a known theory
85. Is this dice fair?
Chi-square from a known theory
86. Outcome Observed Expected
(𝑬 − 𝑶)𝟐
𝑬
1 8 6 0.667
2 5 6 0.167
3 9 6 1.500
4 2 6 2.667
5 7 6 0.167
6 5 6 0.167
Outcome Frequencies from a Dice after 36 roll
The value of Chi Square is 5.333. the probability (P Value) of a Chi Square of 5.333 or
larger is 0.377. Therefore, the null hypothesis that the dice is fair cannot be rejected.
Chi-square from a known theory
87. Frequencies for Diet and Health Study.
Diet Cancers Heart Disease Healthy Total
American 15 49 239 303
Mediterranean 7 22 273 302
Total 22 71 512 605
Note that the total of the rows and columns are the same.
This means one subject has participated only once, and
variables are independent. This is an important
assumption in Chi-square test.
Chi-square from a known theory
88. Observed and Expected Frequencies (Expected values
are in parenthesis)
Diet Cancers Heart Disease Healthy Total
American
15 49 239
303
(11.02) (35.56) (256.42)
Mediterranean
7 22 273
302
(10.98) (35.44) (255.58)
Total 22 71 512 605
22 / 605 = 0.0364
0.0364 *302 = 10.98
Chi-square from a known theory
89. Fisher's Exact Test
For crosstabs with only two rows and two columns,
fisher's test is the best choice as it gives the exact P
value.
It is better than chi-square test when:
Any number in crosstab is less than 6, and / or
Total sample size is less than 1000
Fisher's test is equivalent to unpaired t test, but for
binomial variables / outcomes.
90. McNemar Test
McNemar test is used when the two samples are
dependent and there are two pairs of observations
such as:
Individuals before and after a treatment.
Individuals diagnosed using two different techniques.
McNemar test is equivalent to paired t test (pretest-
posttest study designs) but for binomial variables /
outcomes.
91. Cochran Q Test
Cochran's Q test determines differences on a binomial
variable between three or more related groups.
It is used when data from 2×2 tables are repeated at
different times or locations.
There are 3 variables in cochran's Q: two variables of
the 2×2 table, and the third for the repeats.
Cochran's Q test is used to analyze longitudinal study
designs with multiple different treatments.
It is similar to the one-way repeated measures
ANOVA, but for a binomial variable.
92. Crosstabs & related Tests
Hands-on practice
To calculate crosstabs in Excel:
Calculate manually!
To calculate crosstabs, chi square, Odds ratio, and
Relative risk in SPSS:
Analyze => Descriptive Statistics => Crosstabs…
To calculate crosstabs, chi square, Odds ratio, and
Relative risk in Prism:
Contingency (from welcome screen) => Analyze =>
choose appropriate option
93. Choosing Tests
Type of Data
Goal
Measurement
(normal)
Rank, Score, or
Measurement (non
normal)
Binomial
(Two Possible
Outcomes)
Compare one group to
a hypothetical value
One-sample t Wilcoxon Chi-square
Compare two
unpaired groups
Unpaired t Mann-Whitney
Fisher's test
(chi-square for large
samples)
Compare two paired
groups
Paired t Wilcoxon McNemar's test
Compare three or more
unmatched groups
One-way ANOVA Kruskal-Wallis Chi-square test
Compare three or more
matched groups
Repeated-
measures ANOVA
Friedman Cochrane Q
94. Survival Analysis
Survival curves measure follow-up time from a
starting point to the occurrence of an event eg:
Time until death.
Time to first metastasis of a tumor.
Time until marriage after graduation.
Time for restoration of renal function.
Time of discharge from a hospital.
The goal is usually to determine whether a treatment
changes survival.
The null hypothesis indicates the treatment did not
change survival.
96. Survival Analysis
Survival curves are estimated for each group by
Kaplan-Meier method.
Kaplan-Meier estimates the probability of survival
past given time points eg:
Abstinence time from alcohol between those receiving
brief intervention and standard care.
Survival between chemotherapy before and after
gastric surgery.
Then, the curves are compared by log-rank test eg:
100. Survival Analysis
Goal Survival Time
Describe one group Kaplan Meier
Compare two unpaired groups
Log-rank test or
Mantel-Haenszel
101. Survival Analysis
Sometimes we have to Censor data because:
Some subjects may still be alive at the end of the study.
Persons dropped out of the study (eg: took a medication
disallowed).
In both cases, information about these patients is said to
be censored.
Every subject in a survival study either dies (marries, etc)
or is censored.
The survival methods are only useful if the horizontal
axis is time, and you know the survival time for each
subject.
102. Survival Analysis
Hazard is the slope of the survival curve or a measure
of how rapidly subjects are dying.
If the hazard ratio is 2, then the rate of deaths in one
group is twice the other group.
The hazard ratio is not computed at one point, but
from all the data in the survival curve.
If two survival curves cross, the hazard ratios are not
consistent.
103. Survival Analysis
Hands-on practice
To calculate survival analysis in SPSS:
Analyze => Survival => Life Tables...
Analyze => Survival => Kaplan-Meier...
To calculate survival analysis in Prism:
Survival (from welcome screen) => Choose
appropriate option (data is automatically analyzed)