Fisher

object Fisher(source)

Properties

Link copied to clipboard
const val MAX_TOTAL: Int = 60

Largest table total: C(60, 30) * 30 still fits in a Long.

Functions

Link copied to clipboard
fun choose(n: Int, k: Int): Long
Link copied to clipboard
fun oneSided(a: Int, b: Int, c: Int, d: Int): PValue

The one-sided exact p-value of the 2x2 table [[a, b], [c, d]]: the probability, with all margins fixed, of a or more in the top-left cell. For an experiment a is the failures in the treatment arm, b its passes, c and d the control's.