Old Lecture Slides

advertisement

Chi-Square Tests

• Categorical data

• 1-sample, compared to theoretical distribution

– Goodness-of-Fit Test

• 2+ samples, 2+ levels of response variable

Chi-square Test

Chi-Square Tests Slide #1

Goodness-of-Fit Test

• Compare observed to theoretical frequencies of individuals in categories.

• Examples –

– Test whether responses are “random” (e.g., preference)

– Test Mendelian genetics (e.g., 3:1 and 9:3:3:1 theories).

– Test use of available resources (e.g., compare habitat usage to availability).

Chi-Square Tests Slide #2

An Illustrative Example

• Determine, at the 10% level, if Northland students prefer the Chris Duarte Group (CDG), Ronnie

Baker Brooks (RBB), or Bernard Allison (BA).

• Hypotheses?

• H a

: “different # of students prefer each artist”

• H o

: “same # of students prefer each artist”

Chi-Square Tests Slide #3

An Illustrative Example

• Under H o

, what proportion prefer each artist?

1/3

• If n=78, how many students prefer each artist if H o is true?

26

Expected

Table

Artist CDG

Freq 26

RBB

26

BA

26

Chi-Square Tests Slide #4

An Illustrative Example

• Suppose these results were obtained:

Observed

Table

Artist CDG

Freq 24

RBB

38

BA

16

• Is there a preference – i.e., are these observations significantly different from what was expected when assuming no preference?

Chi-Square Tests Slide #5

A New Test Statistic

 2   table

 observed exp

 exp ected ected

2 df = cells - 1

Chi-Square Tests Slide #6

An Illustrative Example

Observed

Table

Artist CDG

# 24

RBB

38

BA

16

Expected

Table

Artist CDG

# 26

RBB

2 =

24

26

2

26

38

26

2

26

2 = 0.15 + 5.54 + 3.85 = 9.54

16

26

2

26

26 df = (3-1) = 2

Conclusion?

p-value = 0.00848

BA

26

Chi-Square Tests Slide #7

Goodness-of-Fit Test

H o

: distribution of individuals into levels follows the theoretical distribution

H

A

: distribution of individuals into levels does

NOT follow the theoretical distribution

Sample: randomized, single variable of size n

Assume: at least 5 in each cell of expected table

Statistic: Observed frequency table

Chi-Square Tests Slide #8

Goodness-of-Fit Test

Test Statistic:  2   table

 observed exp

 exp ected ected

2

• df: cells-1

Confidence Region: pˆ

 z

* pˆ

1

 pˆ

 n

Chi-Square Tests Slide #9

Examine HO – Page 5

Chi-Square Tests Slide #10

Download