Skip to main content
22 votes
Accepted

Palantir's Asian discrimination case: how were the probabilities computed?

I am going to reverse-engineer this from experience with discrimination cases. I can definitely establish where the values of "one in 741," etc, came from. However, so much information was lost in ...
whuber's user avatar
  • 326k
19 votes

Infinite upper confidence interval using Fisher exact test in R

There's a one-sided confidence interval because you asked for a one-sided test
Thomas Lumley's user avatar
13 votes

Analysis of Danish mask study data by Nassim Nicholas Taleb (binomial GLM with complete separation)

Your 2-sided test implicitly allots exactly half of your 5% significance level to "masks are harmful" ($M_-$) and the other half to "masks are beneficial" ($M_+$). To a Bayesian ...
fblundun's user avatar
  • 3,959
11 votes

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

They are asymptotically the same. They are just different ways of getting at the same idea. More specifically, Pearson's $\chi^2$ test is a score test, whereas the $G$-test is a likelihood ratio ...
gung - Reinstate Monica's user avatar
10 votes
Accepted

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

The paradox is that there exist 2x2x2 contingency tables (Agresti, Categorical Data Analysis) where the marginal association has a different direction from each conditional association [...] Am I ...
Carlos Cinelli's user avatar
7 votes
Accepted

Fisher's exact test - help understanding the p-value

The table tells you a great deal. Let's begin with the first rule of data analysis: draw a picture. ...
whuber's user avatar
  • 326k
7 votes

How to determine significant associations in a mosaic plot?

