# Questions tagged [contingency-tables]

Tables of counts (occasionally proportions of marginal counts), arranged by (at least) two marginal categories, displaying bivariate or multivariate frequencies. Sometimes called crosstabs.

99 questions
Filter by
Sorted by
Tagged with
12k views

### Given the power of computers these days, is there ever a reason to do a chi-squared test rather than Fisher's exact test?

Given that software can do the Fisher's exact test calculation so easily nowadays, is there any circumstance where, theoretically or practically, the chi-squared test is actually preferable to Fisher'...
• 5,811
87k views

### What is the relationship between a chi squared test and test of equal proportions?

Suppose that I have three populations with four, mutually exclusive characteristics. I take random samples from each population and construct a crosstab or frequency table for the characteristics ...
• 1,427
38k views

### Which is the best visualization for contingency tables?

Which is best plot, from statistical standpoint, to show a contingency table, which is typically being analyzed by chi-square test? Is it a dodged barplot, stacked barplot, heatmap, contour plot, ...
• 10.1k
5k views

### $\chi^2$ of multidimensional data

I want to test if two observations of nominal data accord to the same distribution. I am using the chi squared statistics to perform a chi squared homogeneity test and normalize the result with Cramer'...
28k views

### What to do when I have expected count <5 warning for a chi squared test?

I applied a survey consisting of 12 questions to 120 people and each questions include 4 nominal categories; I want to make comparison of people's answers according to their socio-demographic ...
• 231
5k views

### Correlation among categories between categorical nominal variables

I have a data set with two categorical nominal variables (both with 5 categories). I would like to know if (and how) I am able to identify potential correlations between the categories from these two ...
87k views

### Fisher's Exact Test in contingency tables larger than 2x2

I was taught to only apply Fisher's Exact Test in contingency tables that were 2x2. Questions: Did Fisher himself ever envision this test to be used in tables larger than 2x2 (I am aware of the tale ...
• 5,811
5k views

### At What Level is a $\chi^2$ test Mathematically Identical to a $z$-test of Proportions?

BACKGROUND: Skip safely - it's here for reference, and to legitimize the question. The opening of this paper reads: "Karl Pearson’s famous chi-square contingency test is derived from another ...
• 26.4k
10k views

### Applicability of chi-square test if many cells have frequencies less than 5

To find association between peer's support (independent variable) and work satisfaction (dependent variable) I wish to apply chi-square test. Peer's support is categories in four groups according to ...
• 621
11k views

### G-test vs Pearson's $\chi^2$ test

I'm testing independence in an $N \times M$ contingency table. I don't know whether the G-test or Pearson's $\chi^2$ test is better. The sample size is in the hundreds but there are some low cell ...
• 121
2k views

### Does Simpson's Paradox cover all instances of reversal from a hidden variable?

The following is a question about the many visualizations offered as 'proof by picture' of the existence of Simpson's paradox, and possibly a question about terminology. Simpson's Paradox is a fairly ...
• 1,987
7k views

### Statistical test for n x m contingency tables

I have a dataset made up of elements from three groups, let's call them G1, G2, and G3. I analysed certain characteristics of these elements and divided them into 3 types of "behaviour" T1, ...
• 4,601
16k views

### Chi-Square-Test: Why is the chi-squared test a one-tailed test? [duplicate]

In my Masters thesis I conducted an experiment in that subjects should decide between two alternatives. I had a control and a treatment group. The hypothesis was that in the treatment group more ...
• 73
17k views

### Alternatives for chi-squared test for independence for tables more than 2 x 2

What are some alternatives to the chi-squared test for categorical variables with tables larger than 2 x 2 and cells with a count less than 5, if I don't want to merge classes?
• 263
3k views

### Is the chi-squared test appropriate with many small counts in a 5x2 table?

I have two sample populations, A, and B, which are independent. ...
• 181
3k views

### How to visualize 3D contingency matrix?

I have a data like this: ...
5k views

### Contingency tables: what tests to do and when?

I'd like to see an extension of this discussion of the age-old chi-sq vs. Fisher's exact test debate, broadening the scope a bit. There are many many tests for interactions in a contingency table, ...
• 293
5k views

### Which test for cross table analysis: Boschloo or Barnard?

