Statistical Summary
Course Outline I. Introduction and Vocabulary II. Descriptive Statistics III. Testing Hypotheses About Means IV. Testing Hypotheses About Proportions V. Survival Analysis VI. Correlation and Regression Analysis VII. Analysis of Variance VIII. Validity and Reliability
Types of Data (Variables)
Nominal -mutually exclusive -no natural order (qualitative)
Ordinal -mutually exclusive -ordered
Categorical Numeric
Discrete -countable -ordered -integer value -magnitude of value important
Continuous -countable -takes any value -magnitude of value important
Dichotomous
Types of Data (continued) Numeric data converted to categorical data: Continuous
measures can be “discretized ” Age (Old {>65} or Young {< 65}), Systolic BP (High: > 120 mm Hg) [Rationale: clinical interpretation]
Categorical data converted into continuous data: Discrete measures, collected as categorical data (ordinal or nominal) can be made continuous: Visual acuity Acculturation Quality of Life [Rationale: detection of treatment effect]
Identify and classify into: a) continuous numeric data b) discrete numeric data c) numeric data transformed into categorical data d) ordinal data transformed into continuous data e) nominal data f) discrete and ordinal
Measures of Central Tendency Mean: what’s commonly called “average” Median (m): middle-most observation of ordered
data n odd: m = the (n + 1)/2-th largest observation n even: m = average of the (n/2)-th and (n/2 + 1)-th
largest observations Mode: most frequently occurring observation(s)
1
1 n i
i
xx n =
= ∑
Measures of Variability (Dispersion) Range: difference between largest and smallest
observations (or actual values) Interquartile range (IQR): the difference between
the 25th and 75th percentiles (or actual values) (Sample) Variance: (Sample) Standard Deviation (s or sd): Standard Error of the Mean (se or sem):
2 2
1
1 )(
1
n
i i
s x x n =−
= −∑
2 or sds s=
se / ns=
Histograms Know how to interpret a histogram, i.e., normal,
skewed left (left tail), skewed right (right tail), and most importantly, infer from it the appropriate statistical tests, e.g., parametric vs. non-parametric, to analyze such data.
Randomization Completely randomized design
Only one treatment per subject
Randomized blocks (crossover) design Each subject receives all treatments in a random order Stratified Randomization (make sure to practice randomization of patients/participants by using random numbers)
Normal Range vs. Confidence Interval
Normal range describes where a certain percentage of a POPULATION lie within the known population mean value
95% normal range = μ ± 1.96σ Normal range does NOT depend on sample size, as
it comes from a known population mean value μ, obtained from a large number of subjects already
Confidence interval describes where the population mean value lies, based on a SAMPLE MEAN
Confidence interval depends on sample size: the larger the sample size, the narrower the confidence interval
More on Confidence Intervals
Population Variance known
If the population variance σ2 (not the sample variance s2!) is known: / 21( )x z nα
σ − ⋅±
Interpretation: We are ____% confident that the true population mean of describe population is between ____ and ____.
Two-sided C.I.
More on Confidence Intervals Population Variance Unknown
If population variance is unknown:
Remember that the “z” or “t” values are obtained from Tables A.3 and A.4 , respectively
Two-sided C.I. ( 1,1 / 2)( )n s
x t nα− −
⋅±
Table A.3: z-Distribution
1) Upper tail distribution, one-sided p-values in the cells. 2) For 2-sided: multiply by 2 3) Critical values of z: first column + first row (for decimal) 4) Used for all tests with large sample sizes (>25)
Table A.4: t-distribution
1) Upper tail distribution 2) One-sided p-values in the first row 3) Degree of freedom in the first column 4) For 2-sided: multiply by 2
Procedures for
Testing Statistical Hypotheses Ask question about population parameter Translate question into two hypotheses H0: Null Hypothesis H1: Alternative Hypothesis
One- or two-sided? Pick significance level α (usual = 0.05) Collect data
Procedures for Testing Statistical Hypotheses (continued)
Calculate test statistic Convert test statistic to p-value (p). If p < α, Reject H0. Statistically significant If p > α, Accept H0. Non-significant (NS). p-value is the probability of incorrectly rejecting H0
(Type I error) Acceptance of H0 is a failure to reject H0 and does not
mean that H0 is true (Type II error)
Sample size: key statistics Must specify 4 key parameters α: level of significance one- or two-sided: direction of alternative hypothesis Power (1 – β): decided beforehand. Usually set at
80%, but you can have any power level δ: Difference in mean, median, or proportion you
wish to detect (Any change in the parameters: sample size estimate will change accordingly)
Table of Percentiles (p. 33) α, β z1-β, z1-α
(one-sided) z1-α/2 (two-sided)
0.001 3.09 3.29
0.005 2.58 2.81
0.01 2.33 2.58
0.025 1.96 2.24
0.05 1.645 1.96
0.10 1.28 1.65
0.20 0.84 1.28
0.30 0.52 1.04
Hypothesis testing One-sample test*** Population Variance known
Conclusion: These data indicate that the true mean (test variable) for (study population) is statistically significantly/not statistically significantly different from/lower than/higher than (theoretical population parameter) (p-value!).
0
/ x
z n µ
σ −
= p-value from Table A.3
One-sample test
Population Variance Unknown
n – 1 degrees of freedom One-sided p-value from Table A.4
0
/ x
t s n
µ− =
Comparing 2 Population Means Paired sample
Paired t-test Data are paired, either because there is pre- & post-
data on the same subjects or two groups of subjects are matched on some factor
d
d t
s n δ−
=
Again, d.f. = n – 1 & one-sided p-value from Table A.4
(Usually, δ = 0)
Comparing 2 Population Means Independent samples Independent t-test used when neither of the two paired
t-test situations apply, Assuming equal variances,
d.f. = n1 + n2 – 2, one-sided p-value from Table A.4
(Formula for unequal variances found in notes.)
1 2
1 2
2 2 1 1 2 2
1 2
1 1
( 1) ( 1) 2
p
p
x x
n n
n s n
t
n
s
s s
n
−
+
− + − =
+ −
=
Sample Size Calculations Paired sample: 1- or 2-sided
One-sided:
Two-sided:
Get values of z1–α , z1–α/2 , and z1–β from page 33 of Course Reader for all sample size calculations
2 2 1 1
2
( )d z zn α β σ
δ − − +=
2 2 1 / 2 1
2
( )d z zn α β σ
δ − − +=
Sample Size Calculations
Independent samples: 1- and 2-sided
One-sided:
Two-sided:
Gives n per group, so need to double this number to get the total number of subjects required…
2 2 2 1 2 1 1
2
( )( ) per g roup =
z z n α β
σ σ δ
− − + +
2 2 2 1 2 1 / 2 1
2
( )( ) per group
z z n α β
σ σ δ
− − + +=
Comparing 2 Population Medians Paired Samples: Wilcoxon Signed Rank Test
Used when data is paired and NOT normally distributed, or no assumption on data distribution
Rank the differences, eliminate the zero differences, and obtain T = absolute value of the sum of the ranks (take smaller of sum of positive and sum of negative ranks)
If n < 12, use Table A.6 to get one-sided p-value If n > 12, use the “z” approximation and get p-value
from Table A.3 as below
T
T
z T µ σ
= − ( 1)
4T n n
µ +
= ( 1)(2 1)
24T n n n
σ +
= +
Distribution Table of T: Table A.6 Wilcoxon signed-rank Test (sample size 12 or less)
1) T values in the first column 2) Sample size in the first row 3) One-sided p-value in the tables (×2 for 2-sided) 4) For larger sample size: use Table A.3
Comparing 2 Population Medians Independent Samples: Wilcoxon Rank Sum Test
Used when data is NOT paired and NOT normally distributed
W = the sum of the ranks in the group with the smaller sample size.
Use Table provided for small sample size (3-25) Use the asymptotic approximation (for large sample
>25): W
W W
W z
µ σ −
=
( 1) 2
s s L W
n n n µ
+ + =
( 1) 12
s L s L W
n n n n σ
+ + =
Distribution Table of W: Wilcoxon Rank Sum Test (sample size 3 to 25)
1) Column m: smaller sample size. 2) For equal sample size, use the one with the lower sum 3) Two sets of values: for different levels of significance 4) For larger sample size: Table A.3
Proportions: Confidence intervals
Confidence interval where the population proportion value lies, based on a SAMPLE proportion
Construct 95% C.I.:
1 / 2 ˆ ˆ
ˆ ,
ˆ ˆwhere 1
pq p z
n q p
α−±
= −
Proportions One-sample test for proportion One-sample test for proportion
• : estimated proportion from the test sample •p0: estimated proportion from a population sample
0
0 0
ˆ z
p p p q
n
= −
p̂
p-value from Table A.3
Comparing population proportions Independent Samples: Pearson’s Chi-square test with Yates Continuity Correction
Used to examine association between exposure and outcome, both of which are dichotomous (e.g, yes/no) and the exposure or disease groups are independent
OR = ad/bc Interpretation of OR: Those exposed are “…”
times as likely to develop the outcome as compared to those unexposed
Comparing population proportions Independent Samples: Pearson’s Chi-square test with Yates Continuity Correction
For 2×2 tables, d.f. = 1, and 2-sided p-value from table A.8
Variable B (outcome) Yes (1) No (0)
Variable A Yes (1) a b a+b (exposure) No (0) c d c+d
a+c b+d N
( )22 / 2 ( )( )( )( )
n ad bc n a b c d a c b d
χ − −
+ + + + =
Comparing population proportions Paired Samples: McNemar’s Chi-square test Used to examine association between exposure
and outcome, both of which are dichotomous (e.g, yes/no) but the exposure or disease groups are NOT independent, e.g. matched case-control studies when cases are matched to controls on age, sex, etc…
OR = b/c and same interpretation as that of Pearson’s chi-square test outcome Cases
Exposure Yes No Controls Yes a b a+b
No c d c+d a+c b+d N
Comparing population proportions Paired Samples: McNemar’s Chi-square test Each cell in the 2×2 table now represents the
number of pairs that fall into the exposure- outcome pattern
( )22 11 , dfb c b c
χ − −
+ = =
outcome Cases Exposure Yes No
Controls Yes a b a+b No c d c+d
a+c b+d N
Comparing Population Proportion r×c Contingency Tables
Used to examine association between exposure and outcome, but one or both may contain more than 2 categories
Must calculate expected numbers for each cell then compute statistic by summing over all cells
( )22 1 1
, df ( 1)( 1)
i j ij
cr ij ij
i j ij
r c n
E r c
E
E
O χ
= =
=
− = = − −∑∑
Sample Size Calculations for Proportions One-sided:
Two-sided:
( ) 2
1 1 1 1 2 2
2 2 1
2 per group
( )
pq z p qz n
p
p q
p α β− −
+ + −
=
( ) 2
1 / 2 1 1 1 2
2
2
2 1
per 2
) group
(
pq z p q p q n
p p
z α β− − + +
= −
Study Designs in Medical Research
Interventional Studies (experimental) -Randomized controlled trial -Non-randomized comparative trial Observational Studies -Cohort study (prospective, follow-up study) -Case-control study (retrospective study) -Cross-sectional study Descriptive
Observational Study designs Cross-sectional Study
Exposure and outcome assessed for all study subjects at roughly the same time
Cohort (Prospective) Study Choose a sample of people from population that have or don’t
have a specific exposure (usually a suspected risk factor) and follow them over a period of time to see who develops the disease
Case-control (Retrospective) Study Choose a sample of cases (diseased people) and controls
(healthy people) and ask retrospectively about exposure status
Where to start?? Which test? One sample vs. two sample? If two sample, independent vs. matched? Outcome continuous vs. categorical? If continuous, normal vs. non-normal? If categorical, dichotomous or multiple categories? Exposure: continuous or categorical Two-sided vs one-sided? “Different” vs. “higher” (“lower”) Degree of freedom? p-value?
Hypothesis Testing: Statistical Methods Dependent Variable Independent
Variable Groups Statistical Test
type distribution paired Independent
continuous normal 1 One sample test for means (z or t )
continuous normal categorical 2 Paired t-test 2-sample t-test, Welch t-test
Continuous (& others)
non-normal categorical 2 Wilcoxon signed rank test
Wilcoxon rank sum test
continuous normal categorical >2 Anova Anova
continuous non-normal categorical >2 Kruskal-Wallis Freidman
continuous normal
continuous
Pearson Correlation, Linear regression
continuous non-normal continuous Spearman Correlation
categorical One sample test for proportion
categorical categorical 2*2 McNemar’s Chi-square test
Chi-square test (Yates-corrected)
categorical categorical >2*>2 R×C contingency
categorical, time to event, Categorical/ continuous
Regression (Linear, Logistic, cox,) log-rank etc. (complicated modellings with covariate adjustment)
What if? No clear assertion on distribution/ normality? Go for parametric with a big sample size (>25)…but
mention "assuming data is normally distributed” Sample <25, non-parametric, but mention “ no assumption
about the data distribution was made” No clear assertion on equality of variance? You can check the two sample variances and if 𝑠𝑠1
2 𝑠𝑠2 2⁄ <
4, then the population variances are assumed to be equal; otherwise they are unequal
Name this test… A study compared adolescents who have bulimia to
healthy adolescents with similar body composition and levels of physical activity. The data collected were measures of daily caloric intake for a random sample of 23 bulimic adolescents and 15 healthy ones. The histogram shows a long left tail and they wish to test the hypothesis that there is a difference in caloric intake in bulimic individuals compared to healthy individuals.
Wilcoxon Rank Sum Test, two-sided
Daily caloric intake a continuous variable, data are not normally distributed, and are independent (not paired)
Name this test… A study compared the levels of carboxyhemoglobin
for a group of non-smokers and a group of cigarette smokers. Sample means and standard deviations were calculated. It is believed that the mean carboxyhemoglobin level of the smokers must be higher than the mean level of the nonsmokers. Population variances are assumed equal.
Independent t-test, equal variances, and one-sided -Carboxyhemoglobin level a continuous trait,
population variances, though assumed equal, are NOT known, and the two groups are NOT matched
Name this test?? A study of the risk factors for invasive cervical cancer
was conducted in Germany. This study looked at the presence of cervical cancer and whether the patient was a smoker or nonsmoker.
Pearson’s Chi-squared test with Yates continuity
correction Both exposure (smoking) and outcome (cervical cancer)
dichotomous and the data are not paired
Name this test… In a population based cross-sectional study, the level of
glycosylated hemoglobin (HbA1C) was measured in participants with or without Diabetic Retinopathy (DR). Assuming normality and equal variances, of HbA1C, what would be the right statistical method to test if there was any difference in HbA1C level between people with and without DR?
Independent sample t-test, assuming equal variance and two-sided.
HbA1C level a continuous trait and the two groups are NOT matched.
Name this test… 19 individuals with asthma were enrolled in a study investigating
the respiratory effects of sulfur dioxide. During the study, two measurements were obtained for each subject. The first is the increase in specific airway resistance (SAR)—a measure of bronchoconstriction—from the time when individual is at rest until after he or she has been exercising for 5 minutes; the second is an increase in SAR for the same subjects after similar exercise test in an atmosphere of 0.25 ppm sulfur dioxide. No assumption about the data distribution was made
Wilcoxon Signed Rank test SAR is a continuous outcome, no assumption about data
distribution, and data is paired (pre/post measurement on same individual)
Name this test… In a survey conducted in Italy, physicians with different
specialties (internal, surgery, radiotherapy, oncology, and gynecology) were questioned regarding the surgical treatment of early breast cancer. In particular they were asked whether they would recommend radical surgery regardless of patient’s age, conservative surgery only for younger patients, or conservative surgery regardless of age.
r×c Chi-Squared Both exposure (physician specialty) and outcome (surgery
recommendations) are categorical variables with more than 2 categories
Name this test? You are interested in investigating the association
between retirement and heart disease. In one study, 127 victims of cardiac arrest were matched to 127 healthy individuals; retirement status was ascertained for each subject. Test that there is an association between retirement status and cardiac arrest.
McNemar’s Chi-squared test Dichotomous exposure (retirement) and outcome (heart
disease) and data is matched!
- PM 510 MIDTERM REVIEW
- Course Outline
- Types of Data (Variables)
- Types of Data (continued)
- Identify and classify into:
- Measures of Central Tendency
- Measures of Variability (Dispersion)
- Histograms
- Randomization
- Means�(Normally distributed continuous numerical data)
- Normal Range vs. Confidence Interval
- More on Confidence Intervals��Population Variance known
- More on Confidence Intervals�Population Variance Unknown
- Slide Number 14
- Table A.4: t-distribution
- Hypotheses Testing
- �Procedures for �Testing Statistical Hypotheses
- Procedures for Testing �Statistical Hypotheses (continued)
- Sample Size Estimation
- Sample size: key statistics
- Table of Percentiles (p. 33)
- Hypotheses Testing for Means�(Normally distributed continuous data)
- Hypothesis testing�One-sample test***�Population Variance known
- One-sample test��Population Variance Unknown
- �Comparing 2 Population Means�Paired sample
- Comparing 2 Population Means�Independent samples
- Sample Size Calculations�Paired sample: 1- or 2-sided
- Sample Size Calculations��Independent samples: 1- and 2-sided
- Hypotheses Testing for Medians�(non-normally distributed continuous, discrete or ordinal data)
- Comparing 2 Population Medians�Paired Samples: Wilcoxon Signed Rank Test
- Distribution Table of T: Table A.6�Wilcoxon signed-rank Test (sample size 12 or less)
- Comparing 2 Population Medians�Independent Samples: Wilcoxon Rank Sum Test
- Distribution Table of W: �Wilcoxon Rank Sum Test (sample size 3 to 25)
- Proportions�(categorical data)
- �Proportions: Confidence intervals
- Hypotheses Testing for Proportions
- Proportions�One-sample test for proportion�
- Comparing population proportions�Independent Samples: Pearson’s Chi-square test with Yates Continuity Correction
- Comparing population proportions�Independent Samples: Pearson’s Chi-square test with Yates Continuity Correction
- Comparing population proportions�Paired Samples: McNemar’s Chi-square test
- Comparing population proportions�Paired Samples: McNemar’s Chi-square test
- Comparing Population Proportion�rc Contingency Tables
- Sample Size Estimation for Proportions
- Sample Size Calculations for Proportions
- Study Designs
- Study Designs�in Medical Research
- Observational Study designs
- Where to start?
- Where to start??
- Hypothesis Testing: Statistical Methods
- What if?
- Name this test…
- Name this test…
- Name this test??
- Name this test…
- Name this test…
- Name this test…
- Name this test?