Categorical Data Examples Testing a single proportion

advertisement

Categorical Data Examples

Testing a single proportion

Researchers tested whether Underdogs in American football tend to “cover the spread” in a majority of games. For bet to

“pay-off” in long-run, the Underdog would have to win the bet with Probability > .5238. Based on Arena Football

League:

H

0

:

 

0.5238

H

A

:

 

.5238 Sample: n

992 games y

534 underdog wins bet

Comparing 2 Proportions – Independent / Large Samples

Researchers compared use of tanning beds among students who do and do not watch reality beauty shows

H

0

:

1

 

2

H

A

:

1

 

2

Group 1: Watch Reality Beauty Shows: n

1

224 y

1

Group 1: Do not Watch Reality Beauty Shows: n

2

352

29 use tanning beds y

2

13 use tanning beds

Comparing 2 Proportions – Independent / Small Samples

John Lister Data on Deaths from upper limb amputations: H

0

:

Post

 

Pre

H

A

:

Post

 

Pre

Pre-Antiseptic

Post-Antiseptic

Total

Death

1

7

6

NoDeath Total

6

11

17

12

12

24

Comparing 2 Proportions – McNemar’s Test

A sample of 150 people asked to choose between a Sure Thing and a Risky alternative in terms of a Gain, and in terms of a loss. Let

be the probability a person chooses the Risky alternative. H

0

:

G

 

L

H

A

:

G

 

L

Gain\Loss Sure

Sure

Risky

16

4

Risky

110

20

Goodness-of-Fit for Multinomial Distribution

120 Subjects were given warm beverage in cups of 4 colors (Blue, Green, Yellow, Red) and asked to rate which was warmest (all were of same temperature). Researchers were testing whether there are inherent differences of choices from random selection.

H

0

:

B

 

G

 

Y

 

R

0.25 Data: n

B

16, n

G

24, n

Y

34, n

R

46

Chi-Square Test

People were assigned to either Simultaneous choosing items for 3 future product uses, or Sequential choice of items for a single usage on 3 occasions. Subjects were classified as having selected either High, Medium, or Low variety based on their purchase choices. H

0

: No association between choice condition and Variety Seeking. H

A

: Association exists.

Observed H

Sim

Seq

Total

141

91

232

M

67

85

152

L

22

62

84

Total

230

238

468

Ordinal Association

People were told a beer was either: low, medium, or high price; and then after tasting it, rating it as: undrinkable (0), poor

(1), fair (2), good (3), or very favorable 4. Compute the sample value of

, the measure of ordinal association.

Price

Quality

2

3

0

1

4

1

4

20

23

9

4

2

1

21

22

12

4

26

15

7

3

4

8

Large-Sample Z-test for Proportions and Chi-Square Test in 2x2 Table

Prospect Theory: (Independent Samples)

Problem 11: In addition to what you own, you have been given 1000. (Gain Condition)

Choice A: 50% Chance of Win 1000, 50% Chance of Win 0 Choice B: 100% Chance of Win 500 (n

1

= 70, 58 take B)

Problem 12: In addition to what you own, you have been given 2000. (Loss Condition)

Choice C: 50% Chance of Lose 1000, 50% Chance of Lose 0 Choice D: 100% Chance of Lose 500 (n

2

= 68, 21 take D)

Goal: Test whether true proportions choosing sure bet are equal for 2 Conditions. H

0

:

G

 

L

Sample proportions in Each Condition (and overall) choosing sure Bet and Z-test:

1

1

70 68

0.084046

^

G

59

70

0.842857

obs

^

L

0.084046

21

68

0.308824

^

 

59 21

80

70 68 138

0.579710

6.354056 RR: Z obs

 z

.025

1.96

Chi-Square Test: H

0

: No association between Gain/Loss perspective and Choice obs

Gain

Loss

Sure

59

21

80

Risk

11

47

58

70

68

138 exp

Gain

Loss

Sure Risk

40.57971 29.42029

39.42029 28.57971

80 58

70

68

138

Chi-squareSure

Gain 8.361496

Risk

11.5331

Loss 8.607422 11.87231

40.37432

Observed Counts: n i ij

1, 2; j

1, 2 Expected Counts: E ij

 n n i

  j n



2 obs

 i

2 2 

1 j

1

 n ij

E ij

2

E ij

40.37432

2 obs

 

2

.05

3.841

2

Note: Z obs

 2

X obs

2

and Z

.025

 

2

.05

i

1, 2; j

1, 2

Odds Ratio

Study compared Olestra and triglyceride potato chips for gastrointestinal symptoms.

Olestra: n

O

= 563 y

O

=89 Triglyceride: n

T

= 529 y

T

= 93

Mantel –Haenszel Test – Combining Results from 2x2 Contingency Tables

Sleep apnea study. Combining results from h = 3 tables. Exposed = Modanafil Unexposed = Placebo

Outcome = Presence / Absence of Good Event

N1

7

N2

6.3

N1-N2 D

0.7 1.094211

38

21

59

36

19

55

7

7

14

37

58

95

16

43

59

2

4

6

52

62

114

75

79

154

9

11

20

36 25.08772 10.91228 7.123962

38 28.73377 9.266234 9.152318

MHChiSq 25.09499

MHCC 23.90743

Test Statisic:

 2

MH

 h q 

1 q  h

1

 n h 11

 n n h 1

 h

1 n h

 n n n n h 1

 h 2

 h

1 h

2 n

2 h



 n h



1

2

Rejection Region:

 2

MH

 

2

,1

P-value:

P

1

2   2

MH

^

OR

MH

R

S

R

 q  h

1 n n h 11 h 22 n h



S

 h q 

1 n n h 12 h 21 n h



^ ^ v V OR

MH

1

S

2 h q 

1

S h

2 

1

1

1

1

n n n n h 11 h 12 h 21 h 22

95% CI for Overall Odds Ratio:

^

OR

MH e

1.96

v

,

^

OR

MH e

1.96

v 

Download