Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

[Feature Request] X² test for 2×2 contingency tables

Open
#180 1 comment 0 reactions 0 assignees View on GitHub

@omaus is already working on this.

Since Jan 28, 2022.

  • #181 by @omaus — open

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
48/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Quiet
Tech stack
fsharp
Domain
data

Research direction

Start by locating the existing X² test implementation in the FSharp.Stats repository and read how its public API and tests are organized. Use the linked Cochran–Mantel–Haenszel and four-field test references to define the 2×2 variant. Done means the repository provides a usable 2×2 contingency-table test alongside the existing X² test.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request related to a problem? Please describe.
An often used variant of the X² (Chi-squared) test is that for 2×2 contingency tables (aka Cochran-Mantel-Haenszel test). Since the original X² test is already implemented, a version for 2×2 contingency tables can easily be implemented.

Describe the solution you'd like
Implement it.

Describe alternatives you've considered
Always write it yourself with the already existing X² test.

Additional context
https://en.wikipedia.org/wiki/Cochran%E2%80%93Mantel%E2%80%93Haenszel_statistics (eng)
https://de.wikipedia.org/wiki/Chi-Quadrat-Test#Vierfeldertest (ger)

Dominant language
F#
Stars
228
Forks
58
Avg merge
2d 7h
Merged PRs (30d)
1

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fslaborg/FSharp.Stats

All issues in fslaborg/FSharp.Stats

Similar issues

More Data Engineering issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.