It’s a table that classifies data into four categories. Use a 2×2 calculator with chi-square or Fisher’s test to analyze association between two factors.
What is a Contingency Table?
A contingency table (sometimes called a cross-tabulation) is a simple way to summarize data when you have two or more categorical variables. It shows how subjects are distributed across categories.
For example, in medical research you might compare smokers vs non-smokers against disease vs no disease. When both factors have two levels each, you get a 2×2 contingency table.
What is a 2×2 Contingency Table?
A 2×2 contingency table is the most common form of contingency tables. It separates subjects into four groups based on two categorical factors.
Example:
Disease (Yes) | Disease (No) | Total | |
---|---|---|---|
Smokers | a | b | a+b |
Non-Smokers | c | d | c+d |
Total | a+c | b+d | n |
Here:
- Each cell contains a count (not percentages).
- You can test whether smoking and disease are statistically associated.
What is a 2×2 Calculator?
A 2×2 calculator is a simple tool where you enter the four counts from your contingency table. It then runs statistical tests like the chi-square contingency table test or Fisher’s exact test to see if there’s a significant association between the two variables.
This saves time because you don’t have to calculate expected values or p-values by hand.
Contingency Table Chi-Square Test
The contingency table chi-square test (also called the chi-square test of independence) is the most widely used method for 2×2 contingency tables.
- Null Hypothesis (H0): The two categorical variables are independent.
- Alternative Hypothesis (H1): The variables are associated.
The chi-square statistic is calculated as: χ2=∑(O−E)2E\chi^2 = \sum \frac{(O – E)^2}{E}χ2=∑E(O−E)2
Where:
- OOO = observed counts
- EEE = expected counts
If the p-value < 0.05, you reject the null hypothesis and conclude there is an association.
When to Use Fisher’s Exact Test in a 2×2 Table?
For small sample sizes, the chi-square test may not be reliable. In such cases, the Fisher’s exact test is preferred for 2×2 contingency tables.
It calculates the exact probability of getting the observed data, making it accurate for small datasets.
Assumptions of 2×2 Contingency Tables
When analyzing 2×2 contingency tables, keep in mind:
- Observations must be independent.
- Data must be counts, not percentages or averages.
- Expected frequencies should not be too small (if they are, use Fisher’s exact test).
Example of a 2×2 Contingency Table Analysis
Suppose we want to check if smoking is linked to lung cancer.
Lung Cancer (Yes) | Lung Cancer (No) | Total | |
---|---|---|---|
Smokers | 50 | 30 | 80 |
Non-Smokers | 20 | 100 | 120 |
Total | 70 | 130 | 200 |
Steps:
- Enter data into a 2×2 calculator.
- Run the contingency table chi-square test.
- Interpret p-value: If <0.05, conclude smoking and lung cancer are associated.
Contingency Table vs 2×2 Table
- A contingency table can be any size (e.g., 3×3, 4×2).
- A 2×2 table is just a special case with two categories in each variable.
So while 2×2 contingency tables are most common in medicine, epidemiology, and social sciences, larger tables are also used in research.
What is a 2×2 table in statistics?
A 2×2 table is a simple contingency table that categorizes subjects into four groups based on two factors with two levels each.
How do you analyze a 2×2 contingency table?
You analyze it using a chi-square test (for large samples) or Fisher’s exact test (for small samples).
What is a contingency table chi-square test?
It is a statistical test that checks if two categorical variables in a contingency table are independent or associated.
What is a 2×2 calculator?
It is a tool where you enter observed counts from a 2×2 contingency table to quickly calculate p-values.