Advanced tables and statistics > Descriptive statistics > Chi-squared tests > One-dimensional chi-squared test
 
One-dimensional chi-squared test
Quick reference
To request a one-dimensional chi-squared test, type:
stat=chi1 [, element_text] [;options]
as an element in the axis.
More information
The one-dimensional chi-squared test statistic is an axis-level statistic. You can use it to test whether the counts in an axis or a segment of an axis differ from those which would result from a uniform distribution. A uniform distribution is one where all values have the same relative frequency. Thus if an axis has four elements, and the respondents are uniformly distributed over that axis, you would expect the number present in each element to be 25% of the base for that axis.
To request a one-dimensional chi-squared test, place a stat=chi1 element in the axis whose distribution is to be tested at the point at which you want the statistic displayed. The first element in this axis must be a base element: other base elements may be present, and these define the beginning of additional segments in the axis. There must be at least two basic count elements in each segment on which the test is performed, that is, between each stat=chi1 element in the axis and the most recent base element. For example:
l flavor
col =123;Base;hd=Low Fat;Strawberry;Raspberry;Blackcurrant;Pineapple
n03
stat=chi1, 1D chi-squared
n03
n11Base
col =123;hd=Original Flavor;Peach='5';Mango='6'
n03
stat=chi1, 1D chi-squared
When checking your table, bear in mind the following:
If all cell counts in a segment are the same, the chi-squared value is zero.
Although the nz option suppresses all-zero rows in a table, these rows are still used in the calculation of the chi-squared statistic.
The elements in the axis or in each segment must be mutually exclusive. This means that a respondent must appear in only one element of the axis or segment.
Chi-squared tests might give misleading results when expected cell counts are small. In this case, a useful guide is that the total of the counts in the axis, and in each segment tested, should be five times the number of elements in the axis (or segment). That is, the average of the counts in the axis or segment used should be at least five.
Although a base element must be present as the first element of the axis, or of each segment in the axis, only the basic count elements are actually used in the calculation. Take the following example:
Base
:
60
Row 1
:
25
Row 2
:
19
Chi-squared
 
 
Row 3
:
7
Row 4
:
9
Here, the statistic is calculated for Rows 1 and 2 using a base of 44. Quantum then tests whether those two counts are significantly different from 22.
Example
You have carried out a survey of purchases of washing powder throughout the country, and now want to test whether there is a preference for certain powders in different regions. The Quantum program:
tab powder region
ttlQ.7 Which brand of washing powder do you usually buy?
ttlBase: All respondents
l region
col 110;Base;North;South;East;West
l powder
col 115;Base;Suds;Washo;Gleam;Sparkle
n03
stat=chi1,1-D chi-sq
n33sig. level
produces:
Q. 7 Which brand of washing powder do you usually buy?
Base: All respondents

Base North South East West

Base 511 145 194 129 137
Suds 109 35 26 25 23
Washo 113 27 30 26 30
Gleam 149 40 51 31 27
Sparkle 140 38 46 33 33

1-D chi-sq 9.16 3.48 11.52 1.56 1.94
sig. level 0.027 0.324 0.009 0.669 0.585
Note An n33 statement has been used to enter text against the row of significance levels.
This example tests whether respondents are equally distributed across the brands. The test shows a result significant at the 2.7% level for the Base column, indicating that there is evidence that overall the number of respondents who chose each of the four brands is not equal. Looking within the individual regions, the only region with a significant result is the South at the 1% significance level. There is no evidence that the respondents in the other regions are not uniformly distributed across the four brands.
See also
Chi-squared tests