Expand description
χ² tests — goodness-of-fit and independence (contingency table), with a real
upper-tail p-value from chi_squared.
Structs§
- ChiSquare
Result - χ² test result.
Functions§
- chi_
square_ gof - Pearson goodness-of-fit:
Σ (Oᵢ − Eᵢ)² / Eᵢwithdof = k − 1.Noneif the vectors differ in length, are shorter than 2, or any expected count is ≤ 0. - chi_
square_ independence - χ² test of independence on an
R×Ccontingency table of counts. ExpectedEᵢⱼ = rowᵢ·colⱼ / total,dof = (R−1)(C−1).Noneif the table is not at least 2×2, is ragged, or the grand total is 0.