Skip to main content

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.

Filter by
Sorted by
Tagged with
96 votes
2 answers
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'...
pmgjones's user avatar
  • 5,811
70 votes
2 answers
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 ...
hgcrpd's user avatar
  • 1,427
33 votes
5 answers
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, ...
rnso's user avatar
  • 10.1k
7 votes
2 answers
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'...
wehnsdaefflae's user avatar
9 votes
2 answers
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 ...
erdal's user avatar
  • 231
9 votes
2 answers
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 ...
user32378's user avatar
35 votes
5 answers
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 ...
pmgjones's user avatar
  • 5,811
21 votes
1 answer
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 ...
Antoni Parellada's user avatar
17 votes
2 answers
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 ...
Braj-Stat's user avatar
  • 621
12 votes
3 answers
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 ...
oodkan's user avatar
  • 121
9 votes
2 answers
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 ...
Mitch's user avatar
  • 1,987
13 votes
2 answers
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, ...
nico's user avatar
  • 4,601
5 votes
3 answers
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 ...
StepMuc's user avatar
  • 73
15 votes
2 answers
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?
Israel's user avatar
  • 263
8 votes
2 answers
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. ...
jvc26's user avatar
  • 181
18 votes
2 answers
3k views

How to visualize 3D contingency matrix?

I have a data like this: ...
user avatar
18 votes
2 answers
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, ...
JVMcDonnell's user avatar
17 votes
1 answer
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 / ...
Taz's user avatar
  • 338
12 votes
1 answer
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 ...
L Xandor's user avatar
  • 1,229
12 votes
2 answers
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 ...
Simone's user avatar
  • 7,118
6 votes
4 answers
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. ...
aL3xa's user avatar
  • 2,211
10 votes
2 answers
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 ...
Membran's user avatar
  • 121
5 votes
5 answers
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....
Angelo's user avatar
  • 4,515
4 votes
1 answer
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 ...
a06e's user avatar
  • 4,420
4 votes
1 answer
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?
Macond's user avatar
  • 488
13 votes
3 answers
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 ...
DrWho's user avatar
  • 939
9 votes
2 answers
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, ...
wehnsdaefflae's user avatar
7 votes
2 answers
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?
Gerk's user avatar
  • 93
6 votes
1 answer
8k views

Computing the power of Fisher's exact test in R

Suppose that I have the following 3 x 3 contingency table: ...
Matthias's user avatar
5 votes
2 answers
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 ...
pmgjones's user avatar
  • 5,811
5 votes
4 answers
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 ...
aL3xa's user avatar
  • 2,211
5 votes
4 answers
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 ...
user221943's user avatar
5 votes
1 answer
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 ...
user81411's user avatar
  • 771
5 votes
1 answer
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 ...
Mario's user avatar
  • 51
5 votes
1 answer
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 ...
Patrick Rich's user avatar
5 votes
2 answers
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 ...
ATMathew's user avatar
  • 2,645
4 votes
1 answer
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. ...
petro.y's user avatar
  • 43
4 votes
2 answers
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 ...
Gabriele's user avatar
  • 101
3 votes
1 answer
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?
Shiv Baishya's user avatar
2 votes
1 answer
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 ...
curious's user avatar
  • 21
2 votes
1 answer
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 ...
udscbt's user avatar
  • 64
1 vote
1 answer
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 ...
Simone's user avatar
  • 11
18 votes
3 answers
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 ...
Tim's user avatar
  • 19.5k
15 votes
1 answer
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 ...
snape's user avatar
  • 309
15 votes
1 answer
844 views

What is contingent in a contingency table?

The Merriam-Webster dictionary defines a contingent event or situation as ...
Zen's user avatar
  • 24.4k
10 votes
1 answer
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 ...
user321627's user avatar
  • 4,626
10 votes
4 answers
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 ...
Gert's user avatar
  • 213
8 votes
0 answers
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 ...
Borna's user avatar
  • 81
8 votes
2 answers
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 ...
mcihak's user avatar
  • 157
8 votes
1 answer
758 views

How to express cells of a 2x2 table in terms of phi coefficient and marginal probabilities

Consider a typical 2x2 table of frequencies (shown in this image): Notation: The row variable is denoted R and takes on values 0 or 1; the column variable is denoted C and takes on values 0 or 1. The ...
John K. Kruschke's user avatar