0% found this document useful (0 votes)
26 views17 pages

Chi-Square Test: Property of STI

The document discusses the Chi-Square test, which can be used to test goodness-of-fit and independence. It describes how the Chi-Square test can determine if observed frequencies match expected frequencies (goodness-of-fit), or if two variables are independent (independence). Examples of each application are provided with calculations to test the null hypothesis and reach a conclusion. Assumptions and test statistics such as degrees of freedom are also outlined.

Uploaded by

Rhea Mae Amit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views17 pages

Chi-Square Test: Property of STI

The document discusses the Chi-Square test, which can be used to test goodness-of-fit and independence. It describes how the Chi-Square test can determine if observed frequencies match expected frequencies (goodness-of-fit), or if two variables are independent (independence). Examples of each application are provided with calculations to test the null hypothesis and reach a conclusion. Assumptions and test statistics such as degrees of freedom are also outlined.

Uploaded by

Rhea Mae Amit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

B0002

Chi-Square Test

Data that are categorical,


classificatory, count, frequency,
enumerative or nominal in nature like
gender, marital status, educational
attainment, course or academic
program, etc. can be treated using
Chi-Square test.

Chi-square test can either be used in


testing the following:

a. Goodness-of-Fit
b. Independence

Chi-Square Test * Property of STI


Page 1 of 17
B0002

Chi-Square Goodness-of-Fit

 used to determine whether the


observed frequencies in a one-way
classification table are in complete
agreement with the expected or
hypothesized frequencies

Ho: The data follow a specified


distribution.
(The observed frequencies are in
agreement with the expected
frequencies).

Ha: The data do not follow a


specified distribution.
(The observed frequencies are not
in agreement with the expected
frequencies).

Chi-Square Test * Property of STI


Page 2 of 17
B0002

Chi-Square Goodness-of-Fit
k k

O   E
i i n
Notations: i 1 i 1

Let Oi = observed frequency in the ith


cell or class
Ei = expected frequency under Ho
in the ith cell or class
k = number of cells or classes,
and
= total sample size.

Assumptions:
1. There are k mutually exclusive classes;
2. Each observation falls in one and only one
class, and
3. No more than 20% of the classes have
expected frequency is less than 1.

*One may have to collapse classes in some


meaningful manner to attain (3).

Chi-Square Test * Property of STI


Page 3 of 17
B0002

Chi-Square Goodness-of-Fit

Test statistic:

 2c  
k
Oi  Ei 2
i 1 Ei

which follows a Chi-square distribution


with (k-1) degrees of freedom under Ho.
Under the null hypothesis, Ei = nPi where Pi
is the hypothesized probability (under Ho)
that an observation will fall in the ith
class.

Decision Rule:

Reject Ho if  c 
2 2
 , k 1, otherwise,
fail to reject Ho.

Chi-Square Test * Property of STI


Page 4 of 17
B0002

Chi-Square Goodness-of-Fit

Example:

The latest TV Ad of Coca Cola Softdrinks


was rated by 200 viewers (with 5 –
strongly disliked to 1 – strongly liked). The
data are as follows:

Rating 1 2 3 4 5
Frequency 30 75 20 45 30

At α = 0.01, test the claim that the


proportions of viewers are equal in each
rating scale

Chi-Square Test * Property of STI


Page 5 of 17
B0002

Chi-Square Goodness-of-Fit

Solution:

Hypotheses
Ho: The proportions of viewers are equal
in each rating scale.
Ha: The proportions of viewers are not
equal in each rating scale.
 2 test
Test Statistic

k
 2c  
Oi  Ei 2
i 1 Ei

Level of Significance
1%

Chi-Square Test * Property of STI


Page 6 of 17
B0002

Chi-Square Goodness-of-Fit

Decision Rule

Reject Ho if  c    ,k 1   0.01, 4  13.277 ,


2 2 2

otherwise, fail to reject Ho.

Computation
n = 200
1
P1  P2    P5 
5
1
Ei  200 Pi  200   40
5

Oi 30 75 20 45 30

