2. CONTENTS
INTRODUCTION OF CHI-SQUARE TEST
FORMULA OF CH-SQUARE TEST
STEPS TO CALCULATE CHI-SQUARE TEST
DEGREES OF FREEDOM
CASES IN DEGREES OF FREEDOM
USES OF CHI-SQUARE TEST
3. What is Chi-square test?
Chi-square is a statistical test commonly used to
compare observed data with data we would expect
to obtain according to a specific purpose.
4. Formula of Chi-square test
𝑥2 =
𝑖=1
𝑛
(𝑂𝑖−𝐸𝑖)2
𝐸𝑖
where,𝑂𝑖 = Observed frequency of the event
𝐸𝑖 = Expected frequency of the event
5. Steps to calculate 𝒙 𝟐
Step 1 : Calculate all the expected frequencies, i.e.,𝐸 𝑖 for all values of
i = 1,2,….,n
Step 2 : Take the difference between each observed frequency 𝑂𝑖 and the
corresponding expected frequency 𝐸𝑖 for each value of i , i.e.,
find (𝑂𝑖-𝐸𝑖).
Step 3 : Square the difference for each value of i , i.e., calculate(𝑂𝑖−𝐸𝑖)2
for all
values of i = 1, 2, 3…….,n
6. Step 4 : Divide each square difference by the corresponding expected
frequency , i.e., calculate
(𝑂 𝑖−𝐸 𝑖)2
𝐸 𝑖
for all values of i = 1 , 2 , 3……,n.
Step 5 : Add all these quotients obtained in STEP 4, then
𝑥2 =
𝑖=1
𝑛
𝑂𝑖 − 𝐸𝑖
2
𝐸𝑖
is the required value of Chi-square.
7. DEGREES OF FREEDOM
The number of data that are given in the form of
series of variables in a row or column or the number
of frequencies that are put in cells in a contingency
table, which can be calculated independently is called
the DEGREES OF FREEDOM.
8. CASES IN DEGREES OF FREEDOM
CASE 1 : If the data is given in the form of a series of variables in a row or
column, then the Degrees of Freedom will be calculated as
v = n – 1
where, n = number of variables in series in a row or column
9. CASE 2 : When number of frequencies are put in cells in a contingency
table, the Degrees of Freedom will be
v = (R-1)(C-1)
where, R = number of rows
C = number of columns
10. USES OF 𝒙 𝟐- TEST
1. Test of goodness fit : The term goodness of fit is used to test the
concordance of the fitness of observed frequency curve and expected
frequency curve.
v = (n-1)
2. Test of Independence of Attributes : The Chi-square test is used to see
that the principles of classification of attributes are independent.
v = (R-1)(C-1)
11. 3. Test of homogeneity : The Chi-square test may be used to test the
homogeneity of the attributes in respect of a particular characteristic or it
may also be used to test the population variance.
𝑥2
=(n-1)𝑠2
/𝜎0
2
where, 𝑠2= sample variance
σ0
2
= hypothesized value of proportion
12. WORKING RULE FOR 𝒙 𝟐-TEST
Step 1 : Set up the
Null Hypothesis 𝐻0 : No association exists between the attributes.
Alternative Hypothesis 𝐻1 : An association exists between the
attributes.
Step 2 : Calculate the expected frequency E corresponding to each cell by the
formula
𝐸𝑖𝑗 =
𝑅 𝑖 × 𝐶 𝑗
𝑛
13. where, 𝑅𝑖 = Sum total of the row in which 𝐸𝑖𝑗 is lying
𝐶𝑗 = Sum total of the column in which 𝐸𝑖𝑗 is lying
n = Total sample size
Step 3 : Calculate 𝑥2 - statistics by the formula
𝑥2
=
(𝑂−𝐸)2
𝐸
14. Step 4 : Find from the table the value of 𝑥2 for a given value of the level of
significance ∝ and for the degrees of freedom v, calculated in STEP 2.
If no value for ∝ is mentioned, then take ∝ = 0.05.
.
15. Step 5 : Compare the computed value of 𝑥2,with the tabled value of 𝑥2 found
in STEP 4.
a) If calculated value of 𝑥2<tabulated value of 𝑥∝
2, then accept the null
hypothesis𝐻0.
b) If calculated value of 𝑥2>tabulated value of 𝑥∝
2, then reject the null
hypothesis 𝐻0 and accept the alternative hypothesis 𝐻𝑟.