Skip to content

Function: fairnessTest() ​

ts
function fairnessTest(counts, chances?): Fairness;

Defined in: src/stats.ts:161

Is this die fair? A chi-square goodness-of-fit test of how often each face came up (counts[i] for the i-th face) against a fair die, or against chances when the die is supposed to be something else. It makes no roll: the counts can come from a history here or from a real die on a real table.

Parameters ​

counts ​

readonly number[]

chances? ​

readonly number[]

Returns ​

Fairness

MIT © John Morris