Chi-Square Test Explained: Applications & Assumptions
Chi-Square Test Explained: Applications & Assumptions
Significance of
Difference
Between More
Than Two Means
BLOCK 3
NON-PARAMETRIC STATISTICS
83
Parametric
Statistics
84
UNIT 5 CHI-SQUARE* Chi-Square
Structure
5.0 Objectives
5.1 Introduction
5.2 What is Ch- square?
5.2.1 Assumptions for the Application of χ2Test
5.2.2 χ2Distribution
5.3 Properties of Chi-square Distribution
5.4 Applications of Chi-square Test
5.4.1 Test of Goodness of Fit
5.4.2 Test of Independence
5.4.3 Test of Homogeneity
5.5 Precautions about Using the Chi-square Test
5.6 Let Us Sum Up
5.7 References
5.8 Key Words
5.9 Answers to Check Your Progress
5.10 Unit End Questions
5.0 OBJECTIVES
After reading this unit, you will be able to,
5.1 INTRODUCTION
In psychology some times the researcher is interested in such questions as to
whether one type of soft drink preferred by the consumer is in any way
influenced by the age of the consumer, and whether? Similarly among the
four colours, red, green, indigo, yellow, is there any significant difference in
the participants in regard to the preference of colours, etc.
*
Dr. Vivek Belhekar, Faculty, Department of Psychology, Bombay University, Mumbai
85
Non-Parametric
Statistics
To approach questions like these, we find the number of persons who
preferred particular colour. Here we have the data in the form of frequencies,
the number of cases falling into each of the four categories of colours. Here
the researcher compares the observed frequencies characterising the choices
of the 4 categories by a large number of individuals. Some prefer red, some
white, some green and some yellow etc. Hypothetically speaking one may
say that all colours are equally preferred and are equal choice for the
individuals. But in reality there may be more number of persons choosing red
or blue than yellow and similarly quite a few may choose white etc. Thus
what is expected as choice which is equal for all colours may be seen
differently when actual choice is made by the persons. Now we note the
number of persons who had chosen red, blue, yellow and white respectively
and note it in the table. Hypothetically we said that there will be the same
number of persons choosing each of the 4 colours. This also we note in the
table. Now we compare and see for each colour what is the difference
between the actual number of choices made as compared to the hypothetical
equal number. The differences thereof are noted. To find out if these
differences are really of statistical significance amongst the persons in regard
to choice of colours, we use a statistical technique called Chi-square. In the
present unit, we will explain what is chi-square and also describe the
assumptions for its application.
The term ‗chi‘ (is the Greek letter, it is pronounced ki). The chi-square test
was originally developed by Karl Pearson in 1900 and is sometimes called
the Pearson Chi-square. According to Garrett (1981), the difference between
observed and expected frequencies are squared and divided by the expected
number in each case and the sum of these quotients is chi-square‖. According
to Guilford(1973) ―By definition a χ2 is the sum of ratio (any number can be
summed), each ratio is that between a squared discrepancy of difference and
an expected frequency‖.
On the basis of the above definitions it can be said that the discrepancy
between observed and expected frequencies is expressed in term of a
statistics named chi-square (χ2).
5.2.2 χ2 Distribution
The term non-parametric does not mean that the population distribution under
study has no parameters. All populations have certain parameters which
define their distribution. The sampling distribution of χ2 is called χ2
distribution. Other hypothesis testing procedures, the calculated value of χ2
test statistic is compared with its critical (or table) value to know whether the
null hypothesis is true. The decision of accepting a null hypothesis is based
on how 'close' the sample results are to the expected results. If the null
hypothesis is true, the observed frequencies will vary from their
corresponding expected frequencies according to the influence of random
sampling variation. The calculated value of χ2 will be smaller when
agreement between observed frequencies and expected frequencies are
smaller. The shape of a particular chi-square distribution depends on the
number of degrees of freedom. Let us now see what is degrees of freedom?
Let us say there are 5 scores, as for example, 25,35,45,55,65
87
Non-Parametric
Statistics
The mean here is 45. Let us say that from this mean of 45 we try to see the
difference in each of the other scores. While all the other 4 scores are taken
for the difference, this 45 is not available for other calculations, as from this
Mena=45, all other calculations are made. From this mean we note the
differences in the remaining scores, and thus amongst the 5 scores one score
is not movable or in other words the group of 5 subjects has lost one degree
of freedom. Suppose we go for higher level calculations, then accordingly
there will be more number of items that cannot be moved and thus we may
have greater degrees of freedom. In a 3 × 3 table, we will be using one cell
from the row and one cell from the column for the purpose of chi-square
calculations. Thus the degrees of freedom will be (3 – 1) (3 – 1) = 4. That is
(r- 1) ( k-1 ) (r = row and k = column).
It may also be noted that chi-square assumes positive values only. As such a
chi-square curve starting from the original (zero point) lies entirely to the
right of the vertical axis.
88
It is not symmetrical; it is skewed to the right as mentioned earlier. The Chi-Square
reason for this is because all the values are positive and hence so instead
of having a symmetrical distribution, we have a distribution all on the
positive side.
Since density function of χ2 does not contain any parameter of
population, Chi-square test statistic is referred to as a non-parametric
test. Thus chi- square distribution does not depend upon the form of the
parent population.
There are many chi-square distributions. As with the t-distribution, there
is a different chi-square distribution for the value of each degree of
freedom. If we know the degrees of freedom and the area in the right tail
of a chi-square distribution, we can find the value of chi-square from the
table of chi-square. We give below two examples to show how the value
of chi-square can be obtained from this table.
Solution: This example is different from the above one. Here, the area is in
the left tail of the chi-square distribution curve is given. In such a case, we
have to first find the area in the right tail. This is obtained as follows:
Now we can find, in the same manner as used earlier, the value ofχ2. We
locate 20 in the column for df and .90 on top row in the table of chi-square.
The required value of χ2 is 12.443.
1) State any one property of chi-square test statistic are to be kept in mind
when we analyse its sampling distribution.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
89
Non-Parametric
Statistics 5. 4 APPLICATIONS OF CHI-SQUARE TEST
Chi-square is used for categorical data that is for data comprising unordered
quantitative categories such as colours, political affiliation etc. The important
applications of χ2test are as follows:
The χ2 test for goodness of fit is a statistical test of how well given data
support an assumption about the distribution of a population. That is, whether
it supports a random variable of interest. In other words, the test determines
how well an assumed distribution fits the given data.
The alternative hypothesis is that a preference exists for the first brand of the
biscuits and the reminder are equally less preferred, or that the first two are
preferred more than the second two and so on.
The use of chi-square tells us whether the relative frequencies observed in the
several categories of our sample frequency distribution are in accordance
with the set of frequencies hypothesised.
90
To test the null hypothesis in the above study, we might allow subjects to Chi-Square
taste each of the four brand of glucose biscuits and then find their preference.
We control possible extraneous influence, such as knowledge of brands name
and order of presentation. Suppose we had as mentioned earlier randomly
selected 100 subjects and that our observed frequencies of preference are as
given in the table below:
Observed 20 18 30 32
Frequencies
As we know that nominal and ordinal variables are generally presented in the
form of a cross-tabulation. Specifically cross tabulation are used to compare
the distribution of one variable often called dependent variable, across
categories of some other variable the independent variable. In a cross
tabulation the focus is on the difference between group — such as between
males and females — in terms of the dependent variable — for example,
opinion about the changing value of a college education. In the above
example we want to study whether there exists gender differences in belief
regarding the importance of a college degree - are statistically significant.
Male 25 6 8
Female 10 4 7
discrepancy are small, chi-square will be small suggesting that the two
variable could be not different. Conversely, a large chi-square points toward a
contingency relationship.
As in the case of the t ratio there is a sampling distribution for chi-square that
can be used to estimate the probability of obtaining a significant chi-square
value by chance alone rather than by actual population difference. The test is
used to study the significance of difference between mean. On the other hand,
chi-square is used to make comparison between frequencies rather than mean
scores. As a result the null hypothesis for the chi-square test states that the
populations do not differ with respect to frequencies of occurrence of a given
characteristic. In general, the null hypothesis of independence for a
contingency table is equivalent to hypothesising that in the population the
relative frequencies for any row (across the categories of the column
variable) are the same for all rows, or that in the population the relative
frequencies for any column (across the categories of the two variables) are
the same for all columns.
94
Chi-Square
5.6 LET US SUM UP
To summarise, the chi-square test is the most commonly used non-parametric
test. Non parametric techniques are used when a researcher works with
ordinal or nominal data or with a small number of cases representing a highly
asymmetrical underlying distribution. The chi-square test is used as a test of
significance when we have data that are given in frequencies or categories.
The chi-square test is used for two broad purposes. Firstly it is used as a test
of goodness of fit and secondly as a test of independence. As a test of
goodness of fit chi-square tells us whether the frequencies observed among
the categories of a variable are tested to determine whether they differ from a
set of expected hypothetical frequencies. As a test of independence chi-
square is usually applied for testing the relationship between two variables in
two way. First by testing the null hypothesis of independence and second by
computing the value of contingency coefficient, a measurement of
relationship existing between the two variable. When we have less than 5
observed frequencies in any cell then we use the Yate's correction.
5.7 REFERENCES
Kerlinger, Fred N. (1963). Foundation of Behavioural Research, (2nd Indian
reprint) Surjeet Publication, New Delhi.
Contingency table: A table having rows and column wherein each row
corresponds to a level of one variable and each column to a level of another
variable.
95
Non-Parametric
Statistics 5. 9 ANSWERS TO CHECK YOUR PROGRESS
Check Your Progress I
1) State any one property of chi-square test statistic are to be kept in mind
when we analyse its sampling distribution.
Chi-square is non-negative in value; it positively valued, because all
discrepancies are squared, both positive and negative discrepancies make
a positive contribution to the value of χ2.
96
UNIT 6 COMPUTATION OF CHI-SQUARE* Computation of
Chi-Square
Structure
6.0 Objectives
6.1 Introduction
6.2 Computation of Chi- square Test
6.2.1 Chi-square as a Test of Goodness of Fit
6.2.2 Testing Hypothesis of Equal Probability
6.2.3 Chi-square as a Test of Independence
6.2.4 2 × 2 Fold Contingency Table
6.3 Chi-square Test when Table Entries are Small (Yates Correction)
6.4 Let Us Sum Up
6.5 References
6.6 Key Words
6.7 Answers to Check Your Progress
6.8 Unit End Questions
6.0 OBJECTIVES
After reading this unit, you will be able to,
identify chi-square as a test of goodness of fit;
apply testing of equal probability hypothesis;
use testing of normal probability hypothesis;
calculate chi-square as a test of independence in contingency tables; and
apply chi-square test when table entries are small.
6.1 INTRODUCTION
As we have discussed in last unit that chi-square is a commonly used non-
parametric statistical test. This is used when we have data in the form of
frequencies, ordinal or nominal levels of measurement. Chi-square test is
used for different purposes. In the last unit you were given the conceptual
knowledge of chi-square test and in this unit we will discuss the method of
computation of chi-square.
*
Dr. Vivek Belhekar, Faculty, Department of Psychology, Bombay University, Mumbai
97
Non-Parametric
Statistics
6.2.1 Chi-square as a Test of Goodness of Fit
Chi-Square goodness of fit test is used to find out how the observed value of
a given phenomena is significantly different from the expected value. In Chi-
Square goodness of fit test, the term goodness of fit is used in order to
compare the observed sample distribution with the expected probability
distribution. Chi-Square goodness of fit test determines how well theoretical
distribution (such as normal, binomial, or Poisson) fits the empirical
distribution. In Chi-Square goodness of fit test, sample data is divided into
intervals. Then the numbers of points that fall into the interval are compared,
with the expected numbers of points in each interval.
χ2 =∑[(fo- fe)2]/fe
Where;
The use of the above formula can be illustrated by the following example.
98
Computation of
Table 6.1: Responses from participants regarding Attitude Chi-Square
fo 70 50 120 240
fe 80 80 80 240
χ2 1.25 11.25 20 2
∑(fo- fe) /fe
= 32.50
The formula of χ2 is
χ2 =∑[(fo- fe)2]/fe
= 32.5
df=(r-1)(c-1)
=(3-1)(2-1)
df = 2
Critical value of χ2 for df= 2 at 0.05 level = 5.59 (refer to statistical table
given at the appendix of Statistics book). Critical value of χ2 at 0.01 level =
9.19 (refer to the table for chi-square given in the appendix of textbook on
statistics) .
The computed value of χ2 , i.e. 32.5 is above the critical values at 0.05 and
0.01significance levels, we conclude that χ2 is significant and we retain the
null hypothesis.
On the other hand if the computed value of χ2 is less than 5.59 or 9.19, then
the null hypothesis is accepted and it may be concluded that there is no
significant difference in the attitude of the participants.
However in our example we have found the chi-square value being greater
than what is given in the table and so we reject the null hypothesis.
Reject the null hypothesis if calculated value of χ2 is more than what is given
in the table under 0.05 or 0.01 significance levels.
Some times the expected frequencies are determined on the basis of the
normal distribution of observed frequencies in the entire population. The
method as to how this is done is explained in the following examples.
Example 1: 180 school teachers were classified into six categories on the
basis of their performance. Do these teachers differ significantly in their
performance as compared to the one expected if performance is supposed to
be distributed normally in our population of school teachers.
Categories 1 2 3 4 5 6 Total
100
Computation of
Table 6.2 : Frequencies on the basis of Normal Distribution Chi-Square
We will now test the null hypothesis by computing the values of χ2 givenin
table.
1 2 3 4 5 6 Total
fo 15 25 45 50 35 10 180
The formula of χ2 is
χ2=∑[(fo- fe)2]/fe
= 36.1+.001+4.29+2.05+3.81+11.38
=57.63
df =(r-1)(c-1)
=(6-1)(2-1)
df =5
The critical value of χ2 for df= 5 is 11.0700 at 0.05 level and 15.086 at 0.01
level (refer to the table for chi-square given in the appendix of book on
statistics). Obtained values of χ2 is much greater than the critical values.
Hence it can be said that χ2 is significant and we reject the null hypothesis.
101
Non-Parametric
Statistics
Example 2: 200 salesmen were classified into five categories on the basis of
their performance ranging from excellent performance to very poor
performance. Does this evaluation differ significantly from the one expected
from the normal distribution?
30 45 65 40 20
We have to find out the expected frequencies with the help of normal
probability Curve. For this we have to divide the base line of the curve into
five equal segments by 6/5=1.2
We will now test the null hypothesis by computing the values of χ2 given in
table.
fo 30 45 65 40 20 200
fe 7 48 90 48 7
fo- fe 23 -3 -25 -8 13
χ2=∑[(fo- fe)2]/fe
102 χ2 = 75.57+.19+6.94+1.33+24.14
=108.17 Computation of
Chi-Square
df =(r-1)(c-1)
= (2-1) (5-1)
df =4
The critical value of χ2 at 4 df is 9.49 at 0.05 level and 13.29 at 0.01 level
(refer to the table for chi-square given in the appendix of textbook on
statistics) therefore obtained values of χ2 is much greater than the critical
values. Hence it can be said that χ2 is significant and we reject the null
hypothesis.
To cite another example, father and sons may be classified with respect to
temperament or achievement and the relationship of the attributes in the
groups may be studied.
In the following table there is a double entry or it is called a two way table in
which 100 boys and 100 girls who express their view on the statement “There
should be same syllabus in all the universities of the country,” in terms of
agree, neutral, disagree. The results are shown in the following table.
Boys 20 30 50 100
Girls 50 20 30 100
Total 70 50 80 200
Do you think that the opinion is influenced by the gender of the students.?
For this we present the data in contingency table form as above. The expected
frequencies after being computed are written within brackets besides the
respective observed frequencies. The contingency table and the process of
computation of expected frequencies is given in the table 6.7.
104
Computation of
Table 6.7: Contingency table with fo and fe for the data given in table 6.6 Chi-Square
Total 70 50 80 200
The method to find out the expected frequency for each cell is given below:
χ2=∑[(fo-fe)2]/fe
30 25 5 25 1
50 40 10 100 2.5
30 40 -5 25 1
χ2=19.86
For df = 2, the critical value at 0.05 level is 5.99 and at 0.01 level 9.21. Our
obtained value of χ2 is 19.86 . It is far higher than the table value. Therefore
we reject the null hypothesis and conclude that gender influences the opinion.
Example: The mothers of 180 adolescents (some of them were graduates and
others non- graduates) were asked whether they agree or disagree on a certain
aspect of adolescent behaviour. Is the attitude of their mother related to their
educational qualification? Data are arranged in a four fold table below:
Agree Disagree
χ2= N(AD-BC)2/(A+B)(C+D)(A+C)(B+D)
= 180 (30×30)-(50×70)2/80×100×100x80
=180(2600)2/64000000
=19.01
χ2=19.01
df = (r-1)(c-1)
= (2-1)(2-1)
df = 1
On df = 1, the critical value at 0.05 level is 3.84 and on 0.01 is 6.63 (refer to
the chi-square table given in the appendix of books on Statistics).
The obtained values is much higher therefore χ2is significant at .01 level, we
reject the null hypothesis and conclude that attitude is related with education.
To apply the Yates correction we subtract 0.05 from the absolute value of the
difference between observed and expected frequency.
What is the reason for applying Yates correction and what is its effect upon
χ2can be illustrated from the following example.
Yes No Total
Fo 7 3 10
Fe 5 5 10
fo- fe 2 -2
If we do not apply the Yates correction then the value of χ2 will be different.
This can be illustrated in the following table.
Yes No Total
fo 7 3 10
fe 5 5 10
fo- fe 2 -2
(fo- fe)2 4 4
107
Non-Parametric
Statistics
χ2=∑[(fo- fe)2/fe]
= .2+.2 =
0.4
df =(3-1)(2-1)
df=2
For df= 2, the critical values (refer to the table for chi-square given in the
appendix of book on statistics) at 0.05 is 5.991 and on 0.01 is 9.210. In these
examples although both the χ2are not significant but if we do not apply the
correction then the probability of significance of χ2increased. We can
conclude that failure to use the correction causes the probability of its being
called significant considerably increased.
Example: 60 Students 50 from urban areas and 10 from rural area were
administered attitude scale to measure the attitude towards dating. Some of
them expressed positive attitudes and some expressed negative attitudes.
Whether the attitudes of the students will be effected by their belonging to
rural or urban areas. The data are given in the following table.
In this type of 2×2 table you can calculate chi-square in a different method
which is given below:
= 60(|140-90|-30]2/425500
=60×400/425500
=24000/425500
= .056
Entering the table for chi-square we find that for df= 1 the value of Chi-
square at 0.05 level is be 3.841. The obtained value is less than the table
value and hence we retain the null hypothesis and conclude that the attitude
108
towards dating is not influenced by the person belonging to rural or urban Computation of
Chi-Square
areas.
5.5 REFERENCES
Kerlinger, Fred N. (1963). Foundation of Behavioural Research, (2nd Indian
reprint) Surjeet Publication, New Delhi.
Garrett, H.E. (1971), Statistics in Psychology & Education, Bombay, Vakils,
Seffer & Simoss Ltd.
Guilford, J.P. (1973), Fundamental Statistics in Psychology & Education,
Newyork, McGraw Hill.
109
Non-Parametric
Statistics 6.6 KEY WORDS
Critical value: Table value according to the given df value. 32 Expected
Frequency : The expected scores in a given class.
Expected frequencies: The frequencies for different categories which are
expected to occur on the assumption that the given hypothesis is true.
Observed frequencies: The frequencies actually obtained from the
performance of an experiment.
Yate’s correction: The correction of -.5 in expected frequency.
Contingency table: A table having rows and columns where in each row
corresponds to a level of one variable and each column to a level of another
variable.
110
UNIT 7 MANN WHITNEY U TEST* Mann Whitney U
Test
Structure
7.0 Objectives
7.1 Introduction
7.2 Mann Whitney U Test
7.3 Computation of Mann Whitney U Test from Small Sample
7.4 Computation of Mann Whitney U Test from Moderately Large Sample
7.5 Computation of Mann Whitney U Test from Large Sample
7.6 Let Us Sum up
7.7 References
7.8 Key Words
7.9 Answers to Check Your Progress
7.10 Unit End Questions
7.0 OBJECTIVES
After reading this unit, you will be able to
7.1 INTRODUCTION
A researcher wanted to study if significant difference exists between junior
and senior managers with regard to their work motivation. The researcher
collected data using standardised psychological test for work motivation and
then had to carry out statistical analysis of the data. Initially, the researcher
felt that independent t test cannot be used as the assumptions of parametric
tests were not fulfilled. Therefore, the researcher decided to use Mann
Whitney U test.
*
Prof. Suhas Shetgovekar, Faculty, Discipline of Psychology, SOSS, IGNOU, Delhi
111
Non-Parametric
Statistics
Thus, in the present unit, we will try to understand what is Mann Whitney U
test and also learn how to compute it.
Mann Whitney U test can be applied to find out whether two sample
subgroups have been taken from a same population. It also helps in
determining the distribution of data with regard to its median (Veeraraghavan
and Shetgovekar, 2016).
6 10
13 16
7 12
11 14
N=5 N=5
The codes for their groups, A for males and B for females also need to
mentioned.
5 6 7 10 11 12 13 14 16 17
A A A B A B A B B B
Step 3: U is computed.
This is done by determining the number of scores for A (males) that are
falling below the scores of B (females). This is done as follows:
For the score in group B of 10, the number of scores from group A that fall
below 10 = 3
For the score in group B of 12, the number of scores from group A that fall
below 12= 4
For the score in group B of 14, the number of scores from group A that fall
below 14 = 5
113
Non-Parametric
Statistics
For the score in group B of 16, the number of scores from group A that fall
below 16 = 5
For the score in group B of 17, the number of scores from group A that fall
below 17= 5
Thus, U = 3 + 4 + 5 + 5 +5 = 22
For the score in group A of 5, the number of scores from group B that fall
below 5 = 0
For the score in group A of 6, the number of scores from group B that fall
below 6 = 0
For the score in group A of 7 , the number of scores from group B that fall
below 7 = 0
For the score in group A of 11, the number of scores from group B that fall
below 11 = 1
For the score in group A of 13, the number of scores from group B that fall
below 13 = 2
U' = 0 +0 +0 +1 + 2= 3
Thus,
U + U' = N1 N2
Thus,
U' = N1 x N2 - U
= 5 x 5 - 22
= 25-22
=3
The value obtained is 3 and it is same as the value obtained earlier using the
formula.
To interpret the obtained U, the table for U is to be referred to, that can be
found in appendix of books on Statistics. In our example N1 = 5 and N2 = 5.
And the U = 3. The table value in this regard is .579. The U obtained by us is
more than the table value and thus null hypothesis can be accepted and it can
be said that the samples have been drawn from the same population.
114
Check Your Progress II Mann Whitney U
Test
1) List the steps in computation of Mann Whitney U test for small sample.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
115
Non-Parametric
Statistics
Step 1: Formulate the Null hypothesis.
Step 2:Ranks are to be given to the combined scores from both groups.
The scores of both the groups are combined and then arranged in an
ascending order and ranks are assigned to them. Rank 1 is allotted to the
lowest score and the next above it will be given a rank 2 and so on. In case
of tied scores, the procedure similar to the one that we discussed in BPCC104
while computing Spearman’s rho is used. Thus, the re are two 51 scores, the
ranks allotted are (9+ 10)/ 2= 9.5 and the next score gets rank 11. Further,
there are three 65 score. Thus, (14 + 15+ 16)/ 3= 15. Thus, the rank assigned
to this score is 15 and the next score gets rank 17.
39 4 48 7
65 15 (tied ranks) 36 2
62 13 37 3
45 5 56 11
46 6 59 12
65 15 (tied ranks) 78 18
65 15 (tied ranks) 83 19
66 17
85 20
116 N (N +1)/ 2
where N = N1 + N2 Mann Whitney U
Test
= 20 (20 +1)/2
= 20 x 21/ 2
= 420/ 2
= 210
The value obtained is 210 and is equal to the value we obtained after adding
R1and R2.
Step 4: Compute U
U = N1 N2 + N1(N1 + 1) / 2 - ∑R1
= 99 + 132 /2 - 119
= 99 + 66 - 119
= 165- 119 = 46
Step 5: Find out U' using the formula given in the box above.
U' = N1 N2 – U
=11 x 9 - 46
= 99- 46
= 53 117
Non-Parametric
Statistics Step 6: Interpretation of U
In order to interpret the obtained U, we need to refer to the table value that is
given in the table for Mann Whitney U in appendix of any Statistics book.
Referring to such a table, the table value with the large sample as 11 and
small sample as 9 is 18 at 0.01 level of significance and 27 at 0.05 level of
significance. The obtained U is 46 is higher than the table value. Thus, the
null hypothesis is accepted and it can be said that there is no significant
difference in the academic performance with regard to the two teaching
methods.
Let us now try to understand the computation of Mann Whitney U test for
large samples with the help of an example.
118
Mann Whitney U
Table 7.5: Scores on Attitude tiowards Environment along with their Test
ranks .
42 9 85 28
45 10 109 37
46 11 87 29
95 34 88 30
23 1 90 31
94 33 91 32
33 6 26 2
35 7 100 35
32 5 102 36
40 8 27 3
30 4 110 38
83 27 76 26
72 24 73 25
69 23 47 13
47 13 50 16
59 22 57 21
47 13 50 16
51 18 56 20
54 19 50 16
120 39 121 40
N (N +1)/ 2
where N = N1 + N2
= 40(40 +1)/2
= 40 x 41/ 2
= 1640/ 2
= 820
The value obtained is 210 and is equal to the value we obtained after adding
R1and R2.
Step 4: Compute U
U = N1 N2 + N1(N1 + 1) / 2 - ∑R1
Step 5: Find out U' using the formula given in the box above.
U' = N1 N2 – U
=20 x 20 - 284
= 400- 284
= 116
Step 5: Compute z
= 84 / 36.97
= 2.27
In place of U, you could have taken U'. The z value obtained in either case
wold remain same.
= 84 / 36.97
= 2.27
To interpret the z value we will be required to refer to the table value from
the table for z value that is given in appendix of any Statistics book.
121
Non-Parametric
Statistics
In this context, it can be said that if the z value is >1.96, U is interpreted as
significant at 0.05 level of significance (for two tailed test) and thus null
hypothesis is rejected. If the obtained z value is >2.58, U is interpreted as
significant at 0.01 level of significance (for two tailed test) and thus null
hypothesis is rejected. With regard to one tailed test the z value needs to be is
> 1.64 at 0.05 level of significance and > 2.33 at 0.01 level of significance
order to reject the null hypothesis.
The z value obtained by us is 2.27 which is less than >2.58 for 0.01 level
of significance but of more than 1.96, thus it can be said that U is significant
at 0.05 level and null hypothesis can be rejected.
This indicates that the null hypothesis is rejected and one may conclude that
there is a significant difference in the attitude towards environment of
individuals belonging to rural and urban area of residence.
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
……………………………………………………………………………
7.7 REFERENCES
King, Bruce. M; Minium, Edward.W. (2008).Statistical Reasoning in the
Behavioural Sciences. Delhi: John Wiley and Sons, Ltd.
Structure
8.0 Objectives
8.1 Introduction
8.2 Median Test
8.3 Computation of One Sample Median Test
8.4 Computation of Median Test for Two Independent Samples
8.5 Computation of Median Test for more than Two Independent Samples
8.6 Let Us Sum up
8.7 References
8.8 Key Words
8.9 Answers to Check Your Progress
8.10 Unit End Questions
8.0 OBJECTIVES
After reading this unit, you will be able to,
8.1 INTRODUCTION
A researcher wanted to study the median academic scores obtained by
students in 9th standard class of a school. Yet another researcher wanted to
compare the median of scores obtained by individuals in urban and rural
areas on attitude towards environment.
In both these case, the researchers can use median test in order to analyse the
data collected by them. In the previous unit, we discussed about Mann-
Whitney U test. In the present unit, we will discuss about median test that can
be used in similar way as the Mann Whitney U test. We will discuss median
test and its assumptions. And will further explain the computation of one
sample median test. compute median test with two independent samples and
median test for more than two independent samples.
*
Prof. Suhas Shetgovekar, Faculty, Discipline of Psychology, SOSS, IGNOU, Delhi
125
Non-Parametric
Statistics 8.2 MEDIAN TEST
It can be said that median test is a non-parametric alternative of t test. It can
be employed to know if the median of a certain data is same as that of
assumed median in which case one sample median test can be used. It can
also be used to know whether two or more samples that are independent and
equal or not equal with regard to their size, have different median or not.
Thus, medians of two sample sub groups are compared and these samples can
be equal or unequal in size.
Let us now try to understand the computation of one sample median test with
the help of steps and example.
126
An industrial psychologist wanted to know the average years of experience of Median Test
2 3 6 4 3 2 4 6 10 9 7 8 3 2
The scoreshaving lower value than the assumed median are to be given the
code as ‘0’ and the scores having value more than the assumed median
Those having value more than the assumed median will be given a code as
‘1’. The values that are the same as that of the assumed median will not be
considered.
2 3 6 4 3 2 4 6 10 9 7 8 3 2
0 0 1 0 0 0 0 1 1 1 1 1 0 0
6 8
fe = 1⁄2x N
= 1/2 x 14
=7
Thus
6 7
8 7
127
Non-Parametric
Statistics
Step 6: Chi Square is computed using the following formula:
χ2 =Σ [( fo- fe)2 ]/ fe
6 7 -1 1 0.14
8 7 1 1 0.14
Χ2=0.28
The Χ2 =0.28
Step 7: Interpretation
In order to interpret the obtained chi- square, we need to first know the
degree of freedom that will be
r means rows
k means columns.
Thus,
= (2-1) (2-1)
=1
Thus, df= 1
Now we can refer to the chi- square table that is given in appendix of any
Statistics book. The critical value of chi square for df= 1, is 6.635 at 0.01
level of significance and 3.841at 0.05 level of significance. The chi- square
obtained by us is 0.28 which is lower than the table value at both the levels.
Thus the null hypothesis is accepted and it can be said that there is no
significsnt difference between the assumed median and the sample median
years of experience of the newly appointed junior managers.
The scores obtained by the employees from private and public sector banks
are not different from the common median.
n= n1 + n2
= 12 +11= 23
= 23 + 1/2
= 12th score
Now we need to arrange the scores from both the groups in an ascending
order and then identify the 12th score
11, 12, 12, 12, 13, 13, 14, 15, 17, 18, 19, 20, 21, 21, 21,21, 21, 22, 23, 23 ,
23, 23
The 12th score is 19. Thus, the common median is obtained as 19.
The scores in each group are assigned positive (+) or negative (-) signs
depending on whether they fall above or below the median. If above median,
positive sign is given and if below or equal to the median, then negative sign
is given.
129
Non-Parametric
Statistics Employees from private banks - - - - - - - + + + - +
Private banks 4 8 12
Public banks 7 4 11
Total 11 12 23
Step 6: Interpretations
Now we can refer to the chi- square table that is given in appendix of any
Statistics book. The critical value of chi square for df= 1, is 6.635 at 0.01
level of significance and 3.841at 0.05 level of significance. The chi- square
obtained by us is 2.11 which is lower than the table value at both the levels.
Thus the null hypothesis is accepted and its can be said that the scores
obtained by the employees from private and public sector banks are are not
different from the common median.
130
Check Your Progress III Median Test
1) State the formula for chi- square while computing median test for two
independent samples.
Group A 4 27 6 4 26 8 9 2 7 3
Group B 3 6 9 12 16 20 21 26 5 29
Group C 4 8 10 14 15 18 23 12 15 17
The scores obtained by the three groups of students are not different from the
common median.
n= n1 + n2 + n3
= 10 +10 +10 = 30
= 30 + 1/2
= 15.5th score
Now we need to arrange the scores from the three groups in an ascending
order and then identify the 15.5th score
2, 3, 3, 7, 4, 4, 4, 5, 6, 6, 8, 8, 9, 9, 10, 12, 12, 14, 15,15, 17, 16, 18, 20, 21,
23, 26 26, 27, 29
131
Non-Parametric
Statistics
The median is the 15,5th score , that is an average of 15th and 16th score. In our
example, the 15th score is 10 and t16h score is 12. The average of these scores
would be (10 +12)/2+ 11. Thus, the common median is 11.
The scores in each group are assigned positive (+) or negative (-) signs
depending on whether they fall above or below the median. If above median,
positive sign is given and if below or equal to the median, then negative sign
is given.
Group A - + - - + - - - - -
Group B - - - + + + + + - +
Group C - - - + + + + + + +
Group A 2 8 10
Group B 6 4 10
Group C 7 3 10
Total 15 15 n= 30
For that we first need to compute the frequency expected (fe) as follows:
132
Median Test
Frequency Frequency fo-fe ( fo- fe)2 ( fo- fe)2 /fe
observed (fo) expected (fe)
-3 9 1.8
1 1 0.2
7 5 2 4 0.8
8 5 3 9 1.8
4 5 -1 1 0.2
3 5 -2 4 0.8
Χ2= 5.6
Calculate the degrees of freedom applying the formula (r-1)(k-1). The df for
the data in the table is = (3-1)(2-1) = 2 x 1= 2
Step 6 Interpretation
We need to refer to the table value for chi square that is given in any statistics
book.
For df = 2 the table value is 5.99 for 0.05 level of significance and 13.82 at
0.01 level of significance. The chi square obtained by us is 5.6 which is lower
than the table values at both the levels of significance. Thus, the null
hypothesis that the scores obtained by the three groups of students are not
different from the common [Link] accepted.
1) State the formula for chi- square while computing median test for more
than two independent samples.
8.7 REFERENCES
King, Bruce. M; Minium, Edward.W. (2008).Statistical Reasoning in the
Behavioural Sciences. Delhi: John Wiley and Sons, Ltd.
1) State the formula for chi- square while computing median test for two
independent samples.
∑[(f0 – fe )² / fe ]
1) State the formula for chi- square while computing median test for more
than two independent samples.
∑[(f0 – fe )² / fe ]
34 32 22 34 43 45 56 54 56 43 22 36 43 33
Sample A 4 5 4 6 8 22 14 45 32 2
Sample B 6 7 45 5 6 32 16 6 4 7
Sample C 4 8 3 6 44 34 32 4 10 12
Sample D 3 3 4 6 5 12 12 8 9 13
135
unnecessary calculations and also give rise to type I error. The answer in Kruskal- Wallis
Analysis of
these cases when we have more than two groups (>2 groups) to be compared Variance
is to conduct Analysis of Variance .
The term Analysis of Variance (for which the acronym ANOVA is often
employed) describes a group of inferential statistical procedures developed
by the British statistician Sir Ronald Fisher. Analysis of Variance is all about
examining the amount of variability in a y (response) variable and trying to
understand where that variability is coming from. One way that you can use
ANOVA is to compare several populations regarding some quantitative
variable, y. The populations you want to compare constitute different groups
(denoted by an x variable), such as political affiliations, age groups, or
different brands of a product. ANOVA is also particularly suitable for
situations involving an experiment where you apply certain treatments (x) to
subjects, and you measure a response (y).
Alternative hypothesis (H1): Population means are not equal. There will be
difference in the means of the different populations.
Not surprisingly, the assumptions needed for the t-test are also needed for
ANOVA. We need to assume:
When there are more than two groups or k number of groups to be compared,
ANOVA is utilised but, again since ANOVA is a parametric statistics and
137
Non-Parametric
Statistics
requires assumption of normality as a key assumption, we need to also be
aware of its non-parametric counterpart. The Kruskal- Wallis test compares
the medians of several (more than two) populations to see whether they are
all the same or not. The Kruskal- Wallis test is a non-parametric analogue to
ANOVA. It can be viewed as ANOVA based on rank transformed data.
That is, the initial data are transformed to their associated ranks before being
subjected to ANOVA. In other words, it’s like ANOVA, except that it is
computed with medians and not means. It can also be viewed as a test of
medians.
The Kruskal- Wallis one way Analysis of Variance by ranks (Kruskal, 1952)
and (Kruskal and Wallis, 1952) is employed with ordinal (rank order) data in
a hypothesis testing situation involving a design with two or more
independent [Link] test is an extension of the Mann-Whitney U test
(Test 12) to a design involving more than two independent samples and,
when k = 2, the Kruskal- Wallis one way Analysis of Variance by ranks will
yield a result that is equivalent to that obtained with the Mann-Whitney U
test.
If the result of the Kruskal- Wallis one way Analysis of Variance by ranks is
significant, it indicates there is a significant difference between at least two of
the sample medians in the set of k medians. As a result of the latter, the
researcher can conclude there is a high likelihood that at least two of the
samples represent populations with different median values.
In employing the Kruskal- Wallis one way Analysis of Variance by ranks one
of the following is true with regard to the rank order data that are evaluated:
a) The data are in a rank-order format, since it is the only format in which
scores are available; or
b) The data have been transformed into a rank-order format from an
interval/ratio format, since the researcher has reason to believe that one
or more of the assumptions of the single-factor between-subjects
Analysis of Variance (which is the parametric analog of the Kruskal-
Wallis test) are saliently violated.
Maxwell and Delaney (1990) point out that the assumption of identically
shaped distributions implies equal dispersion of data within each distribution.
Because of this, they note that, like the single factor between subjects
Analysis of Variance , the Kruskal- Wallis one way Analysis of Variance by
ranks assumes homogeneity of variance with respect to the underlying
population distribution. Because the latter assumption is not generally
acknowledged for the Kruskal- Wallis one way Analysis of Variance by
ranks, it is not uncommon for sources to state that violation of the
homogeneity of variance assumption justifies use of the Kruskal- Wallis one
way Analysis of Variance by ranks in lieu of the single factor between
subjects Analysis of Variance.
One reason cited by various sources for employing the Kruskal- Wallis one
way Analysis of Variance by ranks is that by virtue of ranking interval/ratio
data a researcher can reduce or eliminate the impact of outliers. In t test for
two independent samples, since outliers can dramatically influence
variability, they can be responsible for heterogeneity of variance between two
or more samples. In addition, outliers can have a dramatic impact on the
value of a sample mean.
139
Non-Parametric
Statistics Check Your Progress I
Step 1:Rank all the numbers in the entire data set from smallest to largest (using all
samples combined); in the case of ties, use the average of the ranks that the values
would have normally been given.
Step 2:Total the ranks for each of the samples; call those totals T1, T2, . . ., Tk,
where k is the number of groups or populations.
Step 3: Calculate the Kruskal-Wallis test statistic with the help of following
formula:
H=[12/N(N+1)][Σ((ΣR)2 /n)]–3(N+1)
(ΣR)2 = the sum of the ranks squared for a given group of subjects
Step 5: Make your conclusion about whether you can reject Ho by examining
the p-value.
140
Kruskal- Wallis
Participant Condition A Participant Condition B Participant Condition Analysis of
No. (Low Noise) No. No. C (Loud Variance
(Average
Noise) Noise)
1 3 5 2 9 10
2 5 6 7 10 8
3 6 7 9 11 7
4 3 8 8 12 11
The researcher wishes to know whether these three conditions differ amongst
themselves. and there are no assumptions of the probability. To apply
Kruskal- Wallis test, following steps would be taken:
Step 1: Rank all the numbers in the entire data set from smallest to largest
(using all samples combined); in the case of ties, use the average of the ranks
that the values would have normally been given.
3 2.5 2 1 10 11
5 4 7 6.5 8 8.5
6 5 9 10 7 6.5
3 2.5 8 8.5 11 12
Step 2: Total the ranks for each of the samples; call those totals T1, T2, . . .,
Tk, where k is the number of populations. T1 =14, T2=26, T3=38
Step3: Calculate H
1 = no training need
3 7 4
1 6 2
3 5 5
1 7 1
5 3 6
4 1 7
4 6
2 4
Step 1: Rank order the total groups’ Likert scores from lowest to highest.
If tied scores are encountered, sum the tied positions and divide by the
number of tied scores. Assign this rank to each of the tied scores.
1 2.5 4 12
1 2.5 4 12
1 2.5 5 16.5
1 2.5 5 16.5
2 5.5 5 16.5
143
Non-Parametric
Statistics 2 5.5 5 16.5
3 8 6 20
3 8 6 20
3 8 6 20
4 12 7 23
4 12 7 23
4 12 7 23
Step 2: Sum the ranks for each group and square the sums
3 8 7 23 4 12
1 2.5 6 20 2 5.5
3 8 5 16.5 5 16.5
1 2.5 7 23 1 2.5
5 16.5 3 8 6 20
4 12 1 2.5 7 23
4 12 6 20
2 5.5 4 12
4 12
5 16.5
Step3: CalculateH
2
H = [ 12 / N (N+1) ] [ ((R) / n) ] – 3(N + 1)
144 H = [ 12 / 24 (24+1) ][4489 / 8 + 23562.25 / 10 + 6320.25 / 6] – 3 (24 + 1)
Non-Parametric
Statistics Group 1 Group 2 Group 3 Group1 Group2 Group3
(Ranks) (Ranks) (Ranks)
3 6 9 1 3.5 10
5 7 10 2 5.5 13
7 9 12 5.5 10 17
8 10 15 7.5 13 18
9 10 10 13
11 15.5
ANOVA
n1=6 n2=7 n3 =5
X1= 38 X2=61 X3 =57
( X1 )2=264 (X2 )2=551 (X3 )2 =671
SStotal = (264 + 551 + 671) – [(38 + 61+ 57)2 / 18] =134
SSBetween Group = (382/6) + (612/7) + (572/5) – [(38 + 61+ 57)2 / 18]
SSWithin Group = [ 264 - (382/6)] + [ 551- (612/7)] + [ 671- (572/5)] = 63.962
Total 134.000 17
Kruskal-Wallis H test:
H= 66.177 – 57 = 9.177
F= [{(k-1)/(N-k)} {((N-1)/H)-1}]-1
If We see from the above mentioned example F was 8.213 and H was 9.177
F= [{(3-1)/(18-3)} {((18-1)/9.177)-1}]-1 F= [(2/15) {(17/9.177)-1}]-1
F= [0.133 x (1.852-1)] -1 = 0.1214-1
F= 8.231
1 9 10 12 9
2 12 6 14 8
3 14 9 11 11
4 11 9 13 7
5 13 10 11 8
149
Non-Parametric
Statistics
150