From LibreTexts, under CC BY-NC-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.
The Chi-squared test is used only with categorical variables. This test assesses whether the categorical variables are related and is used to make inferences about the likelihood that there is a certain pattern within the data (e.g., is it more likely that women who live alone have cats when compared to men who live alone).
Creating Frequency Tables
JASP can analyse raw data directly, with one row per participant and a column for each categorical variable. You do not need to convert the data into frequency counts first. The steps below show an alternative approach using summarised counts.
How do I do that?
1. In the Descriptives menu move one variable to the ‘Variables’ box, and the other variable to the ‘Split’ box. Where you put each variable does not matter but it does determine how your frequency table looks. We recommend swapping the variables to see which table layout you prefer.
2. In the Tables menu, select ‘Frequency tables’.
Doing so will give you the Frequency Table for your variables:
3. If you choose to use summarised counts, create a new dataset using the frequency data, with each row representing one combination of variables.
Conducting a Chi-squared Test
Your data should now be in a form suitable for conducting the chi-squared test.
How do I do that?
1. In the Frequencies menu select ‘Contingency Tables’ from the ‘Classical’ list.
A new window will open, like so:
3. Move one variable of interest to the Rows box and the other to the Columns box. If you are using summarized counts, also move the frequency variable to the Counts box. If each row represents one participant, leave Counts empty.
4. In the Statistics menu, select:
χ2 (chi-squared), χ2 continuity correction, and Likelihood ratio. The last two are statistics with slight adjustments.
Phi and Cramer’s V – These are measures of association. Phi is commonly used for 2 × 2 tables, while Cramer’s V can also be used for larger tables.
Odds ratio – selecting this option will give you Fisher’s exact test which is useful when expected cell counts are small.
5. In the ‘Cells’ menu select ‘Expected’ under Counts, and ‘Row’ and ‘Total’ under Percentages. This will then give you all the outputs you need to interpret the Chi-squared analysis.