### Using KeyConnect chi square calculator to generate contingency tables

The two main steps involved in applying the chi square test of independence are

- Building the contingency table, computing the margin sums (details are available in this ebook) and calculating the observed value of the chi square test
- Comparing the observed value with the corresponding critical value (for the given alpha level and degrees of freedom).

Both these steps can be easily automated and of course, there are several online calculators to help with each. Most of them however, help with only one of the two tasks. For example, some online chi square calculators help with building the contingency table with manual input from the user. Others help with computing the critical value based on the manual input about alpha level and degrees of freedom (and thus become online replacements for text book tables).

There are hardly any online chi squared calculators which can automatically do both, that is: take raw data and build a contingency table, compute both the chi squared statistics (observed and critical) and answer the main question "Are the two variables statistically independent?"

This is where KeyConnect is unique. You can start with data in a raw form, which means that you have a table of values with columns corresponding to an attribute and rows corresponding to a sample or record. See graphic below.

KeyConnect will automatically build a 2x2 contingency table using this raw data, builds and displays the margin sums and computes the observed value of the chi square. Thus it accomplishes step 1 above.

The critical chi squared value is automatically calculated based on alpha level and the degrees of freedom (also automatically extracted from the raw data). Finally in an easy to read and interpret table it tells you if the two variables can be considered "independent" or not.

The added advantage of KeyConnect is that it can perform this analysis for just two variables or a multitude of variables. Thus if you have a dataset that consists of 10 variables and you are interested in determining if any of these variables are related to one another, KeyConnect calculates 10 * (10-1)/2 = 45 contingency tables and displays summary information about the dependecny between all pairs of variables. All you need are the raw data!

## Comments

Currently, there are no comments. Be the first to post one!