0% found this document useful (0 votes)
97 views3 pages

Chi-Test of Independence

The document discusses the chi-square test of independence, which is used to determine if two nominal variables are independent of each other. It can be used with data in a two-way table with rows and columns. The null hypothesis is that the relative proportions of one variable are independent of the other variable. The expected frequencies are calculated using only the observed frequencies rather than a theoretical relationship. The chi-square value is then calculated by comparing the observed and expected frequencies in each cell.

Uploaded by

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

Chi-Test of Independence

The document discusses the chi-square test of independence, which is used to determine if two nominal variables are independent of each other. It can be used with data in a two-way table with rows and columns. The null hypothesis is that the relative proportions of one variable are independent of the other variable. The expected frequencies are calculated using only the observed frequencies rather than a theoretical relationship. The chi-square value is then calculated by comparing the observed and expected frequencies in each cell.

Uploaded by

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

Chi-square test of

independence

The chi-square test may be used both as a test of goodness-of-
fit (comparing frequencies of one nominal variable to theoretical
expecations) and as a test of independence (comparing frequencies of
one nominal variable for different values of a second nominal variable).
The underlying arithmetic of the test is the same; the only difference is
the way the expected values are calculated. However, goodness-of-fit
tests and tests of independence are used for quite different experimental
designs and test different null hypotheses, so I treat the chi-square test of
goodness-of-fit and the chi-square test of independence as two distinct
statistical tests.
The chi-square test of independence is an alternative to the G-test of
independence. Most of the information on this page is identical to that
on the G-test page. You should read the section on"Chi-square vs. G-
test", pick either chi-square or G-test, then stick with that choice for the
rest of your life.
When to use it
The chi-squared test of independence is used when you have
two nominal variables, each with two or more possible values. A data set
like this is often called an "RC table," where R is the number of rows
and C is the number of columns. For example, if you surveyed the
frequencies of three flower phenotypes (red, pink, white) in four
geographic locations, you would have a 34 table. You could also
consider it a 43 table; it doesn't matter which variable is the columns
and which is the rows.
It is also possible to do a chi-squared test of independence with more
than two nominal variables, but that experimental design doesn't occur
very often and is rather complicated to analyze and interpret, so I won't
cover it (except for the special case of repeated 2x2 tables, analyzed with
the Cochran-Mantel-Haenszel test).
Null hypothesis
The null hypothesis is that the relative proportions of one variable are
independent of the second variable; in other words, the proportions at
one variable are the same for different values of the second variable. In
the flower example, the null hypothesis is that the proportions of red,
pink and white flowers are the same at the four geographic locations.
For some experiments, you can express the null hypothesis in two
different ways, and either would make sense. For example, when an
individual clasps their hands, there is one comfortable position; either
the right thumb is on top, or the left thumb is on top. Downey (1926)
collected data on the frequency of right-thumb vs. left-thumb clasping in
right-handed and left-handed individuals. You could say that the null
hypothesis is that the proportion of right-thumb-clasping is the same for
right-handed and left-handed individuals, or you could say that the
proportion of right-handedness is the same for right-thumb-clasping and
left-thumb-clasping individuals.
For other experiments, it only makes sense to express the null
hypothesis one way. In the flower example, it would make sense to say
that the null hypothesis is that the proportions of red, pink and white
flowers are the same at the four geographic locations; it wouldn't make
sense to say that the proportions of locations are the same for red, pink,
and white flowers.
How the test works
The math of the chi-square test of independence is the same as for
the chi-square test of goodness-of-fit, only the method of calculating the
expected frequencies is different. For the goodness-of-fit test, a
theoretical relationship is used to calculate the expected frequencies. For
the test of independence, only the observed frequencies are used to
calculate the expected. For the hand-clasping example, Downey (1926)
found 190 right-thumb and 149 left-thumb-claspers among right-handed
women, and 42 right-thumb and 49 left-thumb-claspers among left-
handed women. To calculate the estimated frequency of right-thumb-
claspers among right-handed women, you would first calculate the
overall proportion of right-thumb-claspers:
(190+42)/(190+42+149+49)=0.5395. Then you would multiply this
overall proportion times the total number of right-handed women,
0.5395(190+149)=182.9. This is the expected number of right-handed
right-thumb-claspers under the null hypothesis; the observed number is
190. Similar calculations would be done for each of the cells in this 22
table of numbers.
The degrees of freedom in a test of independence are equal to
(number of rows)1 (number of columns)1. Thus for a 22 table,
there are (21)(21)=1 degree of freedom; for a 43 table, there are
(41)(31)=6 degrees of freedom.

URL: http://udel.edu/~mcdonald/statchiind.html

You might also like