You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FAQ/SUMM: sampling spaces for rates and proportions #2936
Hypothesis tests and confidence intervals are derived under some assumption on the sampling distribution, or on the conditional sampling distribution in the case of conditional tests.
In the case of asymptotic distribution of a test statistic, the sampling distribution enters in the assumed form of the variance. see for example #2689
In the case of exact hypothesis test and confidence interval, we explicitly use the corresponding sampling distribution.
This is an attempt to provide an overview from this perspective (see e.g. 2nd part of comment #2607 (comment) )
contingency tables is mixing up or combining sampling distributions depending on the use case and hypothesis test
binomial
- k-sample (k >0) test for a binary random variable, i.e. a single proportion
e.g. contingency table 2xK with independent sampling in second dimensions
- GLM binomial
- most of what is in statsmodels.stats.proportion
multinomial
- proportions for more than 2 category levels, total number of observations fixed
e.g. histogram counts
e.g. contingency tables conditional on total sample size
- new code in statsmodels.stats._multinomial
- conditional Poisson
poisson
- no fixed number of observations
hypergeometric
- contingency table with row and column totals fixed
- nothing in statsmodels ?
- Fisher's exact in scipy.stats
Activity
josef-pkt commentedon Mar 21, 2025
I thought I had an issue for which sampling structure underlies a contingency table. I don't find it, it's likely in comments in related topic issue.
I just found this book
Fagerland, Morten, Stian Lydersen, and Petter Laake. 2017. Statistical Analysis of Contingency Tables. New York: Chapman and Hall/CRC. https://doi.org/10.1201/9781315374116.
section 7.3 has a discussion on sampling distribution in r x c tables.
with corresponding sampling structure, e.g. r treatments and c outcomes
they don't include no nobs fixed
A standard case for square tables is two paired categorical (nominal/ordinal) observations.
context: looking at symmetry test in square tables #9485