Expand description
Effect sizes for contingency tables (SciPy’s odds_ratio, relative_risk and
contingency.association), with confidence intervals.
See the book entry Multivariate distributions and further tests.
Structs§
- Odds
Ratio Result - The result of
odds_ratio. - Relative
Risk Result - The result of
relative_risk.
Enums§
- Association
Method - A measure of association for an
r × ctable (SciPy’sassociation’smethod). - Odds
Ratio Kind - Which odds ratio
odds_ratioestimates (SciPy’skind).
Functions§
- association
- The strength of association between the two variables of a contingency table (SciPy’s
contingency.association), fromφ² = χ²/Nwithout continuity correction: 0 for independence, 1 (for Cramér’s V and Tschuprow’s T on square tables) for perfect association. - odds_
ratio - The odds ratio of a 2 × 2 table
[[a, b], [c, d]](SciPy’sodds_ratio). The conditional estimate solvesE_ω[X] = afor the odds ratioωof Fisher’s noncentral hypergeometric distribution ofX = table[0][0]given all margins; its confidence limits invert that distribution’s tails (the exact interval that matches Fisher’s exact test). The sample odds ratio isad/(bc), with Woolf’s intervalexp(log OR ± z √(1/a + 1/b + 1/c + 1/d)). - relative_
risk - The relative risk
(a/n₁)/(c/n₂)ofacases amongn₁exposed andcamongn₂controls (SciPy’srelative_risk).