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
0 votes
1 answer
23 views

Statistical test for 3x2 contingency table, with cases:controls matched 1:5 (i.e. non-independent)

I am examining a cohort of cases against controls, matched at a 1:5 ratio (on sex, birth year, and residency/postal code at time of diagnosis). Education level Cases (n=206) Controls (n=957) p-value ...
Gus Hell's user avatar
0 votes
0 answers
7 views

Two-sample statistical significance test taking into account group membership (proportions) and numeric comparison

Say I have two samples of observations, S1 and S2, which can be of unequal sizes. For each observation, I have two variables: G (a categorical group assignment, say it is binary with values A/B), and ...
Sam A.'s user avatar
  • 161
0 votes
0 answers
40 views

Chi-squared test with more than two variables, or should I run a different test?

I am looking at whether certain animals or categories of animals are more likely to use human-made trails than natural trails. We used camera traps and recorded for every case which animal it was, ...
Manon Obdeijn's user avatar
8 votes
2 answers
425 views

Infinite upper confidence interval using Fisher exact test in R

I am having trouble interpreting the upper confidence interval for the odds ratio (OR) after executing Fisher's exact test in R. I have the following contingency table which contains the response ...
Samuel Leal's user avatar
2 votes
1 answer
65 views

Standardised residuals in contingency tables and statistically significant result

I have the following contingency table that results in statistically significant result of Pearson's $\chi^2$ Test for Count Data. I've computed Pearson residuals that should have the same properties ...
Lstat's user avatar
  • 135
0 votes
0 answers
8 views

Enrichment of positive cases within paired data

I have analyzed 47 cancer samples from tissue and blood. in the tissue 40 are positive for a virus and in the blood 8 are positive for the virus Importantly, these 8 are the same patients that are ...
user2300940's user avatar
2 votes
1 answer
71 views

Compare two contingency tables with the same structure

I want to compare two contingency tables A and B with the same structure (same columns and rows). My first idea was to use chi squared distance $\sum_{i=1}^{p}{\frac{(O_i-E_i)^2}{E_i}}$. But, some ...
Mohamed Gueye's user avatar
2 votes
2 answers
63 views

Comparing two association matrices (contingency tables)

I am looking for a significance test to compare between two association matrices (contingency tables) - preferably to test whether the odds ratio is the same. I have looked at some questions here but ...
anna6931's user avatar
  • 101
2 votes
2 answers
52 views

Bayesian inference based on a 3$\times$3 contingency table

How do I make inferences about population parameters based on a 3$\times$3 table of observations? In "Bernoulli's Fallacy", Aubrey Clayton provides this (Table 5.8). Democrat Republican ...
Mkanders's user avatar
  • 326
0 votes
0 answers
22 views

How can I update a contingency table based on evidence?

I have a series of contingency tables that are my population benchmarks and survey data. Practically speaking, we know the population benchmarks are largely, but not entirely, accurate; there are some ...
stat_is_quo's user avatar
1 vote
1 answer
50 views

How to calculate the p-value of a log-odds ratio, given that the variance depends on the observed frequencies?

I am a bit confused about how people calculate p-value when calculating odds-ratios. The log-odds ratio (LOR) for a contingency table with two entries is $L = \log \frac{p_{1}}{p_{0}}$ and has an ...
Abelaer's user avatar
  • 130
0 votes
0 answers
15 views

Anova with response dependent on other variables that arent the predictor

I am running into difficulty determining the best way to analyze my data. So, as backgroud I have a dataset containing the variables MONTH, REGION, COUNT, and YEARS. MONTH, REGION, and YEAR and all ...
jjohn102's user avatar
1 vote
1 answer
82 views

Test to compare multiple contingency tables

I have three contingency tables with the variables month and region that contain the frequency of the sighting of a particular bird. Additionally, the tables differ only by counting frequencies from ...
jjohn102's user avatar
0 votes
1 answer
94 views

Does Cochrane-Armitage test require an obvious trend in contingency table?

I'm trying to determine whether it's appropriate to use the Cochrane-Armitage trend test on this set of data? I don't have any specific hypotheses I need to investigate, just to choose an appropriate ...
Manny Ma's user avatar
1 vote
0 answers
53 views

Inference for Contingency tables [closed]

Assume two paired binary vectors, $v^A,v^B$. We can easily construct a contingency table looking like: $v^A_i=1$ $v^A_i=0$ Totals $v^B_i=1$ $a$ $b$ $a+b$ $v^B_i=0$ $c$ $d$ $c+d$ Totals $a+c$ $b+d$ ...
Spätzle's user avatar
  • 3,028
0 votes
1 answer
85 views

margins=True option in pd.crosstab influences the outcome of chi2_contingency test. Why?

