91
Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons Basic Biostatistics in Medical Research Lecture 2: Two Group Comparisons Leah J. Welty, PhD Biostatistics Collaboration Center (BCC) Department of Preventive Medicine NU Feinberg School of Medicine 10/11/11

Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

  • Upload
    lydan

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Basic Biostatistics in Medical Research

Lecture 2: Two Group Comparisons

Leah J. Welty, PhDBiostatistics Collaboration Center (BCC)

Department of Preventive MedicineNU Feinberg School of Medicine

10/11/11

Page 2: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Objectives

• Assist participants in interpreting statistics published in medical literature

• Highlight different statistical methodology for investigators conducting own research

• Facilitate communication between medical investigators and biostatisticians

10/11/11

Page 3: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Two Group Comparisons• Compare on continuous or categorical?

– Compare SBP between two groups– Compare rate of Hodgkin’s between two groups

• Samples paired or independent?– Measure on right and left hand each subject– Measure right hand one group, left hand other group

• Parametric or nonparametric?– Data satisfy necessary assumptions or not

• Looking for association or agreement?– Tonsillectomy a risk factor for Hodgkin’s (association)– Two radiologists evaluating mammograms for cancer (agreement)

10/11/11

Page 4: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Two Group Comp (Association)

Continuous or Categorical

Paired or Independent

Pairedor Independent

Binary or > 2 Categories

Parametric or Nonparametric

Parametric or Nonparametric

Parametric or Nonparametric

Parametric or Nonparametric

Paired t-test

Wilcoxon Signed Rank Sum

Two Sample t-test

Mann Whitney Test(Wilcoxon Rank Sum)

McNemar’s Test

Exact Binomial Methods (Exact McNemar)Pearson’s chi-squared test

Fisher’s Exact Test

Parametric or Nonparametric

10/11/11

Page 5: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Examples of Paired Data

• Each subject measured before and after tx

• Subjects recruited in matched pairs– match age, postal code, diagnosis– one of pair gets tx A, the other gets tx B

• Twins or child/parent pairs

• Lab experiment with control and treatment samples handled in parallel

10/11/11

Page 6: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Paired Procedures: When to Use

• If experimental design is paired, should use stats that account for pairing.

• Pairing arranged before data collected.

• If use stats that don’t account for pairing on paired data, you’re throwing away good information!

10/11/11

Page 7: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Independent Groups• Most common analyses for comparing two

independent groups of observations

• Observations in one group independent of observations in other group

• Many clinical trials – treatment group independent of control group

• Observational Studies– sample individuals independently of each other

10/11/11

Page 8: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

SBP and OC Examples: Paired & Independent

• Longitudinal Study– Recruit nonpregnant, premenopausal women age 16-49 who are

not currently OC users– Measure their baseline BP– Re-screen 1 year later. Measure BP on women who have

become OC users.– Examine mean difference between baseline and follow-up SBP.– Values are paired

• Cross-Sectional Study– Recruit OC users and non-OC users among study population– Compare SBP of OC group to SBP of non-OC group– Groups are independent

10/11/11

Page 9: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Continuous Variable Between

Two Paired Groups

Paramertic Methods (Comparing Means)

10/11/11

Page 10: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

OC and SBP Example I (Paired)

• Does OC use change SBP?Subj SBP pre OC SBP while OC Diff

1 115 128 132 112 115 33 107 106 -14 119 128 95 115 122 76 138 145 77 126 132 68 105 109 49 104 102 -2

10 115 117 210/11/11

Page 11: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Paired t-test

• Mean difference = 4.8, sd difference = 4.6

• Estimated SE = SD/√n = 1.45

• Assuming differences in SBP are normally distributed, the mean differences for a sample of 10 has t9 distribution

• 95% CI: 4.8 ± 2.25 * SE = (1.5, 8.1) mm HgFrom t9 distribution

10/11/11

Page 12: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Paired t-test Con’t• Hypothesis Test

