Contingency Tables (Chi-square)

Select menu: Stats | Statistical Tests | Contingency Tables (Chi-squar

This performs statistical tests on contingency tables.

Available Data

This lists data structures appropriate to the current input field. The contents will change as you move from one field to the next. Double-click on a name to copy it into the input field, or type the name in directly.

Chi-square test

You can calculate the chi-square test of association between the factors classifying the rows and the columns of a two-way tables of counts.

Method

You can choose between two ways of calculating the test: Pearson uses the familiar method; the alternative, which may be more accurate, is to use Maximum Likelihood.

Data Arrangement

For a chi-square test you can enter the data in one of three ways.

Table Create a two-way table containing the counts. Click Create Tablethen create a table from existing data, or type the values into a new spreadsheet.
Row and Column Factors You can supply 2 factors; one containing rows and one containing columns. Genstat will automatically create a two-way table of frequency counts and this will be used in the test.
Single Variate with grouping factors Enter the counts in a variate along with classifying factors for the rows and columns. This is the same layout as you would use in a log-linear analysis. Genstat automatically forms a two-way table from these data structures and performs a chi-square test on the table.

Fisher’s exact test

This menu performs Fisher’s Exact test of association between the factors classifying a 2×2 table of counts. It provides the one-tailed significance level from the exact test, together with the mid-p value, which includes only half the probability of the observed data table.

Two methods are used to calculate a two-tailed significance level. The first simply doubles the one-tailed significance level: the second method calculates the cumulative probability of all outcomes that are no more probable than the observed table. Mid-p values are produced for each of these methods.

Table (for Fisher’s Exact test)

Specifies the two-way, 2×2 table containing the counts. Create a two-way table containing the counts. Click Create Tablethen create a table from existing data, or type the values into a new spreadsheet.

An alternative method to enter data for a Fisher’s exact test is to type the four values from the 2×2 table into the Table box, separating them by commas. For example: 4,6,7,6

See Also

Updated on November 30, 2017

Was this article helpful?