I am trying to determine if there is a dependency between two survey questions about the effectiveness of a subject-specific online communities. The first survey question asks how frequently a user posts questions or comments. The second survey question asks if the participating in the community increases the user's confidence in that subject area.

I think I need to to use a Chi-Square Test for Independence. However, I am not sure how to calculate it, especially given the answer choices.

The possible answer choices for Question 1 are:

  1. Never
  2. 1-5 per month
  3. 6-10 per month
  4. 11+ per month

and for Question 2 are:

  1. Strongly disagree
  2. Disagree
  3. Neither agree nor disagree
  4. Agree
  5. Strongly agree

Is the Chi-Square Test for Independence the correct test, and if so, how do I use it against the data? Does the data need to be grouped? For instance, should I group the answers for Question 1 to a binary choice of Never Post or Sometimes Post?

Thank you for your assistance and expertise.


Further questions.

  • I can easily obtain the observed number from the survey data for each cross-section (e.g. Strong Disagree and Never, Agree and 1 to 5 times, etc.). But where do I find my expected number?
  • Am I comparing 1 to 5 times, 5 to 10 times, and 11 or more to Never (Never being the baseline or expected amount)?
  • $\begingroup$ Are you uncertain of the method or just how to do the calculation in your software? $\endgroup$ – Max Gordon Jan 28 '12 at 22:33
  • $\begingroup$ Max, I wish I knew the answer. I am uncertain on how I am supposed to use the data (what do I use as the observed and expected values) to come up with the chi square value. $\endgroup$ – Brian Jan 28 '12 at 22:55
  • $\begingroup$ Hi Brian, just following up to see if you tried the other suggestions in @rolando2's answer. $\endgroup$ – Michelle Jan 29 '12 at 2:03

I agree with @rolando2's suggestion that Spearman's/Kendall's might be better suited. In general doing this by hand is just inconvenient but if you want to have a look at this excellent Khan Academy clip that shows exactly how to do a $\chi^2$ test.

I suggest you use some software, my current favorite is R together with RStudio as your IDE

First create your dataset, preferably in a spreadsheet and then import it but you can also create the data in R:

my_question1 <- c(1, 1, 3, 1, 4, 3, 1, 4, 4, 3, 2)
my_question2 <- c(1, 2, 4, 3, 3, 5, 2, 5, 5, 4, 1)

Then the $\chi^2$ test

chisq.test(my_question1, my_question2)

If you have a cell with few outcomes (5 or less) you should use Fisher's exact test:

fisher.test(my_question1, my_question2)

For the Spearman method use:

cor.test(my_question1, my_question2, method="spearman")

And for the Kendall use:

cor.test(my_question1, my_question2, method="kendall")

Hope this helped


Don't group the responses any further: that just throws away information (blurs useable distinctions). The Chi-Square test is a reasonable way to go. Slightly more powerful would be a nonparametric test of correlation: either Spearman's or Kendall's. Each of these will use the information inherent in having ordinal scales, in which each possible answer is not only different from but "more" something than the previous.

  • $\begingroup$ Thanks Rolando. I'm still not sure how to compare the questions. Should I compare each response category in one question with the other. In this case, since there are four answer choices in Question 1 and five in Question 2, I would have 20 chi square independence tests? $\endgroup$ – Brian Jan 28 '12 at 16:26
  • $\begingroup$ You would have one chi-square test. However, in your case I think @roland2's recommendation of the nonparametric tests is the better way forward. $\endgroup$ – Michelle Jan 28 '12 at 19:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.