Chi Square
Chi-square (χ²) is an important non-parametric (distribution-free) test of significance. As a non-parametric test, it
requires no rigid assumptions regarding the type or normality of the population distribution, and can be used as both
a test of goodness of fit and a test of independence.
Definition
Chi-square is a non-parametric statistical test that explores the significance of the deviation of an experimentally
observed frequency distribution from a proposed (expected) frequency distribution, and therefore constitutes an
analysis of frequencies. When the data consist of frequencies in discrete categories, the chi-square test may be used
to determine the significance of association between two independent groups. The hypothesis being tested is
whether the two groups differ or are associated with respect to some characteristic — that is, whether the relative
frequency with which group members fall into several categories differs meaningfully, or whether such differences
are attributable to chance alone.
In a statistical test, two kinds of assertions are involved: an assertion directly related to the purpose of the
investigation (the hypothesis to be tested) and another assertion that makes a probability statement (the model).
Under a non-parametric or distribution-free test, it is difficult to assume that a particular distribution is applicable, or
that a certain value is attached to a parameter of the population.
Assumptions of the Chi-Square Test
● It requires no assumption regarding the normality of the population distribution of the variable(s).
● It uses no precomputed statistic as an estimate of a parameter in its computation.
● It is applicable to even very small samples.
● It can be used for discrete, nominal, or ordinal variables.
Formulas
1. General Formula for Chi Square
χ² = Σ [ (fₒ − fₑ)² / fₑ ]
where fₒ = frequency of the observed or experimentally determined data, and fₑ = expected frequency of occurrence
on some hypothesis.
2. Expected Frequency (in a Contingency Table)
fₑ = (Row total × Column total) / Grand total
3. Degrees of Freedom
df = (r − 1)(c − 1) i.e., (Number of rows − 1)(Number of columns − 1)
4. Chi Square with Yates's Correction
When any computed fₑ is less than 5 and the χ² has df = 1 only, Yates's correction must be applied. Yates's
correction brings each (fₒ − fₑ) closer to zero by 0.5 — that is, 0.5 is subtracted from each positive (fₒ − fₑ) and added
to each negative (fₒ − fₑ). The corrected values are then used to compute χ²:
χ² = Σ [ (|fₒ − fₑ| − 0.5)² / fₑ ]
The bars on either side of (fₒ − fₑ) indicate that all values are taken as positive, ignoring their algebraic sign.
5. Alternative (Direct) Formula for a 2 × 2 Table, with Yates's Correction
χ² = n(|AD − BC| − n/2)² / [(A+B)(C+D)(A+C)(B+D)]
where A, B, C, D are the four cell frequencies of the 2 × 2 table, n is the grand total, and the bars on either side of
(AD − BC) indicate that the difference is taken as positive irrespective of its algebraic sign. This correction is
needed because a computed chi square, based on frequencies (whole numbers), varies in discrete jumps, whereas the
chi-square distribution table gives values from a continuous scale.
Uses and Applications
The chi-square test is applicable to a large number of problems. It is, in fact, the technique through which it is
possible for researchers to:
Purpose What the Chi-Square Test Does
Test of Goodness of Fit Determines how far an experimentally observed frequency
distribution deviates from a proposed (theoretical or expected)
frequency distribution — i.e., whether a large sample's distribution
matches a particular theoretical distribution.
Test of Significance of Determines whether two attributes/classifications (e.g., handedness
Association (Independence) and eyedness, diabetes and hypercholesterolemia) are associated or
independent, by comparing observed and expected cell frequencies
in a contingency table.
Test of Homogeneity / Tests whether different samples or groups come from populations
Significance of Population with the same distribution, or compares a theoretical population
Variance with actual data when categories are used.
Characteristics That Make Chi-Square (a Non-Parametric Test) Widely
Applicable
● Speed of Application: When the sample size is small or moderate, distribution-free methods are generally
faster to apply than parametric statistics.
● Scope of Application: Since non-parametric tests rest on fewer and less elaborate assumptions than
parametric tests, they can be correctly applied to a much larger class of populations.
● Type of Measurement Required: Distribution-free statistical tests usually require only nominal or ordinal
data.
● Influence of Sample Size: When sample sizes are 10 or less, distribution-free tests are easier and quicker
(though less efficient) than parametric tests, and are more appropriate when parametric assumptions are not
satisfied. As sample size increases, however, non-parametric tests become more laborious, time-
consuming, and comparatively less efficient.
● Susceptibility to Violation of Assumptions: Because the assumptions of non-parametric tests are fewer and
less elaborate, they are less susceptible to violation.
● Statistical Efficiency: Distribution-free tests are often superior or equal to their parametric counterparts
when the assumptions of the parametric test are not met; when all parametric assumptions are satisfied,
non-parametric tests are only slightly less efficient, particularly with small samples.
Typical Applications (as used in practice)
● Testing whether two classifications of a group (e.g., handedness and eyedness) are independent or
significantly associated, using a two-tail chi-square test on a contingency table.
● Testing the association between a condition and an attribute (e.g., diabetes and hypercholesterolemia) in
small clinical samples, applying Yates's correction where expected frequencies are below 5.
● Testing whether an intervention (e.g., vaccination) shows a genuine effect on outcome severity, by
comparing observed versus expected frequencies across two groups.
● Testing goodness of fit — for example, whether preferences (such as music style choices among youth club
members) are evenly distributed across categories or show a significant bias, by comparing observed
frequencies to equally expected frequencies.