# Contingency Table Chi-Square Fisher Exact Cramér V Tutor

Step-by-step independence testing for 2×2 / R×C contingency tables: Pearson χ², Yates, G-test, Fisher exact, effect sizes, adjusted residuals, Cochran rule and optional Chapman estimate.

> Canonical page: https://elysiatools.com/en/tools/contingency-table-chi-square-fisher-exact-cramer-v-tutor

- **Category:** Data Analysis

- **Keywords:** chi square, fisher exact, contingency table, cramers v, yates, g test, adjusted residual

## Overview

χ² = Σ(O−E)²/E; Yates for 2×2; G = 2ΣO·ln(O/E); p via regularized incomplete gamma; Fisher via lgamma hypergeometric with SciPy two-tailed convention; Cramér's V / phi / C; Haberman residuals; BH-FDR note; Chapman N̂ for 2×2 mark-recapture.

## Inputs

- **Contingency table (rows on lines, cells comma/space/tab-separated)** (textarea): 30, 20 20, 30
- **Yates continuity correction** (select)
- **Significance level α** (number)
- **Chapman capture-recapture estimate (2×2)** (checkbox): For 2×2 mark-recapture data: N̂ = (a+1)(b+1)/(c+1) − 1.

## When to use

- Test whether two categorical variables are statistically independent.
- Use Fisher's exact test when a 2×2 table contains small expected counts.
- Measure association strength and identify cells that contribute most to a table-level result.

## How it works

- Enter the contingency table with rows on separate lines and values separated by commas, spaces, or tabs.
- The tool calculates expected counts, Pearson χ², degrees of freedom, p-value, and the G-test.
- For 2×2 tables, choose whether Yates continuity correction is applied automatically, always, or never.
- Review Fisher's exact result, effect sizes, adjusted residuals, Cochran guidance, and the optional Chapman estimate when applicable.

## Use cases

- Compare outcomes across treatment groups, survey categories, or demographic segments.
- Evaluate small-sample categorical experiments where exact testing is more appropriate than an asymptotic chi-square result.
- Inspect adjusted residuals to locate the cells behind a significant association.

## Frequently asked questions

### What table formats are supported?

The tool accepts 2×2 and R×C tables, with rows on separate lines and cells separated by commas, spaces, or tabs.

### When is Fisher's exact test recommended?

It is recommended for 2×2 tables when expected counts are small and the chi-square approximation may be unreliable.

### What does the significance level α control?

Alpha sets the threshold for judging statistical significance, with a default of 0.05.

### What does Cramér's V measure?

Cramér's V summarizes the strength of association between categorical variables.

### What is the Chapman estimate used for?

The optional Chapman estimate provides a 2×2 mark-recapture population estimate using N̂ = (a+1)(b+1)/(c+1) − 1.

## Related tools

- [Kurtosis Analyzer](https://elysiatools.com/en/tools/kurtosis-analyzer): Analyze data kurtosis to measure the "tailedness" of distribution and detect heavy-tailed or light-tailed patterns
- [Train/Test Split with Stratification](https://elysiatools.com/en/tools/train-test-split-with-stratification): Class-stratified train/validation/test split or stratified k-fold for CSV/JSON datasets — seeded, reproducible, with distribution reports, leakage checks, SMOTE preview and CSV export.
- [AI Domain Name Idea Generator](https://elysiatools.com/en/tools/ai-domain-name-idea-generator): Generate up to 10 creative domain names with AI and filter out already-registered ones via DNS + RDAP.
- [CSV Malformed Row Surgeon](https://elysiatools.com/en/tools/csv-malformed-row-surgeon): Surgically repair malformed CSV rows one at a time: unescaped (stray) quotes, mixed delimiters (tab/semicolon/comma in the same file), BOM-prefixed headers, CRLF/CR line endings and trailing empty lines. The surgeon parses tolerantly, shows a row-level red/green diff of every change it made (before → after, with the repair reason tagged), lists the rows it accepted unchanged, and emits the cleaned CSV. Optional AI repair can review suspicious rows after the deterministic pass. It complements the CSV Validator (which only reports problems) by actually fixing the damaged rows.
- [Density Calculator (ρ = m/V)](https://elysiatools.com/en/tools/density-calculator): Compute density, mass, or volume from the other two, with specific gravity and a float/sink check
- [Dimensional Analysis Unit Cancellation Tutor](https://elysiatools.com/en/tools/dimensional-analysis-unit-cancellation-tutor): Step-by-step factor-label unit cancellation with inverted-factor diagnosis and optional student-answer checking.
- [Dockerfile Linter & Best-Practices Checker](https://elysiatools.com/en/tools/dockerfile-linter): Hadolint-style static analysis for Dockerfiles without a Docker daemon: 30+ rules across image pinning, package-manager hygiene, layer caching, secrets and signal handling, with severities, line numbers and fix examples.
- [Hash Algorithm Comparator](https://elysiatools.com/en/tools/hash-algorithm-comparator): Hash the same input with MD5, SHA-1, SHA-256, SHA-512, BLAKE2b, and BLAKE3 at the same time and compare them side by side: output length, hex/Base64 digest, security status (broken / modern), and a relative speed benchmark. Great for teaching, choosing a hashing algorithm, or sanity-checking checksums.

## Samples

- [Android Image Processing Java Samples](https://elysiatools.com/en/samples/android-image-processing-java): Android Java image processing examples including reading/saving images, scaling, and format conversion
- [Android Image Processing Kotlin Samples](https://elysiatools.com/en/samples/android-image-processing-kotlin): Android Kotlin image processing examples including reading/saving images, scaling, and format conversion
- [Web Image Processing Python Samples](https://elysiatools.com/en/samples/web-image-processing-python): Web Python image processing examples using PIL/Pillow including reading, saving, resizing, and format conversion
- [Web Image Processing Rust Samples](https://elysiatools.com/en/samples/web-image-processing-rust): Web Rust image processing examples including image read/save, scaling, and format conversion

## Related content

- [Identifier, Config, and Input Validation Tools](https://elysiatools.com/en/hubs/validation-validate): Compare validators for email, phone, IP, dates, cron, barcodes, payment details, env files, and other real-world inputs in one hub.
- [Identifier, Address, and Code Format Validators](https://elysiatools.com/en/hubs/validation-format): Curated tools for identifier, address, account, and code format validation in one hub.
- [JSON Schema and API Contract Validation Tools](https://elysiatools.com/en/hubs/json-validate): Compare JSON schema validation, OpenAPI response checks, mutation testing, stress testing, and breaking-change detection tools in one hub for API contract review.
- [Contact, Postal, and Shipping Validation Tools](https://elysiatools.com/en/hubs/contact-shipping-validation): Validate emails, phone numbers, postal codes, calling codes, and shipment tracking numbers in one hub for signup, checkout, and delivery workflows.