H0: mean difference = 0 (no change in SBP)Ha: mean difference ≠ 0 (some change in SBP)

• If mean difference is 0, what is probability of observing a sample of 10 with a mean difference as or more extreme as 4.8 mm Hg?

p-value = 0.01

• Reject H0 in favor of Ha.

• Note: 0 not in 95% CI (1.5, 8.1) and p-value < 0.05

10/11/11

Page 13: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Assumptions Paired t-test

• Assume differences are normally distributed (or n is large) for t-test

• Measurements themselves do not need to be normally distributed

• What if we can’t assume differences are normally distributed and/or n is not large?

10/11/11

Page 14: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing Continuous Variable Between

Two Paired Groups

Nonparamertic Methods (Comparing Medians, Ranks)

10/11/11

Page 15: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Wilcoxon Signed Rank Sum• Nonparametric analog to paired t-test

• For each pair, compute difference

• Rank (small to large) the absolute differences– Also ignore any differences = 0

• Add up ranks of positive differences, negative differences

• Compare the sums

10/11/11

Page 16: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Wilcoxon Signed Rank Sum

Diff Absolute Diff Sign Ranks13 13 + 10

3 3 + 4-1 1 - 19 9 + 97 7 + 7.57 7 + 7.56 6 + 64 4 + 5

-2 2 - 2.52 2 + 2.5

sum “+” ranks = 51.5

sum “-” ranks = 3.5

• SBP and OC use

10/11/11

Page 17: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Wilcoxon Signed Rank Sum

• If effect of OC on SBP, would we expect to see a difference in the rank sums as or more extreme?

• 3.5 vs. 51.5• p-value = 0.02

• Caveats for Wilcoxon Signed Rank Sum– p-value changes if transform data (e.g. take logs)– assumes differences symmetric about zero – approximate for ties in ranks– sometimes used for comparison of ordinal data

10/11/11

Page 18: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Continuous Variable Between

Two Independent Groups

Paramertic Methods (Comparing Means)

10/11/11

Page 19: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

OC and SBP Example II

• Does OC use change SBP?• Sample 1

– 8 35-39 year old women nonpregnant OC users• Sample 2

– 21 35-39 year old women nonpregnant not OC users

n mean sd

OC 8 132.86 mm Hg 15.34 mm Hg

non-OC 21 127.44 mm Hg 18.23 mm Hg

10/11/11

Page 20: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

T-test for Independent Groups

• The difference in sample means will follow a tn1+n2–2 distribution IF– observations in pop 1 normally distributed– observations in pop 2 normally distributed– populations have same variance (or true std dev)

• n1 + n2 – 2 degrees of freedom• Estimated SE of difference in sample means:

2121

222

211 11

