module 23: proportions: confidence intervals and hypothesis tests, two samples

17
23 - 1 Module 23: Proportions: Confidence Intervals and Hypothesis Tests, Two Samples This module examines confidence intervals and hypothesis test for two independent random samples for proportions. Reviewed 06 June 05 /MODULE 23

Upload: shaun

Post on 08-Feb-2016

28 views

Category:

Documents


0 download

DESCRIPTION

Module 23: Proportions: Confidence Intervals and Hypothesis Tests, Two Samples. This module examines confidence intervals and hypothesis test for two independent random samples for proportions. Reviewed 06 June 05 /MODULE 23. Proportions: Two Independent Random Samples. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 1

Module 23: Proportions: Confidence Intervals and Hypothesis Tests, Two

Samples

This module examines confidence intervals and hypothesis test for two independent random samples for proportions.

Reviewed 06 June 05 /MODULE 23

Page 2: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 2

P1 = Parameter for population one P2 = Parameter for population two

x1 = Number in sample one with the characteristicx2 = Number in sample two with the characteristic

n1 = Total number in sample onen2 = Total number in sample two

p1 = x1 / n1, estimate for sample onep2 = x2 / n2, estimate for sample two

Proportions: Two Independent Random Samples

Page 3: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 3

Hypothesis Test: Proportions from two samples

H0: P1 = P2 vs. H1: P1 P2

p2 = x2/n2, p1 = x1/n1

The test is based on:

1 2

1 1 2 2

1 2

(1 ) (1 )p pz

p p p pn n

Page 4: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 4

Example: AJPH, Nov. 1977;67:1033 - 1036

Page 5: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 5

Page 6: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 6

Proportions for Two Independent samples1. The hypothesis: H0: PM = PF vs. H1: PM PF

2. The assumptions: Independent random samples

3. The -level: = 0.05

4. The test statistic:

5. The rejection region: Reject if z not between 1.96

(1 ) (1 )M F

M M F F

M F

p pzp p p p

n n

Page 7: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 7

6. The test result:

7. The conclusion: Accept H0 : PM = PF , since z is between ±1.96

0.85 0.84 0.01 0.85(1 0.85) 0.84(1 0.84) 0.85(0.15) 0.84(0.16)

1,109 2,063 1,109 2,063

0.01 0.01 0.01 0.0134220.000115 0.000065 0.000180

0.745

z

z

MM

M

FF

F

x 947p = = = 0.8539 = 0.85n 1,109

x 1,736p = = = 0.8415 = 0.84n 2,063

Page 8: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 8

Confidence Interval for PM - PF

= 0.05 M

MM

FF

F

x 947p = = = 0.8539 = 0.85n 1,109

x 1,736p = = = 0.8415 = 0.84n 2,063

(1 ) (1 )1.96

0.95(1 ) (1 )

1.96

M M F FM F M F

M F

M M F FM F

M F

p p p pp p P P

n nC

p p p pp p

n n

Page 9: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 9

(1 ) (1 ) 0.85(0.15) 0.84(0.16)1,109 2,063

0.0000115 0.000065 0.013

M M F F

M F

p p p pn n

(0.85 0.84) 1.96(0.013) (0.85 0.84) 1.96(0.013) 0.95

0.01 0.025 0.01 0.025 0.95

0.015 0.035 0.95

M F

M F

M F

C P P

C P P

C P P

Page 10: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 10

Example: Two VaccinesIn testing two new vaccines, for one group 137 of 200 persons became infected. For the second group, 98 of 150 became ill. Test the hypothesis that the two vaccines are equally effective.

1. The hypothesis: H0: P1 = P2 vs. H1: P1 P2

2. The assumptions: Independent random samples

3. The -level : = 0.05

4. The test statistic:

2

22

1

11

21

)1()1(n

ppn

ppppz

Page 11: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 11

5. The rejection region: Reject H0: P1= P2, if z is not between ±1.96

6. The result:

7. The conclusion: Accept H0: P1 = P2 , since z is between ±1.96

685.0200137

1

11

nxp653.0

15098

2

22

nxp

1 2

1 1 2 2

1 2

0.685 0.653 (1 ) (1 ) 0.685(1 0.315) 0.653(1 0.347)

200 150

0.032 0.032 0.050890.001079 0.001511

0.629

p pzp p p p

n n

z

Page 12: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 12

Example: AJPH, Sept. 1998;88:1319 - 1324

Page 13: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 13

Page 14: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 14

Hypothesis test for proportion of Asthma or Wheezy Bronchitis in Social Class I vs. Social Class II

nI = 191 nII = 1,173

pI = 0.047 pII = 0.078

1. The hypothesis: H0: PI = PII vs. H1: PI PII

2. The assumptions: Independent Random Samples Binomial Data

3. The -level : = 0.05

4. The test statistic:

Hypothesis Test

(1 ) (1 )I II

I I II II

I II

p pzp p p p

n n

Page 15: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 15

5. The rejection region: Reject H0: PI = PII , if z is not between ±1.96

6. The result:

7. The conclusion: Accept H0: PI = PII , since z is between ± 1.96

0.047 0.078 0.031 0.047(0.953) 0.078(0.922) 0.0002 0.0001

191 1,173

0.031 0.0172

1.80

z

z

Page 16: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 16

  nI = 191 nII = 1,173

pI = 0.047 pII = 0.078

Confidence Interval for PI - PII

(1 ) (1 )1.96

0.95(1 ) (1 )

1.96

I I II III II I II

I II

I I II III II

I II

p p p pp p P P

n nC

p p p pp p

n n

Page 17: Module 23:  Proportions: Confidence Intervals and Hypothesis Tests, Two Samples

23 - 17

0.047(0.953) 0.078(0.922)0.047 0.078 1.96191 1,173

0.950.047(0.953) 0.078(0.922)0.047 0.078 1.96

191 1,173

0.031 1.96 0.0002 0.0001 0.031 1.96 0.0002 0.0001 0.95

0.031

I II

I II

P PC

C P P

C

1.96(0.0162) 0.031 1.96(0.0162) 0.95

0.0628 0.0008 0.95

I II

I II

P P

C P P