# How to Use the Chi-Square Test for Survey Data Analysis

Note: This section is fairly technical in nature and
we do not provide a Chi-Sq
uare Calculator. The Chi-Square test is used when cross-tabulating survey results and all popular cross-tab software packages include this as a test option. Please use our handy Chi-Square Significance Reference Table for help interpreting your cross tabulation results.

### Chi-Square Reference Table

The Chi-Square is a statistical test used to examine
differences with categorical variables. The Chi-Square test
is used in two circumstances: 1) for estimating how closely
an observed distribution matches an expected distribution
(a "goodness-of-fit" test), or 2) for estimating whether two
random variables are independent.

For survey results, the Chi-Square statistical test comes in
most handy when analyzing cross tabulations of the survey
data. Since crosstabs show the frequency and percentage
of responses to questions by different segments or categories of respondents (gender, income, profession, etc.), the Chi-Square test can tell us whether there is a statistical difference between the segments/categories in how they answered the question.

Note #1: The Chi-Square statistic only tests whether two
variables are independent in a "yes" or "no" format. It does
not indicate the degree of difference between the respondent categories in terms of which is greater or less.

Note #2: The Chi-Square test requires that you use
numerical values (frequency counts), not percentages or
ratios.

## Chi-Square Calculation Formula

chi-sq = sum[(Ei,j - Ai,j) / Ei,j ]

where Ei,j represents the expected value for cell i, j

E i,j = (Ti x Tj) / N Ti = sum of values in columni, Tj = sum of values in row j, N = total of values in table

A i,j represents the actual value for cell i, j

For significance, test chi-sq against critical values for the Chi Square Distribution

df = (columns-1) x (rows-1)