Choosing the right chi squared calculator might seem like a non-issue because it has been around for a long time, and there is no one “algorithm” which does this better than the next one. So what does the choice really come down to? Let us illustrate the process of performing the chi squared test using both R and KeyConnect and you can draw the conclusions yourself.

Why one would need to do a chi squared test of independence? Basically to establish the independence between two (or more) categorical factors or variables.

Here is the process in R:

Step 1: Read your data into a variable or data structure. One way of doing this would be as shown below

When you examine what is inside the data structure “carbuyer”, you will be able to review the raw data

Gender DecisionMaker
1 Male Yes
2 Male Yes
3 Male Yes
4 Male Yes

Step 2: Tabulate the factors and create a contingency table using the Table command

DecisionMaker
Gender      No Yes
Female     984 67
Male        811 207

Step 3: Use the summary function to perform a chi-squared test of the contingency table

The output includes a p-value. Conventionally, a p-value of less than 0.05 indicates that the variables are probably not independent whereas a p-value exceeding 0.05 fails to provide any such evidence. In other words, we cannot conclude if the variables are independent.

Number of cases in table: 2069
Number of factors: 2
Test for independence of all factors:
Chisq = 87.7, df = 1, p-value = 7.608e-21

Up to this point, R serves our job very well. However the difficulty arises when you are dealing with more than 2 variables. Suppose you have a table of factors and you wish to examine several of them at the same time, the table output becomes unreadable. Furthermore if you want to test every factor in the table with every other factor – it would require some deep programming skills in R, not to mention a lot of time.

Another inadequacy is the lack of a simple graphical depiction of the dependency between the factors.

This video illustrates the process of running the same analysis in KeyConnect.

The three main advantages of using KeyConnect Chi squared calculator for running a test of independence are the following:

1. No programming required – no matter how many variables or factors you have

2. No confusing result interpretation – if the variables are not related, you will not see a connection in the circle chart. If they are related (in statistical terms, if they are NOT independent), then you will see a connection. Furthermore the thickness of the connection line will give you an indication of the strength of the relationship.

3. With multi variable datasets, you can run in one step all combinations of the chi squared test between the factors. The Table of chi-squared values will allow you to easily check the computations for any pair of parameters.

Originally posted on Fri, Oct 05, 2012 @ 08:10 AM

Photo by Samia Liamani on Unsplash

Categories:

Tags:

#### No responses yet

This site uses Akismet to reduce spam. Learn how your comment data is processed.