Desktop User Guides > Professional > Table scripting > Statistical tests > Column proportions test > Examples of the column proportions test
 
Examples of the column proportions test
Sample script file: ColumnProportionsTest.mrs
This example script is based on the Museum sample data set. See Running the sample table scripts for information on running the example scripts.
The first column proportions test in this example tests whether there are any significant differences in the proportions of male and female respondents who found the different galleries most interesting.
This graphic is described in the surrounding text.
UNICOM Intelligence Professional assigns IDs of A to the Male column and B to the Female column and that these are displayed below the column headings. There is a B below the cell contents in the Male cell of the Insects row, and an A below the cell contents in the Female cell of the Human biology row. For the Insects row, this indicates that the proportion of male respondents is higher than the proportion of female respondents and that this difference in proportions is statistically significant at the 5% significance level. For the Human biology row, this indicates that the proportion of female respondents is higher than the proportion of male respondents and that this difference in proportions is statistically significant at the 5% significance level.
The column proportions test in this table shows us that, although the proportions of male and female respondents who found the different galleries most interesting vary, the differences are statistically significant only for the Insects and Human biology galleries. The differences in the preferences for all of the other galleries can be explained by chance.
See also Adding a minimum p value to a table for an example of this table that displays only rows with significant results.
The following example tests whether there are any significant differences in the proportions of male and female respondents who visited or planned to visit other museums.
This graphic is described in the surrounding text.
UNICOM Intelligence Professional assigns IDs of A to the Male column and B to the Female column and that these are displayed below the column headings. There is a B below the cell contents in the Male cell of the National Museum of Science row, and an A below the cell contents in the Female cell of the National Art Gallery row. For the National Museum of Science row, this indicates that the proportion of male respondents is higher than the proportion of female respondents and that this difference in proportions is statistically significant at the 5% significance level. For the National Art Gallery row, this indicates that the proportion of female respondents is higher than the proportion of male respondents and that this difference in proportions is statistically significant at the 5% significance level.
The column proportions test in this table shows us that, although the proportions of male and female respondents who found the different galleries most interesting vary, the differences are statistically significant only for National Museum of Science and National Art Gallery. The differences for all of the other named museums can be explained by chance.
Examples of testing different columns
The following example shows the results of a column proportions test using the default columns, on a table with Biology nested within Before on the top axis:
This graphic is described in the surrounding text.
This example tests the default selection of columns; that is, it tests all columns in each section of the table against each other. In this case, the test indicates whether there are any significant differences between the expectations of those who have a biology qualification and those who do not. The results show a significant difference in the expectation of general knowledge and education, between those with and without a qualification who have visited the museum before (columns C and D).
However, in this table, you might want to concentrate on significant differences between those who have been to the museum before and those who have not.
The following example tests this:
"C/E, D/F"
The following example tests this, using the script:
TableDoc.Table6.Statistics.TestColumns = "C/E, D/F"
This graphic is described in the surrounding text.
The results show a significant difference in the expectation of education for children, between people with no biology qualification who have visited the museum before and those who have not (columns D and F).
Example of defining column IDs as a string
Starting with UNICOM Intelligence Professional 5.6 you can define column IDs as a string using the ColumnsID property. Each character in the string is used to allocate a column ID, with a period or space character used to indicate that an ID should not be allocated. A character needs to be added to the ID's string for each column, even if the column is hidden. When allocating column IDs a character should also be added for the base columns.
For the table below, the column IDs could be set as follows to test Yes-Male against No-Male, and Yes-Female against No-Female:
Table.Statistics.ColumnIDs = "....MF.NG"
Table.Statistics.TestColumns = "M/N, F/G"
This graphic is described in the surrounding text.
Column IDs are only applied to visible table elements. Hidden elements are not taken in consideration when defining a Column IDs as a string.
See also
Column proportions test