Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 14

Chi-square Test

Dr. T. T. Kachwala

Using the Chi-Square Test

2
statistic

fo - fe

fe

2 statistics

measures difference between fo and fe

is always positive

if fe is small, it is over estimated (limitation of 2 statistics)

The following are the two Applications:


1. Chi square as a test of Independence
2.Chi square as a test of Goodness of Fit

Chi-square as a Test of Independence


Objective
If we classify a population into two attributes with
several classes, we can use Chi-square test to determine
whether or not the two attributes are independent of
each other.

Chi-square as a test of Independence

Contingency Table:

It is a table of classification of two attributes into


a number of classes. One of the attributes is
classified along the rows, while the second
attribute is classified along the columns.

Chi-square as a test of Independence


Observed and Expected Frequency
1.Observed frequency is based on actual observation (Study or Survey)
2.Expected frequency is based on theoretical calculations. The expected or theoretical
frequency can be obtained for any cell as follows:
fe

fe

RT CT
N

expected frequency of cell

RT =

Row total corresponding to that cell

CT =

Column total corresponding to that cell

Total number of observation

Degree of Freedom (for Contingency table of size m * n)


Degree of Freedom is the number of independent observations
that can be arbitrarily assigned without violating the restrictions
of the problem. For example: Table of size 2*2; = 1
Degree of Freedom for table of size m x n, is given by the
following formula: = (m-1) (n-1) {where m is the number
of rows & n is the number of columns}. For example:
Table of size 2*2 : m = 2, n = 2; = 1*1 = 1
Table of size 3*2 : m = 3, n = 2; = 2*1 = 2
6

The Chi-Square Distribution


1. The sampling distribution of the statistic 2 can be closely approximated
by a continuous curve known as Chi-square distribution.
2. As in case of t distribution, there is different 2 distribution for each
different number of degrees of freedom. However in practical research
work, only a few values of are popular (0.05, 0.01, 0.1).
3. Chi-square distribution is a skewed distribution & is defined by level of
significance & degree of freedom as indicated below (for = 0.05) :

0.05

2Critical

Summarized procedure for Chi-Square Test of Independence


Step (i)

H0 : The two attributes are independent


H1 : One attribute depends on the other

attribute
Step (ii)

Assuming = 0.05, 2 distribution & = (m-1) * (n-1)


2Critical = {from table}

Step (iii)

Calculate 2 statistic

2
statistic

fo - fe

fe

Summarized procedure for Chi Square as a Test of Independence


Step (iv & v) : Decision Rule & Conclusion

2 Critical
If 2 statistic is in acceptance area

If 2 statistic is in rejection area

Accept H0: the two attributes are independent

Reject H0 : the two attributes are independent


Accept H1: One attribute depends on the other
9

Chi-square as a Test of Goodness of Fit


Objective
To assess whether or not there is a significant
difference between observed frequency fo & expected
frequency fe
The term Goodness of Fit signifies how well the
theoretical distribution like Binomial, Poisson or
Normal distribution fits or represents the observed
frequency distribution
10

Chi-square as a Test of Goodness of Fit

The following is the summarized procedure:


Step (i)

H0 : fo = fe

(Theoretical distribution is a good fit)

H1: Not all fo are equal to fe

(Theoretical distribution is not a good fit)

Step (ii) Assuming =0.05, 2 critical = {from table depending on }


( depends on the Probability Distribution)
Step (iii) Calculate 2 statistic
2
statistic

fo - fe

fe

11

Chi-square as a Test of Goodness of Fit


Step (iv & v) : Decision Rule & Conclusion

2 Critical

If 2 statistic lies in acceptance area


Accept H0: fo= fe
i..e Theoretical distribution is a Good Fit
If 2 statistic lies in rejection area
Reject H0: fo= fe
Accept H1: Not all fo are equal to fe
i.e. Theoretical distribution is not a Good Fit for the given fo

12

Precaution about using Chi-square Test


When the expected frequencies fe are too small, the value of 2 will
be overestimated
2
statistic

fo - fe

fe

1. To avoid making incorrect inferences from 2 test follow the


general rule that an expected frequency of less than five in one
cell of the contingency table is too small to use.
2. One of the suggested adjustments for small value of fe is
combining frequency of the cells in the table. i.e. if the table
contains more than one cell with an expected frequency of less
than 5, we can combine them in order to get an expected
13

frequency of 5 or more.

Thanks and Good Luck

Dr. T. T. Kachwala

14

You might also like