I understand what the margins=True option in pd.crosstab does, but I don't understand why it would influence the outcome of the chi2_contingency. Here an example: ...
Chiara's user avatar
  • 23
0 votes
0 answers
40 views

Relative Risk and Odd ratio for N x N x N table

I am trying to calculate RR for case where I have N x N x N table. First N is City (20 cities) second N is Age group (5 groups) and third one is Industry (4 ...
guest-x1's user avatar
3 votes
1 answer
49 views

I have an issue summarising highly skewed data in a table

I have a numerical ordinal dataset (eg. 1-10) that's very highly skewed, with >90% of the values at 10. How can I best summarise this in a table? The median/IQR gives '10 (10, 10)' (which doesn't ...
Harry's user avatar
  • 31
0 votes
0 answers
25 views

Are marginal probabilities a mixture model of the conditional probabilities?

In a contingency table, is it correct to say that the marginal probabilities are a mixture model of the conditional probabilities? Also, is it correct to say that these marginal and conditinal ...
john987's user avatar
  • 11
2 votes
0 answers
240 views

The asymptotic distribution of a Pearson Chi-Square test statistic (test for independence)

There are many different Pearson Chi-Square tests. The test statistics are always a sum of scaled and squared deviations. Some are written as a single sum, and some are written as a double sum (the ...
Taylor's user avatar
  • 19.8k
2 votes
1 answer
91 views

Making sense of a reviewer's "30 observed counts minimum per cell" requirement on a contingency table

I'm perplexed by the comment of a reviewer, who has taken issue with the sample size from a study I conducted. He says, relatively to the 2X2 contingency table below and a (significant) 2-sample test ...
J-J-J's user avatar
  • 2,386
1 vote
1 answer
79 views

What will happen to my results if I use Fisher's exact test with unfixed marginal totals?

I've been trying to get my head around the controversy that surrounds Fisher's exact test. I often use the test in the something like the following way: A survey asks respondents two questions: "...
David Lovell's user avatar
3 votes
0 answers
158 views

Alternatives to logistic regression if there are zero counts

I have three variables (let's call them $A$, class (both binary) and age (numerical)), and I want to test if there is a difference in the presence of A between the two classes, with age as a potential ...
user36196's user avatar
  • 368
0 votes
0 answers
26 views

Statistical test for odds ratio when 1. N is large and not meaningful; 2. replicates are present

I'm investigating the co-occurrence of 2 types of events (var1 and var2). The hypothesis is that ...
Jerry Fan's user avatar
0 votes
0 answers
18 views

Replicated experiment with categorical response and predictor

A set of experiments is performed under n conditions, with each experiment resulting in a series of events classified in k categories (k<10). Each condition is independently repeated m times. ...
alephreish's user avatar
0 votes
0 answers
30 views

No theoretical frequency should be less than 5 [duplicate]

Why does the theoretical frequency in chi-square distribution should not be less than 5? What's the concept behind pooling the preceding and succeeding frequency to make pooled frequency more than 5?
Aman's user avatar
  • 1
0 votes
1 answer
51 views

Calculate correlation of nominal and ordinal variables and hypothesis test in r

I would like to statistically analyze three variables. One variable is "consortium mostly academic" (nominal, dichotomous), the second variable is "evaluation method" (nominal, non-...
user avatar
0 votes
0 answers
33 views

How to apply Bayes' theorem on a contingency in which the sampled distribution differs drastically from the entire population?

Summary: How can I calculate my probability of being truly positive based on a contingency table that has a completely different distribution than the total population? I was recently confronted with ...
jotheta's user avatar
1 vote
1 answer
193 views

Chi-square test for two vectors with very identical values

I have two vectors with two levels: vector 1:...
HAOYANG MI's user avatar
1 vote
1 answer
97 views

Contingency analysis of a 3x3 table via Chi2, log-linear and Poisson GLM - how to interpret this result?

I have a dataset describing age of wine in 3 classes of quality. ...
CroissSant's user avatar
0 votes
1 answer
100 views

Chi-squared test for equality of proportions

This question is question 12 from Problems 10.3 from Rohatgi's An Introduction to Probability and Statistics. Of 25 income tax returns audited in a small town, 10 were from low and middle income ...
Balkys's user avatar
  • 113
0 votes
0 answers
187 views

Non-numeric argument to binary operator

I'm trying to find out a model that adequately describes effects of gender and length on food choice. For gender; 0=Male and 1=Female, length; 0=Subadult 1=Adult, Choice; F=Fish I=Invertebrates and O=...
Booba's user avatar
  • 3
0 votes
1 answer
98 views

Covariance of cells in random contingency tables

Say we have $n=3$ bins and $m=3$ different coloured balls (30 red 20 green and 50 blue) in an urn. We draw randomly without replacement a ball from from the urn and place it into the bins. The first ...
Sextus Empiricus's user avatar
0 votes
0 answers
22 views

To analyze some percentage structure, is Breslow-Day any different than Chi2 for contengency table?

I was asked to compare three groups for their percentage structure. Let me explain - there is a categorical variable X with 3 levels: <100, 100-200, > 200 units. That's all I have and I have no ...
Bluemannnnn100's user avatar
0 votes
0 answers
90 views

Should a contingency table be "symmetric"?

Im am running a fishers exact test on some data but im unsure of how the input contingency table should be formatted. Option 1 ...
craszer's user avatar
1 vote
0 answers
30 views

Perform goodness-of-fit test on multiple contingency tables

I want to test my theory against a set of scenes. Specifically, I have 10 2x2 contingency table with observation and expected frequencies. Since there is only one model rather than 10 different models,...
David Jones's user avatar
1 vote
0 answers
36 views

Caveats in analyzing 2x2 contingency tables

after reading this paper https://onlinelibrary.wiley.com/doi/10.1111/1440-1681.12052 I have real troubles deciding which test is most suitable for my analysis. The data is following: a group of ...
YSN's user avatar
  • 111
0 votes
0 answers
34 views

Collapsibility Conditions for Multiway Tables

Why is the WX conditional association the same as the WX marginal association in log linear model (WX, XYZ) (four-way table) and not in the log linear model (WX, WZ, XY, YZ)? I saw on the internet to ...
Booba's user avatar
  • 3
1 vote
0 answers
58 views

Testing Relationships surrounding Social Media Engagement

I'm sure I have a very easy question I'm trying to answer, but as a qualitative researcher who has found themselves trying to help an undergraduate on a quantitative project, I need some help. I'm ...
Garret's user avatar
  • 11
2 votes
1 answer
464 views

Chi-Square Test for multiple-response variables?

I have two categorical variables but one of them has multiple responses. After searching online, I came to find the Rao-Scott Chi-Square Test for such data, but little was found about some useful R or ...
Sue's user avatar
  • 21
0 votes
1 answer
11 views

Different sub-population sizes in grading data

I am relatively new to statistical analysis. Let's say I have a data set of 5000 report card grades 3000 (60%) are "A" grades 100 (2%) are "D" grades and 25 (0.5%) are "F&...
user369340's user avatar
0 votes
0 answers
26 views

Does Fisher exact test impose restriction on sampling design? [duplicate]

It is known that Fisher exact test assumes that all 4 margins of 2 by 2 table are fixed. $\chi^2$ test does not impose restriction on sampling design beforehand in general where I mean $\chi^2\sim\sum ...
user45765's user avatar
  • 1,365
1 vote
1 answer
109 views

How to generate data or sample data from a summary tables?

I have a dataset like this: I only have summary tables of the "loneliness score" for overall, for each sex, each age group, and sex * age interactions. Besides this, I have 23 items that ...
ReiMon's user avatar
  • 21
1 vote
1 answer
45 views

Determine if a categorical variable occurs at a frequency greater than chance with a boolean outcome

I am looking for the proper statistic to answer whether which categorical items (from a long list) occur at frequency greater than chance with each state of a boolean variable. More specifically, I ...
E. Camus's user avatar
1 vote
1 answer
369 views

Pairwise test of 2x3 contingency table in R

...
W Hampton's user avatar
0 votes
1 answer
171 views

What is the $\chi^2$ contingency test really showing?

I have a friend who used this function to compute a chi-squared contingency table in a paper they are writing, and I don't think I fully understand what the results of this test are. Function ...
Ryan Folks's user avatar
0 votes
0 answers
18 views

How to infer unknown cell frequencies (effect of a variable) if table marginals are known and cell frequencies for another population is known?

I want to infer cell frequencies (or conditional probabilities) for a population table where: I know the marginal totals but not the cell frequencies, and I know the cell frequencies for a table of a ...
stat_is_quo's user avatar
0 votes
1 answer
30 views

Quantifying Dependency in Chi Squared Test

I am running a Chi Squared test on nominal values and this is the contingency table. ...
Thiloshon Nagarajah's user avatar
0 votes
1 answer
71 views

Correlation betwen lines and columns in a non-mutually exclusive contingency table

I am interested in testing whether there is a correlation between a line and one or several rows in a contingency table. Let's imagine this dummy dataset: In rows, I have the types of meal that you ...
Potichien's user avatar
2 votes
1 answer
149 views

Iterative proportional fitting with constraints

I am trying to determine if it is possible to conduct iterative proportional fitting with some constraints. To give a dummy example of my goal: Say I had data for two towns, A and B, on the ice cream ...
sofiaaj's user avatar
  • 45

1
2 3 4 5
12