Ei 40 40 40 40 40

Chi-Square Test * Property of STI


Page 7 of 17
B0002

Chi-Square Goodness-of-Fit

Computation:

 2

30  40 75  40 20  40 45  40 30  40
2

2

2

2

2

c
40 40 40 40 40
c2  46.25

Decision
Since 46.25 is greater than the critical
value (  02.01, 4  13.277 ), reject Ho.

Conclusion
The proportions of viewers are not equal
in each rating scale at 1% level of
significance.

Chi-Square Test * Property of STI


Page 8 of 17
B0002

Test of Independence

 tests whether two random


variables are independent from
each other

The data from this study are arranged in


a two-way table generally known as an r
x c contingency table. The data are
classified into r classes of the row factor
A into c classes of the column factor B
represented as follows:

Chi-Square Test * Property of STI


Page 9 of 17
B0002

Test of Independence

where
Oij = observed frequency in the ith row
and the jth column
Ri = total observed frequency for the ith
row;
Cj = total observed frequency fot the jth
column; and
n = total sample size

Chi-Square Test * Property of STI


Page 10 of 17
B0002

Test of Independence

Hypotheses

Ho: The row factor is independent of the


column factor

Ha: There is an association between the


row and column factors.

If the null hypothesis is true, i.e., the row


factor is independent of the column
factor, then

Ri * C j i = 1, 2, 3,…,r and
Eij 
n j = 1, 2, …,c.

where

Eij = expected frequency in the the ith


row and the jth column

Chi-Square Test * Property of STI


Page 11 of 17
B0002

Test of Independence

Test statistic

r
 c2  
c O
ij  Eij 
2

i 1 j 1 Eij

which follows a chi-square distribution


with (r-1)(c-1) degrees of freedom under
Ho.

Decision Rule
Reject Ho at the α level of significance if
 2c   2,r 1c 1 , otherwise, fail to
reject Ho.

Remark: The necessary assumptions for


the test of independence are similar to
the assumptions on the goodness of fit
test in the previous section.

Chi-Square Test * Property of STI


Page 12 of 17
B0002

Test of Independence

Example:

Rural areas are known to be low-noise


environments in contrast with urban
areas, where people are constantly
exposed to noise such as traffic noise,
industrial noise and loud music. In relation
to this, a study was conducted on the
relation of hearing loss on the type of
environment. A sample of 100 middle-
aged residents were taken from each of
the two areas and tested. The following
results were obtained:

Test at α = 0.01 whether the type of


environment affects the degree of hearing
loss.

Chi-Square Test * Property of STI


Page 13 of 17
B0002

Test of Independence

Solution:

Hypotheses

Ho: The type of environment does not


affect the degree of hearing loss.
Ha: The type of environment affects the
degree of hearing loss.

Test Statistic

 2 test
r
 c2  
c O
ij  Eij 
2

i 1 j 1 Eij

Level of Significance
1%

Chi-Square Test * Property of STI


Page 14 of 17
B0002

Test of Independence

Decision Rule

Reject Ho if  c    ,r 1c 1  02.01, 2  9.21 ,


2 2

otherwise, fail to reject Ho.

Computation
The observed and expected frequencies
are presented as follows:

Chi-Square Test * Property of STI


Page 15 of 17
B0002

Test of Independence

Computations:

100 * 65 100 * 65
E11   32.5 E21   32.5
200 200

100 * 75 100 * 75
E12   37.5 E22   37.5
200 200

100 * 60 100 * 60
E13   30.0 E23   30.0
200 200

2 
40  32.5 2

45  37.5 2

45  30
2

c
32.5 37.5 30
 c2  21.46

Chi-Square Test * Property of STI


Page 16 of 17
B0002

Test of Independence

Decision

Since 21.46 is greater than the


critical value ( 0.01, 2  9.21 ), reject
 2

Ho.

Conclusion

The type of environment affects


the degree of hearing loss at 1%
level of significance.

Chi-Square Test * Property of STI


Page 17 of 17

You might also like