10
Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Embed Size (px)

Citation preview

Page 1: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Case Study - Relative Risk and Odds Ratio

John Snow’s Cholera Investigations

Page 2: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Population Information

• 2 Water Providers: Southwark & Vauxhall (S&V) and Lambeth (L)– S&V: Population: 267625 # Cholera Deaths: 3706– L: Poulation: 171528 # Choleta Deaths: 411

85.5002402.

014042.78.5

002396.

013848. :V/L)&(SPopulation

002402.002396.1

002396.)|(002396.

171528

411)|(

014042.013848.1

013848.)&|(013848.

267625

3706)&|(

ORRR

LDoddsLDP

VSDoddsVSDP

Page 3: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Sampling Distribution of RR & OR• Goal: Obtain Empirical Sampling Distributions of

sample RR and OR and observe coverage rate of 95% Confidence Intervals

• Process: Take independent random samples of size nSV and nL from the 2 populations and observe XSV and XL deaths in sample. These XSV and XL are approximately distributed as Binomial random variables (approximate due to sampling from finite, but very large, populations)

)002396.0,(~)013848.0,(~ LLLSVSVSV pnBXpnBX

Page 4: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Binomial Distribution for Sample Counts

• Binomial “Experiment”– Consists of n trials or observations

– Trials/observations are independent of one another

– Each trial/observation can end in one of two possible outcomes often labelled “Success” and “Failure”

– The probability of success, p, is constant across trials/observations

– Random variable, X, is the number of successes observed in the n trials/observations.

• Binomial Distributions: Family of distributions for X, indexed by Success probability (p) and number of trials/observations (n). Notation: X~B(n,p)

Page 5: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Binomial Distributions and Sampling

• Problem when sampling from a finite sample: the sequence of probabilities of Success is altered after observing earlier individuals.

• When the population is much larger than the sample (say at least 20 times as large), the effect is minimal and we say X is approximately binomial

• Obtaining probabilities:

nkknk

n

k

npp

k

nkXP knk ,,1,0

)!(!

!)1()(

Table C gives probabilities for various n and p. Note that for p > 0.5, use 1-p and you are obtaining P(X=n-k)

Page 6: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Simulating Binomial RVs

• Select n and p• Obtain n random numbers distributed uniformly

between 0 and 1 (any software package should have built-in random number generator): U1,…,Un

• Let X be the number of Ui values that p

• X~B(n,p)• Finite population adjustments can be made by

“correcting” p after each draw• EXCEL has built in Function:

– Tools --> Data Analysis --> Random Number Generation

– --> Binomial --> Fill in p and n

Page 7: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Simulation Example• Simulate by taking samples of nSV=nL=5000 individuals

from each population of customers

• Generate XSV~B(5000,.013848) and XL~B(5000,.002396)

• Compute sample relative risk, ln(RR), odds ratio, ln(OR), and estimated std. errors of ln(RR) and ln(OR)

• Obtain 95% CIs for RR, OR (based on ln(RR),ln(OR) • Repeat for a large number of samples (1000 samples)• Obtain the empirical distribution of each statistic • Obtain an indicator of whether the 95% CI for RR

contains the population RR (5.78) and whether the 95% CI for OR contains the population OR (5.85)

Page 8: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Computations

OR and RRfor CIsget toln(OR) and ln(RR)for CIs of

boundsupper andlower theofpower the to...718.2 Raise

))(ln(1.96ln(OR) :ln(OR) populationfor CI %95

))(ln(1.96ln(RR) :ln(RR) populationfor CI %95

5000

11

5000

11))(ln(

11))(ln(

)5000(

)5000(

50005000

^^

^

^

^^

e

ORSE

RRSE

XXXXORSE

X

p

X

pRRSE

XX

XX

odds

oddsOR

X

X

p

pRR

X

n

Xp

X

n

Xp

LLSVSV

L

L

SV

SV

SVL

LSV

L

SV

L

SV

L

SV

L

L

LL

SV

SV

SVSV

Page 9: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Histogram of (Sample) Relative Risks

0

10

20

30

40

50

60

70

2.5

3.3

4.1

4.9

5.7

6.5

7.3

8.1

8.9

9.7

10.5

11.3

12.1

RR

Fre

qu

en

cy

Note that the distribution of Relative Risks is not normal

Page 10: Case Study - Relative Risk and Odds Ratio John Snow’s Cholera Investigations

Histogram of Sample ln(RR)

020406080100120140

1

1.2

1.4

1.6

1.8 2

2.2

2.4

2.6

2.8 3

3.2

More

ln(RR)

Fre

qu

en

cy

Note that distribution of ln(RR) is approximately normal