2)1()1(

nnnnsdnsdn

Pooled SD Analogous to √n for one sample10/11/11

Page 21: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

T-test for Independent Groups

• For OC and non-OC groups

Diff in means = 132.86–127.44 = 5.42 mm HgSE = 7.282 mm Hgn1 + n2 – 2 = 8 + 21 – 2 = 27t27 distribution

– 95% CI for mean diff:5.42 ± 2.052 * SE = (-9.5, 20.4) mm Hg

From t27 distribution10/11/11

Page 22: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Paired vs Independent Comparisons of SBP

• Paired– Eliminate heterogeneity in baseline SBP levels by

subtracting before and after values– Drift over time?

• Independent– Heterogeneity in baseline SBP levels implies

additional variation to account for– Two samples have different SBP levels because

• they’re different subjects• possibly because they differ by OC/non-OC use

10/11/11

Page 23: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

T-test Assumptions

• Ways to test equal variance assumption– F-test with ratio of standard deviations

• t-procedures exist to compare means for populations with unequal variances– debate over usefulness

10/11/11

Page 24: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Continuous Variable Between

Two Independent Groups

Nonparamertic Methods (Comparing Ranks)

10/11/11

Page 25: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Mann-Whitney Test

• What if we can’t assume the underlying distributions are normal and/or n is small?

• Mann-Whitney U Test– Compares ranks between groups– Analogous to Wilcoxon Rank Sum

• Same result, slightly different method • Wilcoxon Rank Sum ≠ Wilcoxon Signed Rank Sum

– Complicated corrections if lots of ties

10/11/11

Page 26: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Receptors on Lymphocytes

• Independent (unmatched) samples

• Number of receptors on lymphocytes

• small sample sizes

• Underlying distributions may not be normal

Control Drug

1162 892

1095 903

1327 1164

1261 1002

1103 961

1235 875

10/11/11

Page 27: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Mann Whitney Test

• Rank all values (small to large) ignore grouping

• Sum ranks in each group

• Test compares sums of ranks

• Software or tables for p-values

10/11/11

Page 28: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Mann Whitney Test

Control Drug

1162 (8) 892 (2)

1095 (6) 903 (3)

1327 (12) 1164 (9)

1261 (11) 1002 (5)

1103 (7) 961 (4)

1235 (10) 875 (1)

Sum of ranks = 56

Sum of ranks = 24

p = 0.015

(ranks shown in parenthesis)

10/11/11

Page 29: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Side Note on Mann Whitney Test

• Also useful for some ordinal or rank data– e.g. visual acuity

– Can assign ranks, but not take means

Treatment Group Control Group

20-30 20-40

20-20 20-240

20-100 20-60

10/11/11

Page 30: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Binary Categorical Variable Between Two Groups

A Few More Summary Statistics

10/11/11

Page 31: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Two Group Binary Comparison

• Typical data format

• Often coded by 0s and 1s

Subject Exposure Disease1 yes yes2 yes no3 no yes…n no no

Subject Exposure Disease1 1 12 1 03 0 1…n 0 0

10/11/11

Page 32: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

2 x 2 Contingency Tables

• Classic Setup

• Is proportion diseased (binary variable) different between exposed and unexposed groups?

Exposed Unexposed

Disease A B A + B

Not Diseased C D C + D

A + C B + D A + B + C + D

10/11/11

Page 33: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Additional Summaries: Relative Risk

• Cohort Study: Vitamin A & Blindness– Sommer & colleagues followed >25,000

children in Indonesia

– Prop died among Vit A = 101/12,991 ~ 0.8%– Prop died among Plcbo = 130/12,209 ~ 1.1%

Vitamin A PlaceboDied 101 130Survived 12,890 12,079

12,991 12,209

10/11/11

Page 34: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Relative Risk

• Relative Risk (RR)

• RR = 0.8/1.1 = 0.73• Children taking Vitamin A were about 27% less likely to

die than those not taking Vitamin A.• Difference due to sampling variability, or is Vitamin A

protective for mortality?

RR = risk of disease in exposed grouprisk of disease in unexposed group

Vitamin A PlaceboDied 101 130Survived 12,890 12,079

12, 991 12,209

10/11/11

Page 35: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Additional Summary: Odds Ratio

• Odds Ratio (OR)

• OR = (101/12,890)/(130/12,079) = 0.73• The odds of disease in the exposed group are

27% smaller than those for the unexposed group.

OR = odds of disease in exposed groupodds of disease in unexposed group

Vitamin A PlaceboDied 101 130Survived 12,890 12,079

12, 991 12,209

10/11/11

Page 36: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Notes on the Odds Ratio• 0 < OR < ∞

– OR > 1 exposure has promoting effect for disease– OR < 1 exposure has protective effect for disease– OR = 1 no effect of exposure on disease

• If a disease is rare, OR ~ RR

• OR works for any study you can compute an RR for

• RR cannot be computed in a case-control study, OR can

• OR is modeled in logistic regression10/11/11

Page 37: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Binary Categorical Variable Between

Two Independent Groups

Parametric Methods(Comparing Proportions)

10/11/11

Page 38: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Hodgkin’s Example I

• Compare proportion Hodgkin’s for groups w/ and w/o tonsillectomies

• Suspect that tonsils are protective• Case-control study (controls unmatched)• Vianna, Greenwald, and Davies (1971)

Tonsillectomy Hodgkin’syes yesyes no…no no

10/11/11

Page 39: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Hodgkin’s Example I Con’t

• prop of tonsillectomy among cases = 67/101 = 66%

• prop of tonsilectomy among controls = 43/107 = 40%

• OR of Hodgkin’s comparing tonsillectomy group to group w/ tonsils

= ( 67/ 43) / (34 / 64) = 2.93

• Note: we cannot compute relative risk (RR).

Tonsillectomy No TonsillectomyHodgkins 67 34Control 43 64

10/11/11

Page 40: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Null Hypotheses• Two hypothesis tests

H0: no association Ha: assoc btw Hodgkin’s & tonsillectomy

Or (in some cases) equivalently

H0: prop of tonsillectomy in cases (p1)= prop of tonsillectomy in controls (p2)

Ha: proportion of tonsillectomy in cases (p1) ≠ prop of tonsillectomy in controls (p2)

• Pearson’s chi-squared for association is equivalent to normal theory method for testing difference in proportions (pooled version)

10/11/11

Page 41: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Null Hypotheses• Two hypothesis tests

H0: no association Ha: assoc btw Hodgkin’s & tonsillectomy

Or (in some cases) equivalently

H0: prop of tonsillectomy in cases (p1)= prop of tonsillectomy in controls (p2)

Ha: proportion of tonsillectomy in cases (p1) ≠ prop of tonsillectomy in controls (p2)

• Pearson’s chi-squared for association is equivalent to normal theory method for testing difference in proportions (pooled version)

(e.g. OR = 1)

(e.g. OR ≠ 1)

10/11/11

Page 42: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Pearson’s Chi-squared test

• Compute expected cell counts if independent• Observed:

• Expected:Tonsillectomy No Tonsillectomy

Hodgkins 53.4 47.6 101Control 56.6 50.4 107

110 98 208

Tonsillectomy No TonsillectomyHodgkins 67 34 101Control 43 64 107

110 98 208

Expected count = row total x column totaltotal

10/11/11

Page 43: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Chi-squared statistic

• Compute Chi-squared statistic, based on weighted squared differences Σ (expected – observed)2/expected

• Our chi-squared statistic will have a Chi-squared distribution with 1 degree of freedom IF – expected counts all > 5

AND– total number of subjects > 20 or 40

10/11/11

Page 44: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Chi-squared results for Hodgkin’s I

• Chi-squared statistic = 14.46• Smallest expected cell is ~ 47• Have more than 20 subjects

• Therefore our statistic has Chi-squared 1 distribution

0 14.26

p-value = 0.0002Therefore reject H0 in favor of Ha.

10/11/11

Page 45: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Chi-squared results for Vitamin A

• Chi-squared statistic = 5.74• Smallest expected cell is ~ 112• Have (way) more than 20 subjects

• Therefore our statistic has Chi-squared 1 distribution

0 5.74

p-value = 0.016

Therefore reject H0 (Vitamin A no effect on mortality) in favor of Ha(assoc between Vitamin A and mortality).

10/11/11

Page 46: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Notes on Chi-Squared Distribution

• Many different applications of Chi-squared– Testing categorical vars between two groups

• 2 x k tables• Similar to Chi-squared procedures for 2 x 2 tables

• Degrees of freedom depend on application– 2 x 2 contingency tables always 1 df

• Yates continuity correction (not recommended)

10/11/11

Page 47: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Binary Categorical Variable Between

Two Independent Groups

Nonarametric Methods(Comparing Proportions)

10/11/11

Page 48: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Alternative to Chi-squared

• What if– Expected cell count(s) ≤ 5?– Total subjects ≤ 20?

• Traditional advice: Fisher’s Exact Test– Nonparametric Alternative to Chi-squared

10/11/11

Page 49: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Fisher’s Exact Test

• Without changing row or column totals, create all other possible tables– Observed

– Another possibility

Tonsillectomy No TonsillectomyHodgkins 67 34 101Control 43 64 107

110 98 208

Tonsillectomy No TonsillectomyHodgkins 30 71 101Control 80 27 107

110 98 208

10/11/11

Page 50: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Fisher’s Exact Test

• What percent of tables have association as strong or stronger than ours?

Generated table:

p-value = 0.0002

OR = 0.14 Tonsillectomy No TonsillectomyHodgkins 30 71 101Control 80 27 107

110 98 208

10/11/11

Page 51: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Chi-squared vs. Fisher’s Exact• Fisher’s Exact Test computationally intensive

• Fisher’s Exact Test and the Chi-squared test will give (approximately) the same p-values if Chi-squared test valid

• OLD ADVICE:

– For small-medium data sets use Fisher’s Exact

– For large samples (1000s) use Chi-squared

10/11/11

Page 52: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

• NEW ADVICE

– Many times, Fisher’s exact test will give “the right” value

– Fisher’s exact test conditions on marginal counts that may not be fixed by design

• e.g. numbers of Hodgkin’s and controls were (approximately) fixed, but the tonsillectomy counts were not

– Possible p-values become discrete (e.g. either p < 0.03 or p > 0.08)

– If sensitive/important/borderline, talk to a statistician

Chi-squared vs. Fisher’s Exact

10/11/11

Page 53: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Comparing a Binary Categorical Variable Between

Two Paired Groups

Parametric Methods(Comparing proportions of discordant pairs)

10/11/11

Page 54: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Hodgkin’s Example II• Again Hodgkin’s and tonsillectomies

• Case-control study (controls matched)– 85 Hodgkin’s who had sibling w/in 5 yrs age and same sex– sibling was matched control

• Johnson & Johnson (1972)

Tonsillectomy(Hodgkin’s) Tonsillectomy(Sibling)yes yesyes no…no no

10/11/11

Page 55: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

WRONG Analysis Hodgkin’s II

• Create 2 x 2 contingency table

• Pearson’s chi-squared test• Chi-squared statistic = 1.53• p-value = 0.22• No evidence tonsillectomy assoc w/ Hodgkin’s• Contradicts earlier study!

Tonsillectomy No TonsillectomyHodgkins 41 44Control 33 52

10/11/11

Page 56: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

INCORRECT SLIDEWhat went wrong?

• Contingency table ignored pairings!

• Better contingency table shows pairings

Tonsillectomy No TonsillectomyHodgkins 41 44Control 33 52

Tonsillectomy No TonsillectomyTonsillectomy 37 7No Tonsillectomy 15 26

Sibling

Hodgkin’s

10/11/11

Page 57: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

What went wrong? (correction shown in green)

• Contingency table ignored pairings!

• Better contingency table shows pairings

Tonsillectomy No TonsillectomyHodgkins 41 44Control 33 52

No Tonsillectomy No TonsillectomyNo Tonsillectomy 37 7No Tonsillectomy 15 26

Sibling

Hodgkin’s

10/11/11

Page 58: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

McNemar’s Test Hodgkin’s II

• The concordant pairs have the same exposure (tonsillectomy, tonsillectomy) or (no, no) & don’t tell you anything about the association between exposure & disease.

• Need to look at the discordant pairs.No Tonsillectomy Tonsillectomy

No Tonsillectomy 37 7Tonsillectomy 15 26

Sibling

Hodgkin’s

10/11/11

Page 59: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

McNemar’s Test Hodgkin’s II

• Compare – prop of pairs in which sibling had

tonsillectomy but patient did not 7/85 = 8%TO

– prop of pairs in which sibling did not have tonsillectomy but patient did 15/85 = 17%

No Tonsillectomy TonsillectomyNo Tonsillectomy 37 7Tonsillectomy 15 26

Sibling

Hodgkin’s

10/11/11

Page 60: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

McNemar’s Test Hodgkin’s II• If there was no association between tonsillectomy, we would expect

these 7 + 15 pairs to be equally divided between the two cells (so expect 11 in each).

• Is the distribution of the discordant pairs extreme enough for us to reject the null?

• p = 0.09

• Less doubt about previous results?

No Tonsillectomy TonsillectomyNo Tonsillectomy 37 7Tonsillectomy 15 26

Sibling

Hodgkin’s

10/11/11

Page 61: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

McNemar’s Test

• Confession: McNemar’s also uses a chi-squared distribution, but different than previous calcs

• What to do if # discordant pairs ≤ 10?

• Nonparametric versions of McNemar

– Using exact binomial procedures– Sometimes called “Exact McNemar”– Use computer program, talk to statistician

10/11/11

Page 62: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Testing for Agreement

Categorical Variable (Kappa)Continuous Variable (Intraclass Correlation)

10/11/11

Page 63: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Categorical Variable

• Two radiologists examine 100 mammograms

• Rate by ‘normal’ or ‘not normal’• Want measure of agreement, not

association• Chi-squared and McNemar for association• Use Kappa statistic

10/11/11

Page 64: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Categorical Variable

• Observed concordance = (35 + 35)/100 = 70%

• Expected concordance (if independent) = 45/100 * 55/100 + 55/100 * 45/100 = 49.5%

• Kappa = (obs conc – exp conc) / (1 – exp conc) = 0.406

Normal Not NormalNormal 35 10Not normal 20 35

Radiologist 2

Radiologist 1

10/11/11

Page 65: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Categorical Variable

• 0 ≤ Kappa ≤ 1• Reproducibility Guidelines

Kappa > 0.75 Excellent0.40 ≤ Kappa ≤ 0.75 Good

0 ≤ Kappa < 0.40 Marginal/Poor

• Also for variables with > 2 categories10/11/11

Page 66: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Continuous Variable

• Blood pressure highly variable w/in person

• How does measurement of BP at a single doctor’s visit relate to ‘true’ BP (i.e. average BP over a period of time)?

• Compute intraclass correlation, or reliability coefficient (rho)

10/11/11

Page 67: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Continuous Variable

• (Random effects ANOVA)• Reproducibility interpretation

rho < 0.40 Poor0.40 ≤ rho < 0.75 Fair/Good

rho ≥ 0.75 Excellent

• rho for BP at single visit and “true” BP = 0.89• rho for average BP at 3 visits and “true” = 0.92

10/11/11

Page 68: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Agreement on Continuous Variable

• Cannot use `regular’/Pearson correlation!

Person 1 2 3 4 5 6 7 8 9 10Single BP 80 81 82 83 84 85 86 87 88 89`True’ BP 90 91 92 93 94 95 96 97 98 99

• Pearson correlation = 1• But agreement is poor; rho = 0.15

10/11/11

Page 69: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Brief words on power and sample size

10/11/11

Page 70: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Why power/sample size?

• Granting agencies require a justification of sample size.

• Too much power (e.g. too many N) may be more costly, and may claim “significant” results that are not clinically relevant.

• A study that lacks power (e.g. not enough N) will not be “significant” – even if results are clinically meaningful. There is a known publication bias against studies with negative findings.

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons10/11/11

Page 71: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Fundamental point

• [Studies] should have sufficient statistical power (usually 80%) to detect differences considered to be of clinical interest between groups.

• To be assured of this without compromising levels of significance, a sample size calculation should be considered early in the planning stages.

Friedman, L.M., Furberg, C.D., and DeMets, D.L. Fundamentals of Clinical Trials, 3rd Edition. New York: Springer-Verlag, 1998.

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons10/11/11

Page 72: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power and Sample Size

Power is related to a testing a specific hypothesise.g. clinical trial (Is drug A better than drug B?)

For descriptive studies, there may be no central hypothesis e.g. estimate the prevalence of autismbase sample size calculations on margin of error

In practice, the power section of grants is typically some combination of both.

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons10/11/11

Page 73: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power Defined

Power = the probability that you reject the null hypothesis, given that the (specific)

alternative is true

= Pr (reject H0 | H1 true)

Acceptable power generally 80-90%. If your alternative hypothesis is true, you want to have a ‘good chance’ of detecting it.

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons10/11/11

Page 74: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

What you need for power/sample size

1. Null hypothesis and (a specific) alternative hypothesis.

2. The appropriate statistical method to test the null hypothesis.

3. Effect size, or variability

4. Level of statistical significance (usually α = 0.05; this should be decided before starting a study)

5. EITHER power or sample size (solve for the other)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 75: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power Example: Smoking & Depression

Research Question: Do elderly smokers have a greater incidence of depression than elderly nonsmokers?

Literature Review:5-year incidence of depression among elderly nonsmokers is 0.20.

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 76: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis

3. Effect size, or variability

Incidence among elderly nonsmokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 77: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squared test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

Two-sided alternative

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 78: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squared test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 79: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squared test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

Talk to your friendly neighborhood

statistician

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 80: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squared test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 81: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squared test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

From literature, your past studies, pilot data, educated guess. Cannot come from the study you’re trying to power!

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 82: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squred test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 83: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squred test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)Typically 0.05. Sometimes 0.01, for example some clinical trials.

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 84: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squred test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 85: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example1. Null hypothesis and (a specific) alternative hypothesis.

