{
  "name": "Contingency Table Test Implementations Across Statistical Software",
  "description": "Comparison of exact and asymptotic contingency table statistical functions, mathematical distributions, small-sample handling, and dimensional constraints across Microsoft Excel, R, and Python.",
  "page": "https://casrai.org/guides/fisher-test-excel",
  "publisher": "CASRAI",
  "license": "https://creativecommons.org/licenses/by/4.0/",
  "dateModified": "2026-11-17T00:03:59Z",
  "temporalCoverage": "2024/2026",
  "spatialCoverage": "Global",
  "columns": [
    {
      "name": "Software Platform",
      "unit": "",
      "description": "Statistical environment or spreadsheet application"
    },
    {
      "name": "Function or Syntax",
      "unit": "",
      "description": "Worksheet formula, command, or script syntax"
    },
    {
      "name": "Mathematical Distribution",
      "unit": "",
      "description": "Underlying probability distribution for test statistics"
    },
    {
      "name": "Test Classification",
      "unit": "",
      "description": "Exact conditional permutation test vs asymptotic approximation"
    },
    {
      "name": "Expected Counts Under 5",
      "unit": "",
      "description": "Validity when contingency cells have expected frequency below 5"
    },
    {
      "name": "Contingency Dimensions",
      "unit": "",
      "description": "Supported table formats (2x2 only vs arbitrary r x c)"
    }
  ],
  "rows": [
    {
      "Software Platform": "Microsoft Excel (Native HYPGEOM.DIST)",
      "Function or Syntax": "HYPGEOM.DIST(sample_s, number_sample, population_s, number_pop, cumulative)",
      "Mathematical Distribution": "Hypergeometric",
      "Test Classification": "Exact test via permutation summing",
      "Expected Counts Under 5": "Valid (exact probability mass)",
      "Contingency Dimensions": "2x2 tables only"
    },
    {
      "Software Platform": "Microsoft Excel (Native CHISQ.TEST)",
      "Function or Syntax": "CHISQ.TEST(actual_range, expected_range)",
      "Mathematical Distribution": "Chi-Square",
      "Test Classification": "Asymptotic approximation",
      "Expected Counts Under 5": "Invalid (requires expected counts >= 5)",
      "Contingency Dimensions": "Arbitrary r x c tables"
    },
    {
      "Software Platform": "Microsoft Excel (Python in Excel / SciPy)",
      "Function or Syntax": "scipy.stats.fisher_exact(table, alternative='two-sided')",
      "Mathematical Distribution": "Hypergeometric",
      "Test Classification": "Exact conditional test",
      "Expected Counts Under 5": "Valid (exact probability mass)",
      "Contingency Dimensions": "2x2 tables only"
    },
    {
      "Software Platform": "R Stats Package (stats::fisher.test)",
      "Function or Syntax": "fisher.test(x, y = NULL, workspace = 200000, hybrid = FALSE)",
      "Mathematical Distribution": "Hypergeometric",
      "Test Classification": "Exact conditional test",
      "Expected Counts Under 5": "Valid (exact probability mass)",
      "Contingency Dimensions": "2x2 and arbitrary r x c"
    },
    {
      "Software Platform": "SciPy Stats (scipy.stats.fisher_exact)",
      "Function or Syntax": "scipy.stats.fisher_exact(table, alternative='two-sided')",
      "Mathematical Distribution": "Hypergeometric",
      "Test Classification": "Exact conditional test",
      "Expected Counts Under 5": "Valid (exact probability mass)",
      "Contingency Dimensions": "2x2 tables only"
    },
    {
      "Software Platform": "Real Statistics Add-in for Excel",
      "Function or Syntax": "FISHERTEST(R1) or FISHER2x2(R1, tails)",
      "Mathematical Distribution": "Hypergeometric",
      "Test Classification": "Exact test via add-in function",
      "Expected Counts Under 5": "Valid (exact probability mass)",
      "Contingency Dimensions": "2x2 tables only"
    }
  ],
  "sources": [
    {
      "title": "Microsoft Support: HYPGEOM.DIST Function Reference",
      "url": "https://support.microsoft.com/en-us/excel/functions/hypgeom-dist-function",
      "accessed": "2026-11-16"
    },
    {
      "title": "Microsoft Support: CHISQ.TEST Function Reference",
      "url": "https://support.microsoft.com/en-us/excel/functions/chisq-test-function",
      "accessed": "2026-11-16"
    },
    {
      "title": "Microsoft Support: Introduction to Python in Excel",
      "url": "https://support.microsoft.com/en-us/office/introduction-to-python-in-excel-55643c2e-ff56-4168-b1ce-9428c8308545",
      "accessed": "2026-11-16"
    },
    {
      "title": "R Documentation: Fisher's Exact Test for Count Data",
      "url": "https://stat.ethz.ch/R-manual/R-devel/library/stats/html/fisher.test.html",
      "accessed": "2026-11-16"
    },
    {
      "title": "SciPy Manual: scipy.stats.fisher_exact",
      "url": "https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.fisher_exact.html",
      "accessed": "2026-11-16"
    },
    {
      "title": "Real Statistics Using Excel: Fisher Exact Test",
      "url": "https://real-statistics.com/contingency-tables/fishers-exact-test/",
      "accessed": "2026-11-16"
    }
  ]
}