Advanced tables and statistics > Descriptive statistics > Chi-squared tests > A single classification chi-squared test
 
A single classification chi-squared test
Quick reference
To request a single classification chi-squared test, type:
stat=chis[([clevel=sig_level] [, row] [, wtform])]
on the a, sectbeg, flt or tab statement.
More information
The single classification chi-squared statistic tests whether a subsample proportion differs significantly from the corresponding proportion for the sample as a whole. For example, suppose you ask 40 people which of two brands they prefer, and find that 15 of them prefer the first brand. This suggests that if you look at each sex individually, the number of men or women preferring the first brand would be roughly 15/40 of the total number of men or women interviewed. If the figures in the table are not in this ratio you can use the chi-squared test to check whether the difference between the subsample (for example, women preferring first brand) and the total (for example, all preferring first brand) is significant.
To run the test, place the keyword:
stat=chis[(options)]
on the a, flt or tab statement.
When the test is applied, certain defaults are assumed:
Results are tested for significance at the 95% level.
The rows of the table are taken as the responses (for example, brand preferred), and the columns as the subsamples (for example, sex=female). The + or - sign is printed to the right of the column percentage.
The test uses unweighted data only, even if the table itself is weighted.
Options on the command line which change these are as follows. If more than one option is required, the keywords must be separated with commas.
clevel=n
Test for significance at the n% level. n can be 90, 95 or 99.
row
The columns of the table are the responses and the rows are the subsamples to be compared. + or - is printed to the right of the row percentages.
wtform
Use the alternative formula which takes account of weighting. Note that the unweighted formula can be used with weighted tables when you want to ignore the weights when calculating significance.
The test is applied to all cells in the table unless:
the row or column includes the option nontot, or
there is no previous base element in either direction (that is, a missing row base, a missing column base, or both row and column bases are missing), or
the row or column does not have the appropriate op= option on it. The appropriate options are op=2 if the columns are the subsamples or op=0 if the rows are the subsamples.
In addition, if the weighted formula is requested, the following condition also applies. The weighted formula uses both weighted and unweighted data, so when looking at the subsample elements in a weighted table, Quantum expects each of those elements to be preceded by a version of itself which is suppressed, unweighted and nontotalizable:
n15;c=condition;wm=0;nontot
n01Subsample 1;c=condition
The test will not be applied to elements where this suppressed element is not found. You should note that Quantum does not check that the condition on the suppressed element matches that on the corresponding subsample element.
The test is applied identically to single-coded and multicoded responses, and, although it compares absolute figures, prints the results next to the appropriate percentage figures.
Whether or not a value is significant depends on the value of chi-squared at the given confidence level, the value of chi-squared for the subsample being tested, and the size of the subsample in relation to the total. Critical values used for testing significance are:
2.71 at the 90% level
3.84 at the 95% level
6.63 at the 99% level
If the value of chi-squared returned by the test is greater than the value of chi-squared at the given level, and the subsample proportion is greater than the total proportion, the sample is deemed to be significantly greater than expected, and a + sign is printed next to the subsample proportion. If the value of chi-squared returned by the test is less than the value of chi-squared at the given level, and the subsample proportion is less than the total proportion, the sample is deemed to be significantly less than expected, and a - sign is printed next to the subsample proportion.
In all other cases the difference is deemed insignificant and nothing is printed.
Example
Here is an example of a Quantum script and the table it produces:
tab sex hswk;stat=chis(clevel=99,row);op=01;dsp;flush
ttlQ7: Do you think that household chores are evenly
ttl shared in your household?
foot
ttl
ttlRows are subsamples to be compared
l sex
col 110;Base;Male;Female
l hswk
col 156;Base;Yes;No;DK
This is the table that it produces:
Absolutes/row percents
Q7: Do you think that household chores are evenly
shared in your household?

               Base           Yes          No          DK

Base            200            61         113          26
                             30.5%       56.5%       13.0%

Male 80 39 30 11
48.8%+ 37.5%- 13.8%
Female 120 22 83 15
18.3%- 69.2%+ 12.5%

Rows are subsamples to be compared
The cell for men answering yes is flagged with a + sign. This means that it is significantly greater than would be expected according to the overall proportion of people who answered yes. In statistical terms this means that:
the value of chi-squared for that cell is greater than 6.63, and that
39/80 is greater than 61/200 at the 99% confidence level.
Where no + or - sign is shown, the subsample proportions are not significantly different from the proportion for the sample as a whole.
See also
Chi-squared tests