Skip to content

FAQ/SUMM: sampling spaces for rates and proportions #2936

Open

Description

@josef-pkt

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

< list needs to be filled >

Activity

  1. added this to the 0.10 milestone on Oct 4, 2017
  2. josef-pkt commented on Mar 21, 2025

    @josef-pkt
    MemberAuthor

    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.

    • row nobs fixed
    • column nobs fixed
    • total nobs fixed

    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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions