# Statistical tests: Categorical data

This page contains general information for choosing commonly used statistical tests. The examples linked provide general guidance which should be used alongside the conventions of your subject area. Where possible, a brief explanation of the test is given with links to performing this test using Excel, SPSS and R. It is worth noting that the examples often contain information about interpreting the output and results so can act as a guide to interpreting statistical results too.

To navigate this table, consider the following questions:

• Is your outcome variable categorical?
• How many samples (or groups) do you have?
• Are the outcomes paired (or dependent)?

 1 Sample Chi-square goodness-of-fit A nonparametric test designed to see if the sample follows a known distribution. Example Excel SPSS R 1 (+) Sample Binomial Logistic Regression A statistical model used when analysing dichotomous data that may depend on a number of factors. The logistic regression model allows the effects of all factors to be studied simultaneously. Results are usually expressed in terms of odds ratio. Example SPSS R 2 Samples Paired (or dependent) McNemar's test Comparing differences between paired (or related) dichotomous data. Example SPSS R 2 Samples Agreement (2 raters) Cohen's Kappa A measure of agreement between two raters recording a categorical outcome variable. Example SPSS R 2 (+) Samples Unpaired (or independent) Chi-squared test of association A nonparametric test designed to explore if there is an association or relationship between two categorical variables. Example Excel SPSS R 2 (+) Samples Unpaired (or independent) Fisher's exact A nonparametric test designed Expected values (E ≤ 5) in for more than 25% of cases. The example describes a Chi-squared test and details when to use the Fisher's exact test and details which output variables to report. Example SPSS R 3 (+) Samples Cochran's Q-test Cochran's Q-test determines if there are differences between three or more related groups. Example SPSS R