Chi square test ( x2 )

Post on 14-Jan-2015

172 views 3 download

Tags:

description

 

Transcript of Chi square test ( x2 )

CHI-SQUARE TEST ( X2 )

It is the most popular test of significance in social science research

It is used to make comparison between two or more nominal variables

It is used to make comparison between frequencies rather than between the mean

This test evaluated whether the difference between the observed frequencies and the expected frequencies under the null hypothesis

A chi square value is obtained by the formula:

X2=∑(f0-fe)2/fe

fo= the observed frequency

fe=the expected frequency in terms of the null hypothesis

Suppose we want to examine the relationship between education and income.

What will be, The Null hypothesis ? Alternative / Research hypothesis?

Income

Education

Low High Total

Low 30 12 42

High 10 28 40

Total 40 40 80

H0= there is a no relation between educational and income level

Ha=there is a relation between educational and income level

Procedure,

X2=∑(f0-fe)2/fe

We can compute the expected frequencies (fe) with the observed once. (f0)

To compute the (fe) for any cell, the following formula is used:

fe= (row total * column total)/n n= total number

To compute X2 , the expected frequency of each cell is subtracted from the observed one, squared, divided by the expected frequency of the cell and then all quotients are added up.

The expected frequencies computed are shown in brackets.

Income

Education

Low High Total

Low 30 (21) 12 (21) 42

High 10 (19 ) 28 (19) 40

Total 40 40 80

21= (42*40)/ 80 19=(38*40)/ 80

X2= X2=∑(f0-fe)2/fe

= ((30-21) 2/ 21) + ((12-21)2/ 21) + ((10-19)2/19 ) +((28-19)2/19)= 3.86 + 3.86 + 4.26 + 4.26X2 =16.24

To reject or accept the null hypothesis, we need to compare X2 value to the critical value of sampling distribution of X2

The sampling distribution of X2 is determined by 1. The level of significance 2. The number of degree of freedom

1. Level of significance = 0.01 or 0.052. The number of degrees of freedom of the X2

distribution is set by the number of cells for which the expected frequencies can be selected freely.

The formula used is: df= (r-1)*(c-1)r= the number of rowsC=the number of columnsThus in a 2*2 table df=(2-1)*(2-1)=1In a 3*3 table df=(3-1)*(3-1)=4 and so on.

In our example with 1 degree of freedom and 0.01 level of significance the table value of X2 is 6.64.

Our obtained X2 value 16.24 is much larger than the table value

Hence the null hypothesis is rejected and research hypothesis is supported

i.e. we may conclude that there is significant relationship between education and income.

In a survey of a brand preference of high school students for the soft drink, the following result was obtained:

Find out is there any relationship between brand preference and the gender of the consumer? Use chi square test at the 0.05 level of significance

Gender

Brand

A B

Boys 25 30

Girls 46 22

Total 71 52