Professional > Table scripting > Statistical tests > Chi-square test > Details and restrictions of the chi-square test
 
Details and restrictions of the chi-square test
The chi-square test is not suitable for all tables. When you request the test on a table that is structurally unsuitable, UNICOM Intelligence Professional simply skips the test, leaves the chi-square and p value rows blank, and writes an explanation to the diagnostics data. It is up to you to make sure that the data in the table is generally suitable for testing, that the sample size is suitable, etc.
UNICOM Intelligence Professional displays a message if you define a chi-square test on an unsuitable table or if you change a table that has a chi-square test defined so that it is no longer suitable for the test. When this happens, you can either adjust the table so that it conforms to the restrictions, or you can remove the test from the table. However, sometimes UNICOM Intelligence Professional is unable to determine that a table or a section of a table is unsuitable for the test until it actually attempts to perform it--for example, when a table has only two category columns and all of the values in one of those columns are zero. When that happens, UNICOM Intelligence Professional simply skips the test and leaves the chi-square and p value rows blank.
Multiple response variables
This test is not suitable for tables that include a multiple response variable.
Hierarchical data
This test is unsuitable for running on lower level data when you are working with hierarchical data a hierarchical view of the data. See Hierarchical data.
Rows and columns
For the chi-square test, the variables on the side and top axes must have at least two categories. UNICOM Intelligence Professional does not perform the test on rows and columns in which all of the values are zero or on rows and columns that are formed from non-category elements, such as bases and means.
Fisher's exact test is carried out only on tables that have exactly two categories containing data on the top and side axes of the table (or on a subsection of the table, such as that formed by a nested or concatenated table).
Nested and concatenated tables
The chi-square test compares the columns and rows formed from the categories of two variables--one on the side axis and one on the top axis. If there is more than one variable on either the side or the top axis, the test is performed separately for each combination of variables at the innermost nesting level. This means that the innermost child variables must have at least two categories.
Built-in bases
This test is not suitable for tables that include variables that contain more than one built-in base.
Two by two tables
When performing the chi-square test on a table or a section of a table that has two category columns and two category rows, UNICOM Intelligence Professional computes Yates' corrected chi-square (continuity correction). When performing the Yates' corrected chi-square, UNICOM Intelligence Professional also computes Fisher's exact test. However, the results of Fisher's exact test are shown only in the diagnostics data and not on the table itself (unless you have also requested Fisher's exact test on the table).
Excluded Elements
The IncludeInBase=False property has no effect on the chi-square test. If a chi-square test is carried out on a table containing categories that are excluded from the base using IncludeInBase=False, the calculation includes rows and columns corresponding to the excluded categories.
See also
Chi-square test