chapter 10 hypothesis testing: categorical datadebdeep/p13_s14.pdf · 2014. 2. 27. · ex. 10.4 •...

17
Hypothesis Testing: Categorical Data Thursday, February 28, 13

Upload: others

Post on 01-Aug-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

Hypothesis Testing: Categorical Data

Thursday, February 28, 13

Page 2: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

2

Ex. 10.4• A hypothesis: an important factor for breast cancer is age at first birth. • An international study was set up to test the hypothesis.

– Breast cancer cases were identified among women in selected hospitals in the United States, Greece, Yugoslavia, Brazil, and Japan.

– Controls were chosen from women of comparable age who were in the hospital at the same time as the cases, but who did not have breast cancer.

– All women were asked about their age at first birth.– The set of women with at least one birth was arbitrarily divided into two

categories:• Women whose age at first birth ≤ 29• Women whose age at first birth ≥ 30

• Results among women with at least one birth– 683 out of 3220 (21.2%) women with breast cancer had an age at first birth ≥

30– 1498 out of 10,245 (14.6%) women without breast cancer had an age at first

birth ≥ 30• How can we assess whether this difference is significant?

Thursday, February 28, 13

Page 3: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

3

Two-Sample Test for Binomial Proportions

• p1= the probability that age at first birth is ≥ 30 in case women.

• p2 = the probability that age at first birth is ≥ 30 in control women.

• Whether or not the underlying probability of having an age at first birth of ≥ 30 is different in the two groups.

• H0: p1 = p2 = p versus H1: p1 ≠ p2

Thursday, February 28, 13

Page 4: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

4

Normal-Theory Method

• Base the significance test on the difference between the sample proportions

• Assume samples are large enough

To better accommodate the normal approximation to the binomial

Thursday, February 28, 13

Page 5: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

5

Thursday, February 28, 13

Page 6: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

6

Thursday, February 28, 13

Page 7: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

7

Contingency-Table Method

• The data in the previous example can be represented as a 2×2 contingency table.

• Row margins• Column margins• Grand total

Thursday, February 28, 13

Page 8: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

8

Significance Testing Using Contingency-Table Approach

• Observed contingency table• Expected table

Thursday, February 28, 13

Page 9: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

9

Computation of Expected Values for Contingency Tables

• Under null hypothesis, the expected number of units in the (1, 1) cell is

• For the (2, 1) cell, it is

Thursday, February 28, 13

Page 10: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

10

Thursday, February 28, 13

Page 11: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

11

Yates-Corrected Chi-Square Test for 2×2 Contingency Table

Thursday, February 28, 13

Page 12: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

12

Thursday, February 28, 13

Page 13: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

13

Thursday, February 28, 13

Page 14: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

14

Two-Sample Test for Binomial Proportions for Matched-Pair Data (McNemar’s Test)

Ex 10.21• Comparing two different chemotherapy treatments

for breast cancer, A and B.– The two groups should be as comparable as possible on

other prognostic factors.• A matched study

– The patients are assigned to pairs matched on age and clinical conditions

– A random member of each matched pair gets treatment A and the other gets treatment B.

– The patients are followed for 5 years, with survival as the outcome variable.

Tuesday, March 5, 13

Page 15: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

15

• Yates-corrected chi-square statistic is 0.59, which is not significant.

• Using this test assumes that the samples are independent.

Tuesday, March 5, 13

Page 16: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

16

• Probability that the treatment B member of the pair survived given that the treatment A member of the pair survived = 510/526 = .970

• Probability that the treatment B member of the pair survived given that the treatment A member of the pair died = 5/95 = .053

• Concordant pair– A matched pair in which the outcome is the same for each member of the pair.

• Discordant pair– A matched pair in which the outcomes differ for the members of the pair.

• Type A discordant pair– Treatment A member of the pair has the event and B does not.

• Type B discordant pair– Treatment B member of the pair has the event and A does not.

Tuesday, March 5, 13

Page 17: Chapter 10 Hypothesis Testing: Categorical Datadebdeep/p13_s14.pdf · 2014. 2. 27. · Ex. 10.4 • A hypothesis: an important factor for breast cancer is age at first birth. •

17

• Let p = probability that a discordant pair is of type A.• H0: p = 1/2 versus H1: p≠1/2.

Tuesday, March 5, 13