Anda di halaman 1dari 29

Chi Square

Up to this point, the inference to the population has

been concerned with scores on one or more


variables, such as CAT scores, mathematics
achievement, and hours spent on the computer.
We used these scores to make the inferences about
population means. To be sure not all research
questions involve score data.
Today the data that we analyze consists of
frequencies; that is, the number of individuals falling
into categories. In other words, the variables are
measured on a nominal scale.
The test statistic for frequency data is Pearson ChiSquare. The magnitude of Pearson Chi-Square reflects
the amount of discrepancy between observed
frequencies and expected frequencies.

Chi Square
used when data are nominal (both IV and

DV)
Comparing frequencies of distributions

occurring in different categories or groups


Tests whether group distributions are different

Shoppers preference for the taste of 3 brands of


candy

determines the association between IV and

DV by counting the frequencies of distribution

Gender relative to study preference (alone or in


group)

Chi Square
Test statistic is based on counts that represent
the number of items that fall in each category
For testing significance of patterns in
qualitative data
Test statistics measures the agreement
between actual counts and expected counts
assuming the null hypothesis

Chi Square
Establish the level of significance:
Formulate the statistical hypothesis
Calculate the test statistic
Determine the degree of freedom
Compare computed test statistic against a
tabled/critical value
6. Determine the appropriate test
1.
2.
3.
4.
5.

Chi Square
2 tables are included in most statistics texts
and consist of columns and rows, with
columns representing areas under the curve
and rows associated with the degrees of

freedom (df) which, for 2 tests of


homogeneity and independence are: df = (r-1)
(c-1).

Chi Square
The chi-square distribution can be used to see

whether or not an observed counts agree with


an expected counts. Let
o = observed count and
e = Expected count

Formula
2

(
F

F
)
2
o
e

Fe

4. Calculating Test
Statistics

Continued

O
fre bs
qu erv
en ed
ci
es

( Fo Fe )

Fe

Ex
fre pec
qu te
en d
cy

Ex
fre pe
qu cte
en d
cy

An example of a one variable


problem or Goodness of fit
Example from book:
Four candidates for a school board position.

You poll a random sample of 200 voters


regarding their candidate of choice. Do
differences exist among the proportions of
registered voters preferring each school board
candidate.

Example continued
Martzial

Breece

Dunton

artesani

Observed fo = 40
Frequency

fo = 62

fo = 56

fo = 42

fo = 200

Expected fe =50
Frequency

fe = 50

fe = 50

fe = 50

fe = 200

(fo - fe )2
fe

(62 50)2
50
= (12)2
50
= 2.88

( 56 50)2 (42 50)2


50
50
(6)2
(-8)2
50
50
= .72
= 1.28

= fo
fe )2
fe
= 2.00 +
2.88 + .

(40 50)2
50
(-10)2
50
= 2.00

Example continued
The one varialbe chi square test is quite simple.

The expected frequencies are simply the total n


divided by the number of groups. In this case there
were four candidates and n = 200, therefore, 50
voters go in each cell.
The observed frequencies are simply what is truly
obtained in the sample.
Next you compute the discrepancies between the
observed and expected frequencies divided by the
expected frequencies and then sum to get your chi
square statistic. In this case chi square = 6.88.

The computed value of the Pearson chi-

square statistic is compared with the critical


value to determine if the computed value is
improbable
The critical tabled values are based on
sampling distributions of the Pearson chisquare statistic
If calculated 2 is greater than 2 table value,
reject Ho

Example continued
Next you compute your df.
For a one variable case it is simple
df = C 1; where C = number of columns

here that would be 4 1 = 3.


Now you find your chi square critical in Table F in the

back of the book for 3 degrees of freedom and alpha


is .05. The result is 7.81.
Now we see that our chi square obtained of 6.88 falls
short of the chi square critical of 7.81 and we would
retain our Null hypothesis. This means that all four
candidates are doing equally well in the polls.

Chi Square for two


variables
In a two variable chi square the principal is

the same as before. The big difference is in


calculating the expected frequencies for each
cell. See page 349 for example.
The formula for calculating the expected
frequencies is

fe = (frow ) (fcol )

n
The easiest way to learn chi square is by
example.

Example
Suppose a researcher is interested in voting

preferences on gun control issues.


A questionnaire was developed and sent to a
random sample of 90 voters.
The researcher also collects information about
the political party membership of the sample
of 90 respondents.

Bivariate Frequency Table or


Contingency Table
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

25

Bivariate Frequency Table or


Contingency Table
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

d 25
e
v ies
r
e nc
s
b e
O qu
e
fr

17

Row frequency

Bivariate Frequency Table or


Contingency Table
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

25

18

Bivariate Frequency Table or


Contingency Table
Favor

Neutral

Oppose

f row

10

10

30

50

Republican 15

15

10

40

f column

25

40

n = 90

Democrat

Column frequency

25

19

1. Determine Appropriate Test


1. Party Membership ( 2 levels) and Nominal
2. Voting Preference ( 3 levels) and Nominal

20

21

2. Establish Level
of Significance
Alpha of .05

3. Determine The
Hypothesis
Ho : There is no difference between D & R in

their opinion on gun control issue.


Ha : There is an association between

responses to the gun control survey and the


party membership in the population.

22

4. Calculating Test Statistics


Favor

Neutral

Oppose

f row

fo =10
fo =10
fe =13.9 fe =13.9

fo =30
fe=22.2

50

Republican fo =15
fo =15
fe =11.1 fe =11.1

fo =10
fe =17.8

40

f column

40

n = 90

Democrat

25

25

23

4. Calculating TestContinued
Statistics
Favor
Democrat

Neutral

Oppose

= 50*25/90

f row

fo =10
fo =10
fe =13.9 fe =13.9

fo =30
fe=22.2

50

Republican fo =15
fo =15
fe =11.1 fe =11.1

fo =10
fe =17.8

40

f column

40

n = 90

25

25

24

4. Calculating TestContinued
Statistics
Favor

Neutral

Oppose

f row

fo =10
fo =10
fe =13.9 fe =13.9

fo =30
fe=22.2

50

Republican fo =15
fo =15
fe =11.1 fe =11.1

fo =10
fe =17.8

40

f column

40

n = 90

Democrat

= 40* 25/90

25

25

25

Continued

4. Calculating Test Statistics


2
2
2
(
10

13
.
89
)
(
10

13
.
89
)
(
30

22
.
2
)
2

13.89
13.89
22.2

(15 11.11) 2 (15 11.11) 2 (10 17.8) 2

11.11
11.11
17.8

= 11.03

26

of
r
e
b
Num ls in
leve mn
colu ble
a
vari

Numb
levels er of
in
varia row
ble

27

5. Determine
Degrees of
Freedom

df = (R-1)(C-1)

28

5. Determine
Degrees of
Freedom
df = (R-1)(C-1) =
(2-1)(3-1) = 2

6. Compare computed test statistic


against a tabled/critical value
= 0.05
df = 2
Critical tabled value = 5.991
Test statistic, 11.03, exceeds critical value
Null hypothesis is rejected
Democrats & Republicans differ significantly

in their opinions on gun control issues

29

Anda mungkin juga menyukai