I am analyzing a 2x2 table from a small dataset of 30 patients. We are retrospectively trying to find some variables that give a hint about which treatment to choose. The variables (obs normal / ...
• 338
16k views

### Logistic regression vs chi-square in a 2x2 and Ix2 (single factor - binary response) contingency tables?

I'm trying to understand the use of logistic regression in 2x2 and Ix2 contingency tables. For instance, using this as an example What is the difference between using chi-square test and using ...
• 1,229
10k views

### Statistical test for positive and negative predictive value

I was reading through a paper and I saw a table with a comparison between PPV (Positive Predictive Value) and NPV (Negative Predictive Value). They did some kind of statistical test for them, this is ...
• 7,118
8k views

### Measure of association for 2x3 contingency table

I have a 2x3 contingency table - the row variable is a factor, the column variable is an ordered factor (ordinal level). I'd like to apply either symmetrical or asymmetrical association technique. ...
• 2,211
5k views

### Chi-square test for equality of distributions: how many zeroes does it tolerate?

I am comparing two groups of mutants each of which can have only one out of 21 different phenotypes. I would like to see whether distribution of these outcomes is similar between two groups. I found ...
• 121
9k views

### Testing significance of overlap in R

I have got an answer for it from Spacedman. But I am not entirely satisfied with the answer as it does not give me any sort of value (p or z value). So I am re-framing my question and posting it again....
• 4,515
2k views

### How to analyze $2\times n$ contingency table?

I have a $2\times n$ contingency table. I want to assess whether the rows are independent from the columns or not. If not, I want to know which columns are not independent and which are. What tests ...
• 4,420
369 views

### Chi-squared test and logistic regression

Is there a relation between chi-squared test and logistic regression model in a similar manner between ANOVA and linear regression?
• 488
32k views

### How should you handle cell values equal to zero in a contingency table?

How should you deal with a cell value in a contingency table that is equal to zero in statistical calculations? (Note that such a value can be structural, i.e., it must be zero by definition, or ...
• 939
612 views

### Cramer's $\phi$ for three-way contingency tables

Can Cramer's $\phi$ be determined for three-way contingency tables? I know how to calculate the expected values, chi squared, and how Cramer's $\phi$ works with two-way contingency tables. However, ...
942 views

### How to simulate effectiveness of treatment in R?

Let's say I want to write a simulation for the table below to decide if Xylitol treatment and ear infections are independent. How would I go about doing this?
• 93
8k views

### Computing the power of Fisher's exact test in R

Suppose that I have the following 3 x 3 contingency table: ...
• 63
16k views

### One-sided Fisher's exact test and its complement

If a one-sided Fisher's exact test testing the null hypothesis that A is not superior to B has a p-value of 0.98, is it true that the Fisher's exact test p-value for the null hypothesis that B is not ...
• 5,811
4k views

### Cross tabulation of two categorical variables: recommended techniques

I'm aware that this one is far from yes or no question, but I'd like to know which techniques do you prefer in categorical data analysis - i.e. cross tabulation with two categorical variables. I've ...
• 2,211
25k views

### Why are the degrees of freedom for a chi-square test on a 2x2 contingency table always 1?

I know the "formula" is (# rows - 1) * (# columns -1). However, shouldn't the design of the experiment or observational study being conducted make a difference? The only experimental design I can ...
• 135
12k views

### Chi-square test or Fisher's Exact test

Fisher's exact test is applied when sample size is small. In this link it is said that If any expected counts are less than 5, then some other test should be used (e.g., Fisher exact test for 2x2 ...
• 771
343 views

### Which observed frequency in a 2x2 contingency table is responsible for rejection of H0?

I'm carrying out a study on reported deaths of vultures (Gyps fulvus) in the Apennine mountains, Italy. I've performed a chi-square test on a 2x2 contingency table relating gender (male, female) to ...
• 51
1k views

### Proper analyses for 2x2 contingency tables

So I have multiple questions about the different types of analyses that can be used on a 2x2 contingency table and when different analyses should be used. To open, I'll note that this stems from my ...
946 views

### AB Testing other factors besides conversion rate

So I've been learning about AB Testing and have used it to examine the form conversion rate of two different forms. However, I'm curious about testing whether a form with ads will generate more ...
• 2,645
9k views

### Is the Chi-Square Test of Independence the best option for 3x2 contingency table?

I have some data which in the terms of a 3x2 contingency table look in the following way. ...
• 43
25k views

### Fisher's exact test in 3x2 contingency table

I have two groups of patients (A and B) with a congenital malformation which might present itself in 3 forms (a or b or c). Sample sizes are small as you can see, so I think the best test to check ...
• 101
1k views

### "Partition" of Chi-Square Table

How to tell if a specific cell from my 2x2 (also 2x2x2) contingency table (constructed for computing Chi-Square test of independence) is in favor or against the null hypothesis?
2k views

### Why use chi-square (or other) statistic over regression modeling for 2x2 contingency tables?

I have a question regarding the use of logistic/log-linear regression vs. contingency test statistics, such as chi-square. Can someone explain to me why it would ever be preferable to use test ...
• 21
273 views

### Chi-squared test degrees of freedom and experiment design

In the chi-squared test of independence for a $r\times c$ contingency table, the degrees of freedom are set as $(r-1)(c-1)$, which can be seen as a goodness-of-fit test with $n - 1 - s$ degrees of ...
• 64
1 vote
1k views

### Can we compare the difference of two specific proportions in a 3x3 contingency table?

I have a 3x3 contingency table and would like to compare the the specific proportion's relationship. For example, can we test if the proportion of people who give response A in age group 1 is higher ...
• 11
10k views

### Relationship between the phi, Matthews and Pearson correlation coefficients

Are the phi and Matthews correlation coefficients the same concept? How are they related or equivalent to Pearson correlation coefficient for two binary variables? I assume the binary values are 0 and ...
• 19.5k
19k views

### Fisher Test in R

Suppose we have the following data set: Men Women Dieting 10 30 Non-dieting 5 60 If I run the Fisher exact test in ...
• 309
844 views

### What is contingent in a contingency table?

The Merriam-Webster dictionary defines a contingent event or situation as ...
• 24.4k
8k views

### What is the difference using a Fisher's Exact Test vs. a Logistic Regression for $2 \times 2$ tables?

For a $2 \times 2$ table, two ways to do inference on the table is through Fisher's Exact Test and also a Logistic Regression. I was told that using a Fisher's Exact Test, we are only interested in ...
• 4,626
7k views

### Fisher exact test on paired data

Given $40$ cases with lung cancer and $40$ matched controls (without lung cancer) (matching based on age, sex, etc.). To try to find evidence between the effect of smoking on lung cancer, I used ...
• 213
3k views

### How do I perform a follow up on a chi-squared table 3x3 or larger?

On a 3x2, like in this example, I could perform an additional follow up chi-squared to test differences between only two groups I'm interested in (e.g. between vaccinated a year before and just before ...
• 81
3k views

### Testing equality of two binomial proportions proportion (one near 100 %)

I am testing equality of two binomial proportions 87/88 and 48/60. I use this online calculator and it noted that the Standard Normal approximation is not valid in this case. It seem quite strange to ...
• 157