H0: incidence of depression is same in elderly smokers and elderly nonsmokers

H1: incidence of depression is different in elderly smokers and elderly nonsmokers

2. The appropriate statistical method to test the null hypothesis chi-squred test

3. Effect size, or variability

Incidence among elderly non-smokers = 0.2Incidence among elderly smokers = 0.3

4. Level of statistical significance α = 0.05

5. EITHER power or sample size 80% power (1 – power = β = 20%)

Usually 80% or 90%.

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 86: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power/Sample Size Example

• Your friendly neighborhood statistician

• Software (SAS, STATA, R, PASS)

• Tables • Simulations

#1 - 5 Sample size or power

293 elderly nonsmokers & 293 elderly smokers

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 87: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Power depends on …• The effect you are trying to detect

smaller effect → harder to detect → larger n

• The level of significanceharder to reject the null (α = 0.01, say), then power decreases

• The sample sizebigger n → more power

• The design of the studySome designs (e.g. pairing) can get you more power for the same n

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 88: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Recommendations

• Well defined research question(s).

• Descriptive or hypothesis driven?

• Identify relevant statistical method

• Literature or pilot studies for effect sizes

• Talk to your friendly neighborhood statistician

10/11/11 Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Page 89: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Next Time

Linear RegressionLogistic Regression

10/11/11

Page 90: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Useful References• Intuitive Biostatistics, Harvey Motulsky, Oxford

University Press, 1995– Highly readable, minimally technical

• Practical Statistics for Medical Research, Douglas G. Altman, Chapman & Hall, 1991– Readable, not too technical

• Fundamentals of Biostatistics, Bernard Rosner, Duxbury, 2000– Useful reference, somewhat technical

10/11/11

Page 91: Basic Biostatistics in Medical Research Lecture 2: Two ... · Two Sample t-test Mann Whitney Test (Wilcoxon Rank Sum) ... – match age, postal code, ... • Nonparametric analog

Biostatistics Collaboration Center (BCC) Lecture 2: Two Group Comparisons

Contact BCC

• Please go to our web site at:

• Fill out our online request form for further collaboration!

http://www.feinberg.northwestern.edu/depts/bcc/

10/11/11