The formula for the standardized residuals is: $$\begin{align}\text{Pearson's residuals}\,&=\,\frac{\text{Observed - Expected}}{ \sqrt{\text{Expected}}}\\ d_{ij}&=\frac{n_{ij}-m_{ij}}{\sqrt{...
Antoni Parellada's user avatar
6 votes
Accepted

Fisher's exact test vs kappa analysis

I know I answer the question two years later, but I hope some future readers may find the answer helpful. Cohen's $\kappa$ tests if there are more chance that a datum falls in the diagonal of a ...
POC's user avatar
  • 668
6 votes
Accepted

How to derive 2x2 cell counts from contingency table margins and the odds ratio

Write $\rho$ for the odds ratio, $\beta=\Pr(E)$, $\gamma=\Pr(O)$. Four independent equations are $$\cases{a+b=\beta \\ a+c=\gamma \\ a+b+c+d=1 \\ ad = \rho bc.}$$ Adding the first two shows $$b+c ...
whuber's user avatar
  • 326k
6 votes
Accepted

2x2 Fisher Exact Test Contingency Tables

The Fisher's Exact Test is a test of the odds ratio. If the contingency table has values enumerated by: $$\begin{array}{c|cc} & Y & \bar{Y} \\ \hline X & a & b \\ \bar{X} & c &...
AdamO's user avatar
  • 63.2k
6 votes
Accepted

In statistics, is there a formal name to the two variables of a two-dimensional contingency table?

The names row variable and column variable work fine for me, if indeed names are needed at all. It is perhaps more common, and typically more helpful, to refer to the names of the variables (gender, ...
Nick Cox's user avatar
  • 57.6k
6 votes
Accepted

Alternative to Bonferroni Correction when performing multiple one-vs-rest association tests

First, there is no reason to use the original Bonferroni Correction any more. As the Wikipedia page notes, the Holm modification to the that method is uniformly more powerful while maintaining the ...
EdM's user avatar
  • 93.8k
6 votes

What statistics can be used to analyze and understand measured outcomes of choices in binary trees?

Thanks to Jake Westfall for alerting me of this question. It does indeed sound like something that could be modelled with a multinomial processing tree (MPT) models. The experiment in your figure ...
Henrik's user avatar
  • 14.2k
6 votes

Infinite upper confidence interval using Fisher exact test in R

Alternatively, I have created a bootstrap distribution for the odds ratio to get the confidence intervals (using the infer package in R), but I am not sure this is a valid approach. Bootstrapping is ...
Sextus Empiricus's user avatar
5 votes

Which is the best visualization for contingency tables?

One idea that is sometimes useful, especially for somewhat large tables, is to reorder rows/columns to make any structure clearer. One way to do the reordering is to use the sort order of the ...
kjetil b halvorsen's user avatar
5 votes

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

Thomas Wickens, in his excellent book Multiway Contingency Table Analysis for the Social Sciences, offers a different suggestion from the ones already proposed. He distinguishes between random zeros, "...
user78229's user avatar
  • 10.8k
5 votes
Accepted

Is it inappropriate to use Fisher's exact test when cell counts are high?

Strictly speaking, Fisher's exact test computes the proportion of possible contingency tables (number of combinations of cell counts) conditional on the marginals that is as extreme or more extreme ...
gung - Reinstate Monica's user avatar
5 votes

Palantir's Asian discrimination case: how were the probabilities computed?

How to calculate pvals properly using the hypergeometric distribution: Drawing $k$ successes in $n$ trials without replacement from a set with $K$ successes amid $N$ total items will follow the ...
Matthew Gunn's user avatar
  • 22.5k
5 votes
Accepted

Does Fisher's Exact test for a $2\times 2$ table use the Non-central Hypergeometric or the Hypergeometric distribution?

This is what the R help says. For 2 by 2 tables, the null of conditional independence is equivalent to the hypothesis that the odds ratio equals one. ‘Exact’ inference can be based on observing that ...
Glen_b's user avatar
  • 284k
5 votes
Accepted

Bootstrap resampling for contingency table

There are at least three ways how this can be achieved. (1) Contingency table stores counts of occurrences of the events. What you need to do is to de-aggregate the table into the individual ...
Tim's user avatar
  • 139k
5 votes
Accepted

Two-sided vs One-sided p-value: is there a special case with Fisher's Exact test?

In general it's not symmetric, that's correct. I assume the 2x2 case is specifically intended here (beyond that the notion of tails is problematic). The distribution of the count in (say) the top ...
Glen_b's user avatar
  • 284k
5 votes

Analysis 2x2x2 contingency table

The logistic regression and MH analysis should come up with the same conclusion, here is the logistic regression on top (with B as dependent, A, C, and AC interaction as independent) and Mantel-...
Penguin_Knight's user avatar
5 votes

Analysis of Danish mask study data by Nassim Nicholas Taleb (binomial GLM with complete separation)

This simulation is an attempt to estimate the result of an exact test in which the chance of observing such an extreme disparity is $$\begin{aligned} \Pr(\text{all positive results in one group}) &...
whuber's user avatar
  • 326k
5 votes

I have an issue summarising highly skewed data in a table

Since the variable in question is discrete and with a limited range, I suggest considering a frequency table instead of focusing on single summaries. That is, attach to every value from 1 to 10, the ...
utobi's user avatar
  • 11.8k
5 votes
Accepted

Performing a Fisher test when the odds of the events not occurring are known to be very low when compared to the events occurring

Fisher's exact test makes no assumptions about the relative frequency of present vs absent, so having the high absence proportion does not contradict the assumptions of the test and therefore no ...
Gordon Smyth's user avatar
  • 13.1k
4 votes

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

This is a much more complicated question that it might first seem, and there was a bitter disagreement between Fisher and Pearson on this question. With modern computing it is easy to demonstrate by ...
Thomas Lumley's user avatar
4 votes
Accepted

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

As far as I know, degrees of freedom in Chi Square distribution are related to the number of classes a population can be classified minus the linear restrictions used to estimate the parameters. ...
Camila Burne's user avatar
4 votes

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

At the left is your table and at the right is a generic $2\times 2$ table showing the counts $a$ through $d$, marginal subtotals, and total $n=a+b+c+d$. $$\begin{array}{r|rr|r} &\text{male} & ...
whuber's user avatar
  • 326k
4 votes
Accepted

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

We easily recognize every factor in the denominator of $\phi$, because $a+b=1-\mu_R$ and $a+c=1-\mu_C$. Let's therefore start with a tiny simplification to avoid writing lots of square roots: $$\...
whuber's user avatar
  • 326k

Only top scored, non community-wiki answers of a minimum length are eligible